disputes pallet: Remove spam slots (#6345)
* disputes pallet: Filter disputes with votes less than supermajority threshold * Remove `max_spam_slots` usages * Remove `SpamSlots` * Remove `SpamSlotChange` * Remove `Error<T>::PotentialSpam` and stale comments * `create_disputes_with_no_spam` -> `create_disputes` * Make tests compile - wip commit * Rework `test_dispute_timeout`. Rename `update_spam_slots` to `filter_dispute_set` * Remove `dispute_statement_becoming_onesided_due_to_spamslots_is_accepted` and `filter_correctly_accounts_spam_slots` -> they bring no value with removed spam slots * Fix `test_provide_multi_dispute_success_and_other` * Remove an old comment * Remove spam slots from tests - clean todo comments * Remove test - `test_decrement_spam` * todo comments * Update TODO comments * Extract `test_unconfirmed_are_ignored` as separate test case * Remove dead code * Fix `test_unconfirmed_are_ignored` * Remove dead code in `filter_dispute_data` * Fix weights (related to commit "Remove `SpamSlots`") * Disputes migration - first try * Remove `dispute_max_spam_slots` + storage migration * Fix `HostConfig` migration tests * Deprecate `SpamSlots` * Code review feedback * add weight for storage version update * fix bound for clear() * Fix weights in disputes migration * Revert "Deprecate `SpamSlots`" This reverts commit 8c4d967c7b061abd76ba8b551223918c0b9e6370. * Make mod migration public * Remove `SpamSlots` from disputes pallet and use `storage_alias` in the migration * Fix call to `clear()` for `SpamSlots` in migration * Update migration and add a `try-runtime` test * Add `pre_upgrade` `try-runtime` test * Fix some test names in `HostConfiguration` migration * Link spamslots migration in all runtimes * Add `test_unconfirmed_disputes_cause_block_import_error` * Update guide - Remove `SpamSlots` related information from roadmap/implementers-guide/src/runtime/disputes.md - Add 'Disputes filtering' to Runtime section of the Implementor's guide * Update runtime/parachains/src/configuration/migration.rs Co-authored-by:Marcin S. <marcin@bytedude.com> * Code review feedback - update logs * Code review feedback: fix weights * Update runtime/parachains/src/disputes.rs Co-authored-by:
s0me0ne-unkn0wn <48632512+s0me0ne-unkn0wn@users.noreply.github.com> * Additional logs in disputes migration * Fix merge conflicts * Add version checks in try-runtime tests * Fix a compilation warning` Co-authored-by:
Marcin S. <marcin@bytedude.com> Co-authored-by:
s0me0ne-unkn0wn <48632512+s0me0ne-unkn0wn@users.noreply.github.com>
Showing
- polkadot/roadmap/implementers-guide/src/runtime/disputes.md 37 additions, 24 deletionspolkadot/roadmap/implementers-guide/src/runtime/disputes.md
- polkadot/runtime/kusama/src/lib.rs 2 additions, 0 deletionspolkadot/runtime/kusama/src/lib.rs
- polkadot/runtime/parachains/src/builder.rs 2 additions, 2 deletionspolkadot/runtime/parachains/src/builder.rs
- polkadot/runtime/parachains/src/configuration.rs 0 additions, 16 deletionspolkadot/runtime/parachains/src/configuration.rs
- polkadot/runtime/parachains/src/configuration/migration.rs 117 additions, 90 deletionspolkadot/runtime/parachains/src/configuration/migration.rs
- polkadot/runtime/parachains/src/configuration/tests.rs 0 additions, 6 deletionspolkadot/runtime/parachains/src/configuration/tests.rs
- polkadot/runtime/parachains/src/disputes.rs 31 additions, 224 deletionspolkadot/runtime/parachains/src/disputes.rs
- polkadot/runtime/parachains/src/disputes/migration.rs 98 additions, 0 deletionspolkadot/runtime/parachains/src/disputes/migration.rs
- polkadot/runtime/parachains/src/disputes/tests.rs 190 additions, 552 deletionspolkadot/runtime/parachains/src/disputes/tests.rs
- polkadot/runtime/parachains/src/paras_inherent/mod.rs 0 additions, 4 deletionspolkadot/runtime/parachains/src/paras_inherent/mod.rs
- polkadot/runtime/polkadot/src/lib.rs 2 additions, 0 deletionspolkadot/runtime/polkadot/src/lib.rs
- polkadot/runtime/rococo/src/lib.rs 2 additions, 0 deletionspolkadot/runtime/rococo/src/lib.rs
- polkadot/runtime/westend/src/lib.rs 2 additions, 0 deletionspolkadot/runtime/westend/src/lib.rs
Please register or sign in to comment