-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WiP: Malfeasance v2: Handlers and Publishers #6307
Draft
fasmat
wants to merge
18
commits into
develop
Choose a base branch
from
malfeasance-v2
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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
4 tasks
4 tasks
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6307 +/- ##
=========================================
- Coverage 79.8% 79.6% -0.3%
=========================================
Files 344 349 +5
Lines 44613 44814 +201
=========================================
+ Hits 35643 35697 +54
- Misses 6965 7107 +142
- Partials 2005 2010 +5 ☔ View full report in Codecov by Sentry. |
fasmat
force-pushed
the
malfeasance-v2
branch
from
September 9, 2024 08:27
ab0142b
to
d50618c
Compare
fasmat
force-pushed
the
malfeasance-v2
branch
2 times, most recently
from
September 25, 2024 07:52
16cbf88
to
9ec65ed
Compare
4 tasks
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
This PR adds handlers and publishers for malfeasance v2 proofs. This is a pre-requisite for enabling v2 ATXs on mainnet.
Closes #6143
Description
For this the existing malfeasance handler has been simplified again to only handle v1 proofs, with the goal of eventually retiring v1 malfeasance proofs in a future release. For malfeasance v2 new handlers and publishers were added.
Dedicated publishers for v1 and v2 proofs have been added, shifting the responsibility for publishing proofs from the handlers of components (
activation
,hare
etc.) to dedicated services. This also allows to simplify handling proof publication since the components now don't need to keep track any more if they are in sync or not before publishing a proof (the publisher now keeps track of this instead).The new DB table
malfeasance
requires foreign key constraints so these have now been enabled usingPRAGMA foreign_keys = ON;
. The new table will keep track of malicious identities and their proofs. The existing identities table will in future only be used to keep track of which identities belong to which marriage set. The proofs in them will be dropped when the publisher / handler of malfeasance v1 proofs are retired and existing proofs will be migrated to V2.The general pattern for handling malfeasance v2 proofs is:
self
(because we just published the proof) return without doing anything (proof is already validated and persisted during publish)The general pattern for publishing a malfeasance proof is:
activation
domain)Test Plan
TODO