lighthouse/beacon_node/beacon_chain/src
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
..
attestation_verification.rs Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
beacon_chain.rs Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
beacon_fork_choice_store.rs Apply store refactor to new fork choice 2020-06-17 15:20:44 +10:00
beacon_snapshot.rs Add no-copy block processing cache (#863) 2020-04-06 10:53:33 +10:00
block_verification.rs Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
builder.rs Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
chain_config.rs Implement database temp states to reduce memory usage (#1798) 2020-10-23 01:27:51 +00:00
errors.rs Weak subjectivity start from genesis (#1675) 2020-10-03 10:00:28 +10:00
eth1_chain.rs Expand eth1 block cache, add more logs (#1938) 2020-11-21 00:26:15 +00:00
events.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
head_tracker.rs Fix head tracker concurrency bugs (#1771) 2020-10-19 05:58:39 +00:00
lib.rs Fix head tracker concurrency bugs (#1771) 2020-10-19 05:58:39 +00:00
metrics.rs Fix race condition in seen caches (#1937) 2020-11-22 23:02:51 +00:00
migrate.rs Address queue congestion in migrator (#1923) 2020-11-17 23:11:26 +00:00
naive_aggregation_pool.rs Implement standard eth2.0 API (#1569) 2020-10-01 11:12:36 +10:00
observed_attestations.rs Fix race condition in seen caches (#1937) 2020-11-22 23:02:51 +00:00
observed_attesters.rs Fix race condition in seen caches (#1937) 2020-11-22 23:02:51 +00:00
observed_block_producers.rs Fix race condition in seen caches (#1937) 2020-11-22 23:02:51 +00:00
observed_operations.rs Fix race condition in seen caches (#1937) 2020-11-22 23:02:51 +00:00
persisted_beacon_chain.rs Fix head tracker concurrency bugs (#1771) 2020-10-19 05:58:39 +00:00
persisted_fork_choice.rs v0.12 fork choice update (#1229) 2020-06-17 11:10:22 +10:00
shuffling_cache.rs Implement standard eth2.0 API (#1569) 2020-10-01 11:12:36 +10:00
snapshot_cache.rs Support multiple BLS implementations (#1335) 2020-07-25 02:03:18 +00:00
test_utils.rs Implement database temp states to reduce memory usage (#1798) 2020-10-23 01:27:51 +00:00
timeout_rw_lock.rs Add timeouts to canonical head rwlock (#759) 2020-01-06 17:30:37 +11:00
validator_pubkey_cache.rs Allow truncation of pubkey cache on creation (#1686) 2020-09-30 04:42:52 +00:00