-
Notifications
You must be signed in to change notification settings - Fork 619
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
[stateless_validation] Allow sending partial witness to self #12026
[stateless_validation] Allow sending partial witness to self #12026
Conversation
…ation/endorsement_to_self
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12026 +/- ##
==========================================
- Coverage 71.53% 71.53% -0.01%
==========================================
Files 814 814
Lines 164514 164507 -7
Branches 164514 164507 -7
==========================================
- Hits 117689 117677 -12
- Misses 41659 41665 +6
+ Partials 5166 5165 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
if validate_partial_encoded_state_witness( | ||
self.epoch_manager.as_ref(), | ||
&partial_witness, | ||
&signer, | ||
&self.store, | ||
)? { | ||
// Store the partial encoded state witness for self. |
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 guess this is no longer needed because we anticipate receiving via self-message instead?
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.
Yep!
.store_partial_encoded_state_witness(partial_witness.clone())?; | ||
// Forward the part to all the chunk validators. | ||
self.forward_state_witness_part(partial_witness, &signer)?; | ||
self.forward_state_witness_part(partial_witness)?; |
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.
Is there any concern that we will forward the part twice (or even infinitely many times) because self-sending triggers it?
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 don't think that should be the case as we only call the forward function for handling PartialEncodedStateWitnessMessage
(and not PartialEncodedStateWitnessForwardMessage
).
Logically, it's a one way stream, PartialEncodedStateWitnessMessage -> forward -> PartialEncodedStateWitnessForwardMessage -> store
…gin' into shreyan/stateless_validation/partial_witness_to_self
Follow up on #12022
This PR removes the special case handling for sending partial witnesses to owners where we are one of the owners.
Before this we had special case handling storing and sending partial witness if we were the owner of a specific partial witness part.