feat(block-template): shuffle possible tx-parents to avoid bias#1439
Merged
feat(block-template): shuffle possible tx-parents to avoid bias#1439
Conversation
|
| Branch | feat/shuffle-block-template-parents |
| Testbed | ubuntu-22.04 |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | minutes (m) |
|---|---|---|
| sync-v2 (up to 20000 blocks) | 📈 view plot | 2.09 m |
489319d to
7362b31
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1439 +/- ##
==========================================
+ Coverage 85.97% 86.02% +0.05%
==========================================
Files 434 435 +1
Lines 33829 33921 +92
Branches 5315 5298 -17
==========================================
+ Hits 29083 29182 +99
+ Misses 3697 3693 -4
+ Partials 1049 1046 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
glevco
approved these changes
Oct 2, 2025
7362b31 to
299b9b8
Compare
299b9b8 to
bdcd206
Compare
glevco
approved these changes
Oct 15, 2025
msbrogli
approved these changes
Oct 15, 2025
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This list always had the same order, in some cases it could be that mining clients using the block-templates APIs would only ever get the first or first two items in the list to make a mining block, which could lead to cases where the last transactions in the list aren't picked. A shuffle at this stage gives all transactions a high change of being picked over just a few blocks.
Acceptance Criteria
BlockTemplate.parents_anybefore sending it in APIsChecklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged