Open fasmat opened 1 month ago
Attention: Patch coverage is 63.98714%
with 112 lines
in your changes missing coverage. Please review.
Project coverage is 81.6%. Comparing base (
f5f96b9
) to head (ab0142b
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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