Dispute spam protection (#4134)
* Mostly notes.
* Better error messages.
* Introduce Fatal/NonFatal + drop back channel participation
- Fatal/NonFatal - in order to make it easier to use utility functions.
- We drop the back channel in dispute participation as it won't be
needed any more.
* Better error messages.
* Utility function for receiving `CandidateEvent`s.
* Ordering module typechecks.
* cargo fmt
* Prepare spam slots module.
* Implement SpamSlots mechanism.
* Implement queues.
* cargo fmt
* Participation.
* Participation taking shape.
* Finish participation.
* cargo fmt
* Cleanup.
* WIP: Cleanup + Integration.
* Make `RollingSessionWindow` initialized by default.
* Make approval voting typecheck.
* Get rid of lazy_static & fix approval voting tests
* Move `SessionWindowSize` to node primitives.
* Implement dispute coordinator initialization.
* cargo fmt
* Make queues return error instead of boolean.
* Initialized: WIP
* Introduce chain api for getting finalized block.
* Fix ordering to only prune candidates on finalized events.
* Pruning of old sessions in spam slots.
* New import logic.
* Make everything typecheck.
* Fix warnings.
* Get rid of obsolete dispute-participation.
* Fixes.
* Add back accidentelly deleted Cargo.lock
* Deliver disputes in an ordered fashion.
* Add module docs for errors
* Use type synonym.
* hidden docs.
* Fix overseer tests.
* Ordering provider taking `CandidateReceipt`.
... To be kicked on one next commit.
* Fix ordering to use relay_parent
as included block is not unique per candidate.
* Add comment in ordering.rs.
* Take care of duplicate entries in queues.
* Better spam slots.
* Review remarks + docs.
* Fix db tests.
* Participation tests.
* Also scrape votes on first leaf for good measure.
* Make tests typecheck.
* Spelling.
* Only participate in actual disputes, not on every import.
* Don't account backing votes to spam slots.
* Fix more tests.
* Don't participate if we don't have keys.
* Fix tests, typos and warnings.
* Fix merge error.
* Spelling fixes.
* Add missing docs.
* Queue tests.
* More tests.
* Add metrics + don't short circuit import.
* Basic test for ordering provider.
* Import fix.
* Remove dead link.
* One more dead link.
Co-authored-by:
Lldenaurois <Ljdenaurois@gmail.com>
parent
ef3addb6
Showing
- polkadot/Cargo.lock 2 additions, 17 deletionspolkadot/Cargo.lock
- polkadot/Cargo.toml 0 additions, 1 deletionpolkadot/Cargo.toml
- polkadot/node/core/approval-voting/src/import.rs 21 additions, 15 deletionspolkadot/node/core/approval-voting/src/import.rs
- polkadot/node/core/approval-voting/src/lib.rs 30 additions, 5 deletionspolkadot/node/core/approval-voting/src/lib.rs
- polkadot/node/core/dispute-coordinator/src/metrics.rs 24 additions, 0 deletionspolkadot/node/core/dispute-coordinator/src/metrics.rs
- polkadot/node/core/dispute-coordinator/src/real/backend.rs 5 additions, 2 deletionspolkadot/node/core/dispute-coordinator/src/real/backend.rs
- polkadot/node/core/dispute-coordinator/src/real/db/v1.rs 9 additions, 10 deletionspolkadot/node/core/dispute-coordinator/src/real/db/v1.rs
- polkadot/node/core/dispute-coordinator/src/real/error.rs 167 additions, 0 deletionspolkadot/node/core/dispute-coordinator/src/real/error.rs
- polkadot/node/core/dispute-coordinator/src/real/initialized.rs 1124 additions, 0 deletions...dot/node/core/dispute-coordinator/src/real/initialized.rs
- polkadot/node/core/dispute-coordinator/src/real/mod.rs 295 additions, 1172 deletionspolkadot/node/core/dispute-coordinator/src/real/mod.rs
- polkadot/node/core/dispute-coordinator/src/real/ordering/mod.rs 219 additions, 0 deletions...ot/node/core/dispute-coordinator/src/real/ordering/mod.rs
- polkadot/node/core/dispute-coordinator/src/real/ordering/tests.rs 165 additions, 0 deletions.../node/core/dispute-coordinator/src/real/ordering/tests.rs
- polkadot/node/core/dispute-coordinator/src/real/participation/mod.rs 438 additions, 0 deletions...de/core/dispute-coordinator/src/real/participation/mod.rs
- polkadot/node/core/dispute-coordinator/src/real/participation/queues/mod.rs 210 additions, 0 deletions.../dispute-coordinator/src/real/participation/queues/mod.rs
- polkadot/node/core/dispute-coordinator/src/real/participation/queues/tests.rs 131 additions, 0 deletions...ispute-coordinator/src/real/participation/queues/tests.rs
- polkadot/node/core/dispute-coordinator/src/real/participation/tests.rs 550 additions, 0 deletions.../core/dispute-coordinator/src/real/participation/tests.rs
- polkadot/node/core/dispute-coordinator/src/real/spam_slots.rs 123 additions, 0 deletions...adot/node/core/dispute-coordinator/src/real/spam_slots.rs
- polkadot/node/core/dispute-coordinator/src/real/status.rs 165 additions, 0 deletionspolkadot/node/core/dispute-coordinator/src/real/status.rs
- polkadot/node/core/dispute-coordinator/src/real/tests.rs 123 additions, 206 deletionspolkadot/node/core/dispute-coordinator/src/real/tests.rs
- polkadot/node/core/dispute-participation/Cargo.toml 0 additions, 20 deletionspolkadot/node/core/dispute-participation/Cargo.toml
Please register or sign in to comment