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

Disputes runtime #2947

Merged
74 commits merged into from
Jul 19, 2021
Merged

Disputes runtime #2947

74 commits merged into from
Jul 19, 2021

Conversation

rphmeier
Copy link
Contributor

@rphmeier rphmeier commented Apr 28, 2021

This PR implements the core of the disputes runtime as per the implementers' guide.

The disputes module handles the import of conflicting statements, and provides slashing and rewarding interfaces for runtimes to fill out. In practice we will plug disputes into slashing/rewarding.

A dispute is unconfirmed until 1/3+ of validators have participated. Validators have a limit on how many unconfirmed disputes they are allowed to participate in. This prevents spam from colluding malicious validators disputing each other over non-existent parachain blocks. Disputes that time out while unconfirmed should lead to a minor punishment of the participating validators, making spam of the chain expensive to perform.

Disputes concerning parablocks included in the local chain are always confirmed.

A dispute is considered concluded either when it times out unconfirmed or when concluding either for or against the candidate. It is mildly punishable to be against a valid candidate, and very punishable to be for an invalid candidate. If participants act on both sides of the dispute, it's possible for the dispute to conclude in both directions. However, acting on both sides of the dispute raises the likelihood of being slashed substantially, so there is no incentive to do so.

This adds the disputes to all runtimes, but does not combine it with any slashing or rewarding logic. That is, the node-side code for engaging with disputes is not implemented, and the result of any dispute activated on any network right now will be a no-op until the code is combined with the staking system. Thus there is no downside to integrating the module immediately.

@rphmeier rphmeier added the A3-in_progress Pull request is in progress. No review needed at this stage. label Apr 28, 2021
@rphmeier rphmeier removed the A1-onice label Jun 23, 2021
@andresilva
Copy link
Contributor

Should be ready for a final review and merge.

@rphmeier
Copy link
Contributor Author

bot merge

@ghost
Copy link

ghost commented Jul 19, 2021

Waiting for commit status.

@ghost
Copy link

ghost commented Jul 19, 2021

Merge aborted: Checks failed for bb47ed4

@rphmeier
Copy link
Contributor Author

bot merge

@ghost
Copy link

ghost commented Jul 19, 2021

Waiting for commit status.

@ghost
Copy link

ghost commented Jul 19, 2021

Bot will approve on the behalf of @rphmeier, since they are a team lead, in an attempt to reach the minimum approval count

@ghost ghost merged commit 219f0a4 into master Jul 19, 2021
@ghost ghost deleted the rh-disputes-runtime branch July 19, 2021 16:49
ordian added a commit that referenced this pull request Jul 20, 2021
* master:
  Update secp256k1 and remove unrequired usage (#3502)
  Bump libc from 0.2.91 to 0.2.98 (#3496)
  Bump slotmap from 1.0.2 to 1.0.5 (#3495)
  Gossip rebroadcast rate limiter (#3494)
  dependabot: ignore another git dep (#3493)
  add rustfmt toml (#3491)
  Disputes runtime (#2947)
  Bump async-process from 1.0.1 to 1.1.0 (#3122)
  remove the kubernetes helm chart (#3483)
  added pallet-proxy in rococo feature dependencies (#3486)
  Update BEEFY+MMR integration. (#3480)
  more verbose asserts (#3476)
  ci: use srtool-actions to build runtimes (#3423)
  overseer gen minor chore fixes (#3479)
@stze stze added D1-audited 👍 PR contains changes to critical logic that has been properly reviewed and externally audited. and removed D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Sep 28, 2021
This pull request was closed.
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. D1-audited 👍 PR contains changes to critical logic that has been properly reviewed and externally audited.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants