lighthouse/beacon_node
Michael Sproul 5828ff1204 Implement slasher (#1567)
This is an implementation of a slasher that lives inside the BN and can be enabled via `lighthouse bn --slasher`.

Features included in this PR:

- [x] Detection of attester slashing conditions (double votes, surrounds existing, surrounded by existing)
- [x] Integration into Lighthouse's attestation verification flow
- [x] Detection of proposer slashing conditions
- [x] Extraction of attestations from blocks as they are verified
- [x] Compression of chunks
- [x] Configurable history length
- [x] Pruning of old attestations and blocks
- [x] More tests

Future work:

* Focus on a slice of history separate from the most recent N epochs (e.g. epochs `current - K` to `current - M`)
* Run out-of-process
* Ingest attestations from the chain without a resync

Design notes are here https://hackmd.io/@sproul/HJSEklmPL
2020-11-23 03:43:22 +00:00
..
beacon_chain Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
client Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
eth1 Expand eth1 block cache, add more logs (#1938) 2020-11-21 00:26:15 +00:00
eth2_libp2p Add flag to import all attestations (#1941) 2020-11-22 23:58:25 +00:00
genesis Return eth1-related data via the API (#1797) 2020-11-02 00:37:30 +00:00
http_api Improve UX whilst VC is waiting for genesis (#1915) 2020-11-23 01:00:22 +00:00
http_metrics Support pre-flight CORS check (#1772) 2020-10-22 04:47:27 +00:00
network Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
operation_pool Update pool/attestations and committees endpoints (#1899) 2020-11-18 23:31:39 +00:00
src Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
store Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
tests Implement standard eth2.0 API (#1569) 2020-10-01 11:12:36 +10:00
timer Upgrade discovery and restructure task execution (#1693) 2020-10-05 18:45:54 +11:00
websocket_server Update external deps (#1711) 2020-10-05 08:22:19 +00:00
Cargo.toml Implement slasher (#1567) 2020-11-23 03:43:22 +00:00