This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Offences report system rework #13425
Merged
paritytech-processbot
merged 36 commits into
paritytech:master
from
davxy:equivocation-offence-rework
Mar 7, 2023
Merged
Offences report system rework #13425
paritytech-processbot
merged 36 commits into
paritytech:master
from
davxy:equivocation-offence-rework
Mar 7, 2023
+474
−716
Conversation
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
davxy
commented
Feb 20, 2023
davxy
added
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
D2-breaksapi
and removed
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
labels
Feb 20, 2023
altonen
approved these changes
Feb 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me but I'm not very familiar with this area of the codebase
skunert
approved these changes
Mar 7, 2023
michalkucharczyk
approved these changes
Mar 7, 2023
andresilva
approved these changes
Mar 7, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
bot merge |
Error: "Check reviews" status is not passing for paritytech/polkadot#6784 |
bot merge |
Waiting for commit status. |
Merge cancelled due to error. Error: Statuses failed for 643c745 |
bot merge |
This was referenced Mar 8, 2023
1 task
ukint-vs
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Apr 10, 2023
* Experiments with common equivocation trait * Improved equivocation trait * Fix grandpa equivocation implementation * Remove some cruft * Remove some more cruft * More generic naming * Simplification of offences manipilation * More refactory * Some prograss with the encapsulation of offence report system * Finally unit type works as a universal null report system * Align substrate node code * Further simplification * Fix test utils * Remove not required associated type * Fix benches * Rollback to prev field name * Box big params * Fix typo * Remove new tag computation * Remove default implementations * Better docs * Return 'Result' instead of bool * Change offence report system return types * Some renaming and documentation * Improve documentation * More abstract offence report system * Rename 'consume_evidence' to 'process_evidence' * Further docs refinements * Doc for dummy offence report * Fix rustdoc * Fix after master merge * Apply code review suggestions * Improve docs
6 tasks
15 tasks
nathanwhit
pushed a commit
to nathanwhit/substrate
that referenced
this pull request
Jul 19, 2023
* Experiments with common equivocation trait * Improved equivocation trait * Fix grandpa equivocation implementation * Remove some cruft * Remove some more cruft * More generic naming * Simplification of offences manipilation * More refactory * Some prograss with the encapsulation of offence report system * Finally unit type works as a universal null report system * Align substrate node code * Further simplification * Fix test utils * Remove not required associated type * Fix benches * Rollback to prev field name * Box big params * Fix typo * Remove new tag computation * Remove default implementations * Better docs * Return 'Result' instead of bool * Change offence report system return types * Some renaming and documentation * Improve documentation * More abstract offence report system * Rename 'consume_evidence' to 'process_evidence' * Further docs refinements * Doc for dummy offence report * Fix rustdoc * Fix after master merge * Apply code review suggestions * Improve docs
Closed
46 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
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.
D2-breaksapi
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to provide a better abstraction to handle and report equivocations/offences.
The refactory introduces a new trait
OffenceReportSystem
that should be used when a component requires a higher level subsystem to wrap some of the operations typically required during an offence report:The introduced trait usage is not limited to the consensus equivocation reports but can be used for any type of offence that requires these three typical actions
Furthermore the refactory removes some burden from the user during instantiation of the pallet by providing a simpler interface.
Beside the simplification and encapsulation of some of the procedures, the PR also wants to be a starting point for:
This trait can also be used by Beefy to report equivocations
polkadot companion: paritytech/polkadot#6784