-
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
[Merged by Bors] - Add invalid post malfeasance #6308
Conversation
3e94b7e
to
39883a2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6308 +/- ##
=========================================
- Coverage 79.8% 79.8% -0.1%
=========================================
Files 341 343 +2
Lines 44205 44505 +300
=========================================
+ Hits 35317 35527 +210
- Misses 6895 6976 +81
- Partials 1993 2002 +9 ☔ View full report in Codecov by Sentry. |
efe056f
to
28a5fb1
Compare
99f15b6
to
e84b2f5
Compare
47e2b58
to
65dd8b6
Compare
76edcc7
to
b64cf35
Compare
541673b
to
86f4785
Compare
170e466
to
fa19a2a
Compare
6349b9b
to
cb7ccaa
Compare
bors merge |
## Motivation Closes #6141. This PR adds the Malfeasance proof needed to show that an identity produced an invalid post. Supports both solo and merged ATXs.
Build failed: |
bors merge |
## Motivation Closes #6141. This PR adds the Malfeasance proof needed to show that an identity produced an invalid post. Supports both solo and merged ATXs.
Build failed: |
TestPartition_30_70 failed because 4 pods were re-deployed shortly before the end of the test bors merge |
## Motivation Closes #6141. This PR adds the Malfeasance proof needed to show that an identity produced an invalid post. Supports both solo and merged ATXs.
Build failed: |
bors merge |
## Motivation Closes #6141. This PR adds the Malfeasance proof needed to show that an identity produced an invalid post. Supports both solo and merged ATXs.
Pull request successfully merged into develop. Build succeeded: |
Motivation
Closes #6141. This PR adds the Malfeasance proof needed to show that an identity produced an invalid post. Supports both solo and merged ATXs.
Description
This PR adds some additional methods to the ATX wire types to deduplicate code that is needed to create and validate malfeasance proofs. This also reduces the code needed for the
ProofDoubleMarry
andProofInvalidPost
proofs significantly. I will also re-base #6339 and #6310 to use the new helpers in the wire package and reduce code duplication.The interface for
ATXProof.Proof
has been updated to use aMalfeasanceValidator
instead of a*signing.EdVerifier
, since more than just signatures are validated with some malfeasance proofs. The new interface is defined in thewire
package and the current implementation is part of theactivation.Validator
type but will be moved to the malfeasance handler and/or publisher in #6307 (which will get rid of the open TODO there).IMPORTANT: ID calculation for ATXv2 changed - when we merge this we cannot just update atxmerge testnets without causing problems. This change was necessary because some leaves in the ATXID tree were not
Hash32
which still lets one calculate the root of the tree, but causes problems when trying to validate a merkle proof against it.atxTreeHash
now uses theblake3.Hash
pool that we have, before it initialized a new hasher on every call which was expensive and is not needed if an existing instance can be reused from the pool, this more than tripled execution time of the tests in theactivation/wire
package on my machine.Test Plan
Several unit tests were added to test the functionality of the invalid post proof.
TODO