-
Notifications
You must be signed in to change notification settings - Fork 211
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: Add invalid prev ATX proof #6310
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6310 +/- ##
=========================================
- Coverage 81.7% 81.6% -0.2%
=========================================
Files 312 313 +1
Lines 34637 34752 +115
=========================================
+ Hits 28327 28376 +49
- Misses 4479 4528 +49
- Partials 1831 1848 +17 ☔ View full report in Codecov by Sentry. |
a968426
to
de6c8a8
Compare
de6c8a8
to
cb6b5e7
Compare
cb6b5e7
to
1e3eaf0
Compare
1e3eaf0
to
5bb525e
Compare
@@ -1813,64 +1810,6 @@ func Test_MarryingMalicious(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestContextualValidation_DoublePost(t *testing.T) { |
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.
How about keeping the test to make sure this kind of malfeasance is detected?
// 4. Both marriage certificates have valid signatures. | ||
// | ||
// HINT: this works if the identity that publishes the marriage ATX marries themselves. |
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.
I think it's needed and enough to prove that the signers of the two ATXs are married.
// 4. Both marriage certificates have valid signatures. | |
// | |
// HINT: this works if the identity that publishes the marriage ATX marries themselves. | |
// 4. Signers of bots ATXs are married |
// ProofInvalidPrevAtxV2 is a proof that two ATXs published by an identity reference the same previous ATX for an | ||
// identity. |
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.
// ProofInvalidPrevAtxV2 is a proof that two ATXs published by an identity reference the same previous ATX for an | |
// identity. | |
// ProofInvalidPrevAtxV2 is a proof that two distinct ATXs reference the same previous ATX for one | |
// of the included identities. |
PreviousATXsRoot: types.Hash32(atx.PreviousATXs.Root()), | ||
PreviousATXsRootProof: prevATXsRootProof, | ||
|
||
PrevATXIndex: marriageIndex, |
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.
The previous ATX and marriage indexes mean different things and they are not usually equal.
Motivation
Closes #6309
Description
In the
sql/identities
packageactivation/wire
is imported which would cause a cyclic dependency when theidentities
package is used in theactivation/wire
package. Since the only function that requiresactivation/wire
isidentities. GetMalfeasanceProof
and that function was used primarily in tests I deleted it and replaced its usage withidentities.LoadMalfeasanceBlob
.identities.LoadMalfeasaneBlob
also had a bug where it would not returnsql.ErrNotFound
when an equivocation set is stored but that set hasn't been marked as malicious yet, instead it would return[]byte{}, nil
- which would cause broadcasting of empty proofs.Test Plan
TODO