Disputes runtime (#2947)
* disputes module skeleton and storage * implement dispute module initialization logic * implement disputes session change logic * provide dispute skeletons * deduplication & ancient check * fix a couple of warnings * begin provide_dispute_data impl * flesh out statement set import somewhat * move ApprovalVote to shared primitives * add a signing-payload API to explicit dispute statements * implement statement signature checking * some bitflags glue for observing changes in disputes * implement dispute vote import logic * flesh out everything except slashing * guide: tweaks * declare and use punishment trait * punish validators for inconclusive disputes * guide: tiny fix * guide: update docs * add disputes getter fn * guide: small change to spam slots handling * improve spam slots handling and fix some bugs * finish API of disputes runtime * define and deposit `RevertTo` log * begin integrating disputes into para_inherent * use precomputed slash_for/against * return candidate hash from process_bitfields * implement inclusion::collect_disputed * finish integration into rest of runtime * add Disputes to initializer * address suggestions * use pallet macro * fix typo * Update runtime/parachains/src/disputes.rs * add test: fix pruning * document specific behavior * deposit events on dispute changes * add an allow(unused) on fn disputes * add a dummy PunishValidators implementation * add disputes module to Rococo * add disputes module to westend runtime * add disputes module to test runtime * add disputes module to kusama runtime * guide: prepare for runtime API for checking frozenness * remove revert digests in favor of state variable * merge reversions * Update runtime/parachains/src/disputes.rs Co-authored-by:André Silva <123550+andresilva@users.noreply.github.com> * Update runtime/parachains/src/disputes.rs Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> * Update runtime/parachains/src/disputes.rs Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> * add byzantine_threshold and supermajority_threshold utilities to primitives * use primitive helpers * deposit revert event when freezing chain * deposit revert log when freezing chain * test revert event and log are generated when freezing * add trait to decouple disputes handling from paras inherent handling * runtime: fix compilation and setup dispute handler * disputes: add hook for filtering out dispute statements * disputes: add initializer hooks to DisputesHandler * runtime: remove disputes pallet from all runtimes * tag TODOs * don't import any dispute statements just yet... * address grumbles * fix spellcheck, hopefully * maybe now? * last spellcheck round * fix runtime tests * fix test-runtime Co-authored-by:
thiolliere <gui.thiolliere@gmail.com> Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by:
André Silva <andrerfosilva@gmail.com>
parent
4636daa7
Showing
- polkadot/Cargo.lock 1 addition, 0 deletionspolkadot/Cargo.lock
- polkadot/primitives/src/v1/mod.rs 1 addition, 1 deletionpolkadot/primitives/src/v1/mod.rs
- polkadot/roadmap/implementers-guide/src/runtime/disputes.md 22 additions, 20 deletionspolkadot/roadmap/implementers-guide/src/runtime/disputes.md
- polkadot/roadmap/implementers-guide/src/types/disputes.md 7 additions, 7 deletionspolkadot/roadmap/implementers-guide/src/types/disputes.md
- polkadot/runtime/kusama/src/lib.rs 1 addition, 0 deletionspolkadot/runtime/kusama/src/lib.rs
- polkadot/runtime/parachains/Cargo.toml 1 addition, 0 deletionspolkadot/runtime/parachains/Cargo.toml
- polkadot/runtime/parachains/src/disputes.rs 2081 additions, 0 deletionspolkadot/runtime/parachains/src/disputes.rs
- polkadot/runtime/parachains/src/inclusion.rs 28 additions, 7 deletionspolkadot/runtime/parachains/src/inclusion.rs
- polkadot/runtime/parachains/src/initializer.rs 19 additions, 1 deletionpolkadot/runtime/parachains/src/initializer.rs
- polkadot/runtime/parachains/src/lib.rs 1 addition, 0 deletionspolkadot/runtime/parachains/src/lib.rs
- polkadot/runtime/parachains/src/mock.rs 56 additions, 2 deletionspolkadot/runtime/parachains/src/mock.rs
- polkadot/runtime/parachains/src/paras_inherent.rs 62 additions, 4 deletionspolkadot/runtime/parachains/src/paras_inherent.rs
- polkadot/runtime/rococo/src/lib.rs 1 addition, 0 deletionspolkadot/runtime/rococo/src/lib.rs
- polkadot/runtime/test-runtime/src/lib.rs 9 additions, 0 deletionspolkadot/runtime/test-runtime/src/lib.rs
- polkadot/runtime/westend/src/lib.rs 1 addition, 0 deletionspolkadot/runtime/westend/src/lib.rs
Please register or sign in to comment