fix(sync): do not count voided blocks towards repeated blocks limit#1520
Merged
fix(sync): do not count voided blocks towards repeated blocks limit#1520
Conversation
glevco
previously approved these changes
Dec 17, 2025
msbrogli
previously approved these changes
Dec 17, 2025
| return | ||
| assert self.tx_storage.indexes is not None | ||
| # XXX: check whether the block is part of the best chain | ||
| if self.tx_storage.indexes.height.get(blk.get_height()) == blk.hash: |
Member
There was a problem hiding this comment.
Another implementation would be to load the block and check whether it is voided or not. Not sure which one is best.
Member
Author
There was a problem hiding this comment.
I changed it to check the voided_by metadata.
b700c99 to
461dac2
Compare
|
| Branch | fix/prevent-repeated-blocks-sync-lock |
| Testbed | ubuntu-22.04 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result minutes (m) (Result Δ%) | Lower Boundary minutes (m) (Limit %) | Upper Boundary minutes (m) (Limit %) |
|---|---|---|---|---|
| sync-v2 (up to 20000 blocks) | 📈 view plot 🚷 view threshold | 1.69 m(-2.41%)Baseline: 1.73 m | 1.56 m (92.22%) | 2.08 m (81.32%) |
6c434e9 to
fc9ca48
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1520 +/- ##
==========================================
- Coverage 86.25% 86.24% -0.01%
==========================================
Files 437 437
Lines 33725 33726 +1
Branches 5265 5266 +1
==========================================
- Hits 29089 29088 -1
- Misses 3624 3625 +1
- Partials 1012 1013 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
glevco
approved these changes
Dec 18, 2025
msbrogli
approved these changes
Dec 18, 2025
fc9ca48 to
2497e29
Compare
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
Sync could dead-lock in rare case.
Acceptance Criteria
Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged