prysm-pulse/slasher
rkapka 1f21e196b6
Fix multiple anti-patterns from DeepSource analysis (#6951)
* Merge variable declaration and assignment
* Use result of type assertion to simplify cases
* Replace call to bytes.Compare with bytes.Equal
* Drop unnecessary use of the blank identifier
* Replace x.Sub(time.Now()) with time.Until(x)
* Function literal can be simplified
* Use a single append to concatenate two slices
* Replace time.Now().Sub(x) with time.Since(x)
* Omit comparison with boolean constant
* Omit redundant nil check on slices
* Nested if can be replaced with else-if
* Function call can be replaced with helper function
* Omit redundant control flow
* Use plain channel send or receive
* Simplify returning boolean expression
* Merge branch 'origin-master' into fix-antipatterns
* Merge branch 'master' into fix-antipatterns
2020-08-10 16:16:45 +00:00
..
beaconclient Fix multiple anti-patterns from DeepSource analysis (#6951) 2020-08-10 16:16:45 +00:00
cache Historical detection fix (#6455) 2020-07-07 05:57:40 +03:00
db Code quality issues - Remove unused code (#6864) 2020-08-05 13:59:46 +02:00
detection Simplify make call by omitting redundant arguments (#6949) 2020-08-10 11:06:53 +00:00
flags Add --historical-slasher-node flag to simplify slasher usage (#6627) 2020-07-20 20:23:48 +00:00
node Fix CMD Config and modify --historical-slasher-node (#6730) 2020-08-02 22:09:10 +00:00
rpc Slasher protection race condition fix (#6871) 2020-08-04 19:50:23 +00:00
BUILD.bazel Add dockerhub image endpoints (#6230) 2020-06-12 17:06:12 +00:00
main.go Fix multiple anti-patterns from DeepSource analysis (#6951) 2020-08-10 16:16:45 +00:00
README.md Update README for Slasher (#5106) 2020-03-15 18:46:21 +00:00
usage_test.go Refactor dependencies, make Prysm "go gettable" (#6053) 2020-05-31 14:44:34 +08:00
usage.go Add --historical-slasher-node flag to simplify slasher usage (#6627) 2020-07-20 20:23:48 +00:00

Hash Slinging Slasher Server Implementation

This is the main project folder for a slasher server implementation for Ethereum Serenity in Golang by Prysmatic Labs. A slasher listens for all broadcasted messages using a running beacon node in order to detect slashable attestations and block proposals. It uses the min-max-surround method by Protolambda.

The slasher requires a connection to a synced beacon node in order to listen for attestations and block proposals. To run the slasher, type:

bazel run //slasher -- \
    --datadir PATH/FOR/DB \
    --span-map-cache \
    --beacon-rpc-provider localhost:4000

The beacon node entered in beacon-rpc-provider will then receive slashings from the slasher client and send them to any requesting proposer to be put into a block.