net: allow selecting BIP152 high-bandwidth peers with -addnode

bitcoin/bitcoin: PR #35940

1 minor finding

Earlier concerns neither republished nor resolved: 1 major finding · 1 suggestion. See the Run archive for their assessments.

Findings

Link

[minor] · PR description advertises an unimplemented addnode suffix

The description advertises an addnode-only suffix, but the implementation exposes an address/listener permission that can also select explicitly permissioned inbound, RPC-created, and -connect peers.

Location: src/net_permissions.cpp:59 (head).

Details and suggested fix

-addnode=<host>[:port]=bip152-hb is not parsed: nonempty addnode values still pass through as connection targets. Instead, bip152hb uses the existing permission machinery. Directionless whitelist entries apply inbound, whitebind grants apply to peers accepted on that listener, and out entries match MANUAL target addresses, including untagged addnodes, the addnode RPC, and -connect. Connections without an explicit matching grant retain their existing behavior. The release note and inbound test agree with this implementation, so the mismatch is in the advertised interface rather than accidental inbound support. Update the PR title and description around -addnode=203.0.113.5 -whitelist=bip152hb,out@203.0.113.5, and explicitly describe the inbound, whitebind, and other MANUAL connection scope instead of promising they are unaffected.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.