-
Notifications
You must be signed in to change notification settings - Fork 718
perf - optimize State witness internal forwarding #13818
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
Conversation
// Store the part locally (as part owner) to avoid need for self-forwarding. | ||
if let Err(err) = partial_witness_tracker.store_partial_encoded_state_witness(partial_witness.clone()) { | ||
tracing::error!(target: "client", "Failed to store partial encoded state witness: {}", err); | ||
} |
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'd be better to move store_partial_encoded_state_witness
after sending the forward message.
Storing is potentially costly (could do reed solomon decoding), so it's better to first forward the message and then do the (potentially) expensive computation, the latency will be better.
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.
Yes, I think it makes sense to prioritize other validators before self
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #13818 +/- ##
=======================================
Coverage 69.52% 69.52%
=======================================
Files 960 960
Lines 185684 185702 +18
Branches 185684 185702 +18
=======================================
+ Hits 129090 129118 +28
+ Misses 51482 51473 -9
+ Partials 5112 5111 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This is a small optimization for how validators forward SW parts to themselves.
Before, the part owner was doing:
After this change it does: