[Draft] net: introduce block tracker to retry to download blocks after failure #35079
pull optout21 wants to merge 6 commits into bitcoin:master from optout21:block-dl changing 8 files +330 −10-
optout21 commented at 3:46 AM on April 15, 2026: contributor
-
a7fa33dca2
net: FetchBlock, disallow requesting blocks from network limited peers
This is in preparation for block tracker.
-
net: FetchBlock, disallow requesting block to the same peer multiple times bd8da8129f
-
net: introduce BlockRequestTracker b9b3677bf8
-
9371fa57a2
rpc: getblockfrompeer, connect block tracking mechanism and add coverage
If the initial block fetching process fails, the p2p layer will be in charge of fetching the block from 'any' connected peer. Re-trying to download the block from different peers until it is received.
-
d216f8ea18
rpc: getblockfrompeer, introduce fetch from "any" peer functionality
If no 'peer_id' is provided, 'getblockfrompeer' will delegate the peer selection to the internal block downloading logic.
-
1e36bbf6cd
rpc: getblockfrompeer, add one-shot block requests capability
Allowing what we had before, a single block request with no automatic retry nor tracking mechanism.
- optout21 closed this on Apr 15, 2026
-
DrahtBot commented at 3:46 AM on April 15, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process. A summary of reviews will appear here.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
LLM Linter (✨ experimental)
Possible typos and grammar issues:
- on-demamnd -> on-demand [Misspelling in the comment “Used to track on-demamnd block downloads …”, which harms clarity.]
Possible places where named args for integral literals may be used (e.g.
func(x, /*named_arg=*/0)in C++, andfunc(x, named_arg=0)in Python):pruned_node.getblockfrompeer(pruned_block_9, not_responding_peer_id, False)intest/functional/rpc_getblockfrompeer.py
<sup>2026-04-15 03:46:53</sup>
-
optout21 commented at 3:50 AM on April 15, 2026: contributor
Opened here by mistake (still private work-in-progress in my fork repo for now, https://github.com/optout21/bitcoin/pull/4).