#35940 net: allow selecting BIP152 high-bandwidth peers with `-addnode`

ReviewabilityReviewsAgreementSize
#35940 w0xlt net: allow selecting BIP152 high-bandwidth peers with `-addnode`Waiting on author0Strong81 + 108 tests
  • Allow node operators to designate specific peers for persistent high-bandwidth compact block relay
  • Ensure multi-site setups and private peering links announce compact blocks immediately and after reconnects
  • Ready to review
  • Substantive concept support with no open objections
  • Supports explicit operator control over compact block peer selection and reusing -addnode (jeanpablojp)
  • Concept approval noting advanced operator control, while requesting more functional test coverage (Bicaru20)
  • 81 lines added or modified outside tests
  • 108 lines added or modified in tests
  • 16 lines removed in total
  • 8 files, 4 commits
P2P#54 of 71
P3 · new feature
  • P3 because it offers a niche opt-in improvement for operators with multi-site nodes or private peering
  • Automatic dynamic high-bandwidth peer selection already functions without manual configuration
Reviewability: ReadyStalePaused
Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets
Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs.
Size: lines added or modified outside tests, then in tests; greener = smaller.

Goal

This pull request adds an opt-in `=bip152-hb` suffix to the `-addnode` startup option, allowing operators to manually specify outbound peers that should immediately and permanently be requested to send BIP152 high-bandwidth compact block announcements. Connections matching these configured endpoints are sent `SENDCMPCT(high_bandwidth=true)` on handshake and upon reconnect, operating outside of and in addition to the automatic three-peer compact block rotation. The option is validated at startup to ensure it is not used in conjunction with `-blocksonly`.

Problem: Node operators cannot manually designate specific peers for high-bandwidth compact block relay based on out-of-band network topology knowledge. Currently, Bitcoin Core only selects up to three high-bandwidth peers dynamically based on who delivers blocks first, meaning low-latency peering links or private multi-site nodes must wait for automatic selection and risk losing their status upon reconnection.

Evidence of importance:

  • PR description: 'an operator may run nodes in multiple locations or maintain a stable, low-latency peering link and want that connection to announce compact blocks immediately and consistently, including after reconnects, instead of waiting for automatic selection.'

Scope: Refactors how -addnode options are passed into CConnman via AddedNodeParams structs, moving the v2 transport decision from CConnman::Init() to init.cpp.

Reviewability

Paused · Waiting on author

Open objections from Bicaru20 with no author reply for 17 days; review would repeat what has been asked.

Waiting on (from the thread read):

  • author: respond to suggestions from Bicaru20 for additional functional test coverage 2026-10-15
  • author: respond to test suggestions from Bicaru20 2026-10-15

Agreement

Strong

substantive support, no open objection (jeanpablojp, Bicaru20)

Thread notes: Added Concept ACK from Bicaru20 and recorded their two functional test suggestions, which are currently awaiting author response. Also captured the release note file naming question from jeanpablojp that was resolved. / Added Concept ACK and two functional test suggestions from Bicaru20. Recorded jeanpablojp's release notes naming remark as an answered suggestion.

Objections, suggestions, and questions:

ReviewerTypeHarm, request, or questionStatusMust beAuthor repliedQuote
jeanpablojp (contributor)question, maintenancewhether the release note file should be renamed to release-notes-35940.md before mergeanswered · author replied doneansweredyes2026-08-14: 'shouldn't this be renamed to `release-notes-35940.md` before merge?'
Status from: 2026-09-16: w0xlt: 'Done. Thanks.'
Bicaru20 (contributor)suggestion, correctnesstest the case where an -addnode value is empty but carries the bip152-hb suffixopenansweredno2026-10-15: 'I think we could also check the case where an -addnode` is empty but carries the suffix `bip152-hb` (`-addnode==bip152-hb`).'
Bicaru20 (contributor)suggestion, correctnessadd a test case where a configured peer disconnects and reconnects and is granted high-bandwidth mode againopenansweredno2026-10-15: 'We could add the test case where a configured peer disconnects and reconnects again on its own is granted the high-bandwidth mode again.'

Support:

  • jeanpablojp (contributor) (Concept ACK, 2026-08-14) [read]: 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. Reusing `-addnode` also made more sense to me than creating a dedicated option.
  • Bicaru20 (contributor) (Concept ACK, 2026-10-15) [read]: I think it’s a good addition to let users add their own high-bandwidth peers, as it gives them more control. I was initially worried about there being no cap on the number of user-selected high-bandwidth peers. However, since this will mostly be used by advanced users, it only affects the operator's

Participants:

  • jeanpablojp (contributor, support, 2 statements 2026-08-14 to 2026-08-14): Concept ACK, supports reusing -addnode and allowing operator-configured BIP152 cap override
  • Bicaru20 (contributor, support, 3 statements 2026-10-15 to 2026-10-15): Concept ACK, suggested additional test cases for empty addnode and peer reconnect

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

The short text the ranking pass compares across PRs.

This pull request allows node operators to designate specific outbound added nodes as BIP152 high-bandwidth compact block peers via a new =bip152-hb suffix on -addnode. Currently, Bitcoin Core automatically selects up to three high-bandwidth peers dynamically, preventing operators with dedicated low-latency peering links or multi-region nodes from guaranteeing immediate compact block announcements. Configured peers receive high-bandwidth requests at handshake and across reconnects without displacing or entering the dynamic three-peer rotation pool. Evidence of importance is limited to the author's description of operational needs for multi-datacenter node setups and dedicated peerings.

Data

dossier JSON · extract JSON · model ledger, generated 2026-10-16T01:17, confidence high, input hash f82e2450182608dc
thread read through 2026-10-15 (6 statements), head 3072e06744
labels: P2P

Categories

P2P

P3 · new feature

Adds an opt-in parameter allowing operators to manually select peers for persistent high-bandwidth BIP152 compact block relay. This provides a clear use case for operators running multi-site nodes or private peering links who need predictable compact block announcements, but automatic dynamic peer selection already functions and the addition is reasonably deferrable.

Membership: Labeled P2P and modifies peer connection management and compact block relay handling in src/net.cpp and src/net_processing.cpp.

Factors: security/stability 0, bug 0, performance 1, user value 2, leverage 0