Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Dispute spam protection #4134

Merged
merged 72 commits into from
Nov 19, 2021
Merged

Conversation

eskimor
Copy link
Member

@eskimor eskimor commented Oct 22, 2021

Status:

  • Everything important is implemented
  • Fix existing tests
  • Write tests

Also missing, but will be a separate PR: Guide changes.

skip check-dependent-cumulus

@eskimor eskimor marked this pull request as ready for review November 10, 2021 01:02
@github-actions github-actions bot removed the A3-in_progress Pull request is in progress. No review needed at this stage. label Nov 10, 2021
@ordian
Copy link
Member

ordian commented Nov 19, 2021

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot paritytech-processbot bot merged commit d488955 into master Nov 19, 2021
@paritytech-processbot paritytech-processbot bot deleted the rk-dispute-coordinator-spam-slots branch November 19, 2021 17:08
ordian added a commit that referenced this pull request Nov 20, 2021
* master: (38 commits)
  Replicate Rob's PR (#4337)
  Companion for Taskmanager: Remove `clean_shutdown` (#4336)
  prefer code upgrades in inherent filtering (#4334)
  remove provisioner checks (#4254)
  Log para inherent inputs (#4331)
  Dispute spam protection (#4134)
  Dependabot: Ignore sub-tokens (#4328)
  export hrmp config (#4324)
  Add missing license header (#4321)
  Use non-empty validation code (#4322)
  fix pallet-xcm extrinsic doc comments (#4317)
  prepare worker: Catch unexpected unwinds (#4304)
  Enable BEEFY explicitly (#4320)
  Bump serde_json from 1.0.70 to 1.0.71 (#4316)
  Bump strum from 0.22.0 to 0.23.0 (#4308)
  Remove sort_unstable_by (#4314)
  Bump tokio from 1.13.0 to 1.14.0 (#4298)
  Substrate companion: Authority discovery multiple peer ids (#4295)
  Companion for substrate#9878 (#3949)
  move paras inherent filtering to runtime (#4028)
  ...
@ordian ordian added the E1-database_migration PR introduces code that does a one-way migration of the database. label Nov 29, 2021
ordian pushed a commit that referenced this pull request Nov 29, 2021
* 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>
tdimitrov added a commit to tdimitrov/polkadot that referenced this pull request Feb 23, 2022
tdimitrov added a commit to tdimitrov/polkadot that referenced this pull request Feb 23, 2022
tdimitrov added a commit to tdimitrov/polkadot that referenced this pull request Feb 25, 2022
tdimitrov added a commit to tdimitrov/polkadot that referenced this pull request Feb 25, 2022
tdimitrov added a commit to tdimitrov/polkadot that referenced this pull request Feb 25, 2022
tdimitrov added a commit to tdimitrov/polkadot that referenced this pull request Feb 28, 2022
tdimitrov added a commit to tdimitrov/polkadot that referenced this pull request Feb 28, 2022
tdimitrov added a commit to tdimitrov/polkadot that referenced this pull request Mar 1, 2022
tdimitrov added a commit to tdimitrov/polkadot that referenced this pull request Mar 1, 2022
eskimor pushed a commit that referenced this pull request Mar 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. E1-database_migration PR introduces code that does a one-way migration of the database.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants