-
Notifications
You must be signed in to change notification settings - Fork 106
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
change(state): Check block and transaction Sprout anchors in parallel #5742
Conversation
18f3d33
to
17aa356
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5742 +/- ##
==========================================
+ Coverage 78.74% 78.77% +0.03%
==========================================
Files 306 306
Lines 38687 38702 +15
==========================================
+ Hits 30463 30488 +25
+ Misses 8224 8214 -10 |
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.
We try to only make performance-related changes where we have evidence of slow code or a denial of service risk.
Otherwise, we could spend a lot of time modifying code that's not performance critical, making it harder to maintain. And sometimes the setup costs exceed any performance gains.
Failed due to:
@gustavovalverde any idea why this is happening? |
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.
Thanks, looks good!
Failed due to #5384 |
This will need a rebase, anyone can re-approve once that's done. |
b8d18d8
to
fb37958
Compare
Failed due to a temporary network error:
|
Failed due to #5384 again. |
@Mergifyio refresh |
✅ Pull request refreshed |
…#5742) * parallelize anchors checks for blocks * parallelize anchors checks for unmined_tx * reverts par_iter in block_sapling_orchard_anchors_refer_to_final_treestates * moves fetch_sprout_final_treestates out of rayon thread
Motivation
We want to run these anchor verifications on a CPU-bound thread pool.
Solution
sprout_anchors_refer_to_treestates(..)
for a block ifsprout_final_treestates
is not empty.in_place_scope_fifo
for running sprout anchors checks on anUnminedTx
if the transaction has sproutjoinsplit_data
Review
Anyone can review.
Reviewer Checklist