-
Notifications
You must be signed in to change notification settings - Fork 214
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
Fix store malfeasant ATX #5929
Fix store malfeasant ATX #5929
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v1.5 #5929 +/- ##
======================================
Coverage 80.4% 80.4%
======================================
Files 285 286 +1
Lines 29579 29736 +157
======================================
+ Hits 23804 23937 +133
- Misses 4168 4176 +8
- Partials 1607 1623 +16 ☔ View full report in Codecov by Sentry. |
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.
Specifically an ATX that isn't the first of an identity but references 0x000... as its previous ATX. Such an ATX might not contain a VRF nonce (...).
I don't understand, an ATX with previous=EMPTY that doesn't have a VRF nonce is syntactically invalid, isn't it?
You're right, the problem as a different one: blob already stored in |
Motivation
In specific cases storing an ATX will fail if it is malicious.
Description
atx.AddGettingNonce
might returnnil, nil
for an invalid initial ATX. Specifically an ATX that isn't the first of an identity but references0x000...
as its previous ATX. Such an ATX might not contain a VRF nonce so it will fail to store with the errorno nonce
when persisting the malfeasance proof.Additionally I made the check for a double
0x000...
previous ATX more efficient by just fetching the initial ATX of the identity rather than going through the complete chain to find the collision.Test Plan
Added a new test for the fix
TODO