#35940 net: allow selecting BIP152 high-bandwidth peers with `-addnode`
https://github.com/bitcoin/bitcoin/pull/35940 · · +189/-16 in 8 files, 4 commits · labels: P2P
Goal
- Let node operators guarantee immediate compact block announcements over dedicated low-latency links
- Allows manually specifying high-bandwidth peers outside the automatic three-peer limit
Adds an opt-in `=bip152-hb` suffix to `-addnode` configuration values, instructing the node to immediately send a high-bandwidth `SENDCMPCT(1)` request to that outbound peer upon connection and reconnection. Configured peers operate outside the default three-peer limit and automatic block-announcement rotation.
Problem: Bitcoin Core automatically chooses up to three BIP152 high-bandwidth peers based on which peers deliver blocks first, preventing operators with dedicated low-latency peering links from guaranteeing immediate compact block announcements.
Category: P2P (#35 of 65)
P3 · new feature
- P3 because it helps operators with custom peering setups guarantee fast compact block relay
- Provides an opt-in CLI configuration rather than resolving network-wide relay bottlenecks
Clear operational use case for node runners with known network topology, but deferrable as it introduces an opt-in CLI enhancement rather than addressing network-wide relay bottlenecks or security risks.
Membership: Modifies outbound peer compact block announcement negotiation and connection tracking in net and net_processing.
Factors: security/stability 0, bug 0, performance 1, user value 2, leverage 0
Reviewability: Ready
- Ready for review
- Applies cleanly with passing CI and previous feedback addressed
The branch applies cleanly, CI is passing, and previous reviewer feedback has been addressed.
Author status: active
Resolved concerns:
- Release note naming convention addressed in a push.
Agreement: Strong
- Concept support for allowing explicit operator override of the three-peer cap (jeanpablojp)
- No objections raised
Concept ACK from jeanpablojp supporting explicit operator override; no objections.
jeanpablojp explicitly supported overriding the BIP152 three-peer limit via operator opt-in and agreed with reusing -addnode.
- jeanpablojp: 'The opt-in override of the BIP152 three-peer cap seems fine to me, since it's an explicit operator choice, not a default, and it's disclosed upfront.'
Review verdicts (DrahtBot): 0
- Concept ACK: jeanpablojp
Files
109 lines under test/bench/ci.
- src/test/net_peer_connection_tests.cpp +48/-0
- test/functional/p2p_compactblocks_hb.py +39/-1
- src/init.cpp +23/-3
- src/net.cpp +25/-0
- test/functional/feature_config_args.py +21/-0
- src/net_processing.cpp +14/-5
- src/net.h +7/-7
- doc/release-notes-35940.md +12/-0
Card
Adds an opt-in `=bip152-hb` suffix to `-addnode` to request BIP152 high-bandwidth compact block announcements from specific outbound peers. Solves the inability of node operators with dedicated low-latency peering links or multi-node clusters to ensure immediate compact block relay without waiting for automatic rotation. It has received a Concept ACK endorsing the approach, with no open objections or blocking dependencies.