gmaxwell noted in #30951 (comment) that addresses loaded from dns seeds and fixed seeds are still assumed to be v1, so a new node won't use v2transport for the first few connections it makes.
By now, the vast majority of reachable nodes (~80% according to https://bitnod.es/) in the network supports BIP324, and even if the optimistic guess would turn out to be wrong for a given node, we would just reconnect with v1.
This would also be necessary for a v2-only option (#30951), but I think it makes sense to change the default regardless of that PR.
Note that -seednode and addr-fetch connections already use v2transport by default.
p2p: Assume v2transport for addresses from seeds #35766
pull mzumsande wants to merge 1 commits into bitcoin:master from mzumsande:202607_seeds_v2 changing 2 files +10 −2-
mzumsande commented at 5:01 PM on July 21, 2026: contributor
-
cf0f2aeae0
p2p: Assume v2transport for addresses from seeds
By now, the vast majority of nodes in the network supports BIP324. Even if the optimistic guess would turn out to be wrong for a given node, we would just reconnect with v1. This is better than making v1 connections with peers when both nodes support v2.
- DrahtBot added the label P2P on Jul 21, 2026
-
DrahtBot commented at 5:01 PM on July 21, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35766.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline and AI policy for information on the review process.
Type Reviewers ACK w0xlt, sedited, willcl-ark, stratospher Concept ACK darosior, gmaxwell If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
sedited commented at 5:17 PM on July 21, 2026: contributor
Nice, Concept ACK
-
darosior commented at 5:50 PM on July 21, 2026: member
Concept ACK.
-
in src/protocol.h:374 in cf0f2aeae0
369 | + * Service flags we assume for addresses obtained from the DNS seeds and the 370 | + * fixed seeds, which don't come with service flags attached. 371 | + * BIP324 support can be safely assumed because the vast majority of listening nodes signals NODE_P2P_V2, and if the 372 | + * assumption is wrong for a given peer we simply reconnect using v1 transport. 373 | + */ 374 | +constexpr ServiceFlags SeedsAssumedServiceFlags() { return ServiceFlags(SeedsServiceFlags() | NODE_P2P_V2); }
darosior commented at 6:15 PM on July 21, 2026:What's the reason for keeping
SeedsServiceFlags()around now that it's only called by this function?
mzumsande commented at 6:42 PM on July 21, 2026:It determines the required flags that we ask the DNS seeds for, see https://github.com/mzumsande/bitcoin/blob/cf0f2aeae009c98615bffd4dafd74e46f20a0ae6/src/net.cpp#L2389. We don't require
NODE_P2P_V2from the seeds because it is not necessary - v1 nodes can continue to be returned from seeds because we can downgrade.
darosior commented at 7:02 PM on July 21, 2026:Right, should have actually read the code before commenting.
gmaxwell commented at 8:38 PM on July 21, 2026: contributorutACK
w0xlt commented at 10:45 PM on July 21, 2026: contributorACK cf0f2aeae009c98615bffd4dafd74e46f20a0ae6
DrahtBot requested review from darosior on Jul 21, 2026DrahtBot requested review from sedited on Jul 21, 2026sedited requested review from stratospher on Jul 22, 2026sedited approvedsedited commented at 8:01 AM on July 22, 2026: contributorACK cf0f2aeae009c98615bffd4dafd74e46f20a0ae6
fanquake added this to the milestone 32.0 on Jul 22, 2026willcl-ark approvedwillcl-ark commented at 10:46 AM on July 22, 2026: memberACK cf0f2aeae009c98615bffd4dafd74e46f20a0ae6
makes sense to be optimistic here, as we fallback gracefully already.
stratospher approvedstratospher commented at 12:46 PM on July 22, 2026: contributortested ACK cf0f2aea.
fanquake merged this on Jul 22, 2026fanquake closed this on Jul 22, 2026darosior commented at 1:49 PM on July 22, 2026: memberI think it makes sense to backport. It's a tiny patch that is also relevant for previous maintained versions.
fanquake referenced this in commit c02ff3e793 on Jul 22, 2026fanquake referenced this in commit 28234bd827 on Jul 22, 2026mzumsande deleted the branch on Jul 22, 2026sipa commented at 11:33 PM on July 22, 2026: memberPosthumous Concept ACK
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-11 11:51 UTC
More mirrored repositories can be found on mirror.b10c.me