slasher

command
v0.0.0-...-d79950a Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: GPL-3.0 Imports: 17 Imported by: 0

README

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.

Documentation

Overview

Package main defines slasher server implementation for eth2. A slasher listens for all broadcasted messages using a running beacon node in order to detect malicious attestations and block proposals.

This code was adapted from https://github.com/ethereum/go-ethereum/blob/master/cmd/geth/usage.go

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, being able to keep attestation spans by epoch for the validators active in the beacon chain.
Package cache contains critical caches necessary for the runtime of the slasher service, being able to keep attestation spans by epoch for the validators active in the beacon chain.
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 flags contains all configuration runtime flags for the slasher service.
Package flags contains all configuration runtime flags for the slasher service.
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