slasher/

directory
v1.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2021 License: GPL-3.0

README

Slasher Implementation

This is the main project folder for a slasher implementation for eth2 written in Go 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. You can read more about configuration options for our slasher in our documentation portal

Directories

Path Synopsis
Package beaconclient defines a service that interacts with a beacon node via a gRPC client to listen for streamed blocks, attestations, and to submit proposer/attester slashings to the node in case they are detected.
Package beaconclient defines a service that interacts with a beacon node via a gRPC client to listen for streamed blocks, attestations, and to submit proposer/attester slashings to the node in case they are detected.
Package cache contains critical caches necessary for the runtime of the slasher service, such as a cache for maintaining validator history on a per epoch basis
Package cache contains critical caches necessary for the runtime of the slasher service, such as a cache for maintaining validator history on a per epoch basis
db
Package db defines a persistent backend for the slasher service.
Package db defines a persistent backend for the slasher service.
iface
Package iface defines an interface for the slasher database, providing more advanced interfaces such as a ReadOnlyDatabase.
Package iface defines an interface for the slasher database, providing more advanced interfaces such as a ReadOnlyDatabase.
kv
Package kv defines a bolt-db, key-value store implementation of the slasher database interface.
Package kv defines a bolt-db, key-value store implementation of the slasher database interface.
testing
Package testing defines useful helper functions for unit tests with the slasher database.
Package testing defines useful helper functions for unit tests with the slasher database.
types
Package types includes important database-related types for slasher-specific logic.
Package types includes important database-related types for slasher-specific logic.
Package detection defines a service that reacts to incoming blocks/attestations by running slashing detection for double proposals, double votes, and surround votes according to the eth2 specification.
Package detection defines a service that reacts to incoming blocks/attestations by running slashing detection for double proposals, double votes, and surround votes according to the eth2 specification.
attestations
Package attestations defines an implementation of a slashable attestation detector using min-max surround vote checking.
Package attestations defines an implementation of a slashable attestation detector using min-max surround vote checking.
attestations/iface
Package iface defines an interface for a slashable attestation detector struct.
Package iface defines an interface for a slashable attestation detector struct.
attestations/types
Package types includes important type definitions for slashable objects detected by slasher.
Package types includes important type definitions for slashable objects detected by slasher.
proposals
Package proposals defines an implementation of a double-propose detector in the slasher runtime.
Package proposals defines an implementation of a double-propose detector in the slasher runtime.
proposals/iface
Package iface defines an interface for a double-proposal detector struct.
Package iface defines an interface for a double-proposal detector struct.
testing
Package testing includes useful helpers for slasher-related unit tests.
Package testing includes useful helpers for slasher-related unit tests.
Package node is the main process which handles the lifecycle of the runtime services in a slasher process, gracefully shutting everything down upon close.
Package node is the main process which handles the lifecycle of the runtime services in a slasher process, gracefully shutting everything down upon close.
Package rpc defines an implementation of a gRPC slasher service, providing endpoints for determining whether or not a block/attestation is slashable based on slasher's evidence.
Package rpc defines an implementation of a gRPC slasher service, providing endpoints for determining whether or not a block/attestation is slashable based on slasher's evidence.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL