forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BEEFY] Add runtime support for reporting fork voting (paritytech#4522)
Related to paritytech#4523 Extracting part of paritytech#1903 (credits to @Lederstrumpf for the high-level strategy), but also introducing significant adjustments both to the approach and to the code. The main adjustment is the fact that the `ForkVotingProof` accepts only one vote, compared to the original version which accepted a `vec![]`. With this approach more calls are needed in order to report multiple equivocated votes on the same commit, but it simplifies a lot the checking logic. We can add support for reporting multiple signatures at once in the future. There are 2 things that are missing in order to consider this issue done, but I would propose to do them in a separate PR since this one is already pretty big: - benchmarks/computing a weight for the new extrinsic (this wasn't present in paritytech#1903 either) - exposing an API for generating the ancestry proof. I'm not sure if we should do this in the Mmr pallet or in the Beefy pallet Co-authored-by: Robert Hambrock <roberthambrock@gmail.com> --------- Co-authored-by: Adrian Catangiu <adrian@parity.io>
- Loading branch information
1 parent
e0d51fb
commit e5d36e0
Showing
25 changed files
with
1,378 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Added runtime support for reporting BEEFY fork voting | ||
|
||
doc: | ||
- audience: | ||
- Runtime Dev | ||
- Runtime User | ||
description: | | ||
This PR adds the `report_fork_voting`, `report_future_voting` extrinsics to `pallet-beefy` | ||
and renames the `report_equivocation` extrinsic to `report_double_voting`. | ||
`report_fork_voting` can't be called yet, since it uses `Weight::MAX` weight. We will | ||
add benchmarks for it and set the proper weight in a future PR. | ||
Also a new `AncestryHelper` associated trait was added to `pallet_beefy::Config`. | ||
- audience: Node Dev | ||
description: | | ||
This PR renames the `submit_report_equivocation_unsigned_extrinsic` in `BeefyApi` to | ||
`submit_report_double_voting_unsigned_extrinsic`and bumps the `BeefyApi` version from 3 to 4. | ||
|
||
crates: | ||
- name: pallet-beefy | ||
bump: major | ||
- name: pallet-beefy-mmr | ||
bump: minor | ||
- name: pallet-mmr | ||
bump: major | ||
- name: sc-consensus-beefy | ||
bump: patch | ||
- name: kitchensink-runtime | ||
bump: major | ||
- name: rococo-runtime | ||
bump: major | ||
- name: westend-runtime | ||
bump: major | ||
- name: sp-consensus-beefy | ||
bump: major | ||
- name: polkadot-service | ||
bump: patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.