mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:26:38 +00:00
test: cover the feature-negotiation version boundary in p2p_leak #36152
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36152
Loading…
Reference in a new issue
No description provided.
Delete branch "2026-09-test-wtxidrelay-version-boundary"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
p2p_leak already checks that a pre-wtxidrelay peer (nVersion 70015) is sent neither WTXIDRELAY nor SENDADDRV2, but nothing pins down the exact boundary: the feature negotiation messages are offered when the common version is >= WTXID_RELAY_VERSION (70016).
Add a peer advertising exactly 70016 and assert it receives both messages, so an off-by-one change of either
greatest_common_version >= WTXID_RELAY_VERSION/>= 70016comparison to>is detected.It kills https://bitcoincore.space/src/net_processing.cpp#3462 and https://bitcoincore.space/src/net_processing.cpp#3464
edit: added a commit that adds a test case that checks
SENDTXRCNCLis sent at version 70016. The existing 70015 case only shows SENDTXRCNCL is withheld below the wtxidrelay version. Add a peer at exactly 70016 so the lower bound of the>= WTXID_RELAY_VERSIONcheck is covered too. It kills: https://bitcoincore.space/src/net_processing.cpp#3466.The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Concept ACK, ( not sure if this is out of scope). I think it would be great to kill https://bitcoincore.space/src/net_processing.cpp#3466 in this PR as well.
I did this in https://github.com/naiyoma/bitcoin/pull/22/changes/b7bdb41050cb20c80a72a9584fd52b4a6d45cdda
Not out of scope, it's a simple test case and related so I just pushed adding it here as well. Thank you.
tACK
2fabbc0bb3Compiled and ran test/functional/p2p_leak.py on macOS. Everything passes.
tACK
2fabbc0bb3generated and analyzed mutants locally, all 3 killed
Base:
65896ac58ea63e29ad19d41b492e37f8722ac715Head:
2fabbc0bb38d0b87913d16777e25497ee6d017f0No verified findings are available from this partial review.
Review coverage was incomplete. The archaeology review had incomplete evidence. The adversarial_glm review did not complete.
Full review report
ACK
2fabbc0bb3