-
Notifications
You must be signed in to change notification settings - Fork 648
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
chore: send partial witnesses faster #12640
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12640 +/- ##
==========================================
- Coverage 70.50% 70.48% -0.03%
==========================================
Files 845 845
Lines 172082 172243 +161
Branches 172082 172243 +161
==========================================
+ Hits 121329 121403 +74
- Misses 45645 45744 +99
+ Partials 5108 5096 -12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Please add links to supporting evidence that shows that this change has an improvement for posterity. |
While reviewing this, I noticed some unnecessary results so I created #12645. |
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.
LGTM but I think we should wait for @shreyan-gupta to approve before landing.
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.
Looks good, thanks!
&mut self, | ||
epoch_id: EpochId, | ||
chunk_header: &ShardChunkHeader, | ||
witness_bytes: EncodedChunkStateWitness, | ||
chunk_validators: &[AccountId], | ||
signer: &ValidatorSigner, | ||
) -> Result<Vec<(AccountId, PartialEncodedStateWitness)>, Error> { | ||
) -> Result<(), Error> { |
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.
you might have to wait for Akhi's PR to land
chain/client/src/stateless_validation/partial_witness/partial_witness_actor.rs
Outdated
Show resolved
Hide resolved
@@ -343,7 +347,7 @@ impl PartialWitnessActor { | |||
let encode_timer = metrics::PARTIAL_WITNESS_ENCODE_TIME |
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.
PARTIAL_WITNESS_ENCODE_TIME
metric no longer represents time to just encode. We can perhaps rename to PARTIAL_WITNESS_ENCODE_AND_SEND_TIME
. Please quickly ping @pugachAG and let him know about this change in behavior.
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 it worth specifying it? I guess it just adds a message to the channel on every iteration which should not be expensive
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.
Actually it can block if the channel is bounded and full but I am struggling to understand the macro to be sure
This PR sends the partial witnesses to the corresponding peer immediately as they are created. Previously, sending only started after all of them were created