mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 15:08:38 +00:00
test: look for the wtxid in p2p_blocksonly #36405
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!36405
Loading…
Reference in a new issue
No description provided.
Delete branch "test-blocksonly-wtxid-inv"
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?
In
blocks_relay_conn_tests, the check that a transaction submitted over RPC is not announced to a block-relay-only peer looks for its txid among the peer's invs. The peer is aP2PTxInvStore, which negotiates wtxidrelay, so an announcement would carry the wtxid. The MiniWallet transaction has a witness, so its txid and wtxid differ, and the check passes whether or not the node announces it.This checks the wtxid instead. To see the difference, open that connection as
outbound-full-relay: the old check still passes, the new one fails. It also adds anoutbound-full-relaypeer that must receive the wtxid announcement first, so the check cannot pass silently again.#35920 also edits
blocks_relay_conn_tests; the two do not conflict.Found while porting these tests to https://github.com/btclib-org/bitcoin-node-tests.
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.Conflicts
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Base:
a773e1e33b349dc819b5a0edc1c7a4839dc73b48Head:
22535b460568be47e57aadfbe50d489becb77577Alternatives
Also assert the txid is absent from the block-relay-only peer. Keep the full-relay wtxid positive assertion and the restricted-peer wtxid absence assertion, and add a restricted-peer absence assertion for the txid. Benefit: Detects a leaked MSG_TX announcement as well as the expected MSG_WTX announcement, even if the restricted peer’s relay identifier differs from the one the positive control observes. Trade-off: Adds one assertion and retains both identifiers in the test’s local setup. Unresolved: The existing inventory store records hashes for MSG_TX and MSG_WTX without retaining their types, so this remains limited to those stored inventory types.
Full review report
Concept Ack
maybe there should be another peer to check it is received for it? Otherwise the test will likely silently break again in the future?
Done in
c765571. I added an outbound-full-relay peer that must receive the wtxid announcement before the block-relay-only peer is checked, so the test fails if the node stops announcing the transaction or announces it under another id.There is no need to wait for a broadcast, when not using the unbroadcast set for this test. Also, with mocktime, this should probably be a sync_with_ping instead?
Finally, the point was that the test has the relevant assert directly inside, so that it is somewhat "self-checking". So the difference between the two asserts is just the
not.Thanks, done in
22535b4. I dropped the wait and sync both peers with a ping; the two asserts now differ only bynot.lgtm ACK
22535b4605ACK
22535b4605Ran p2p_blocksonly.py with v1 and v2 transport. With conn changed to outbound-full-relay, the new assertion fails while the old txid check still passes. Using txid in both assertions also fails at the positive control.
ACK
22535b4605Backported to
32.xin #36727.ralph referenced this pull request2026-11-05 11:30:09 +00:00
ralph referenced this pull request2026-11-16 19:07:04 +00:00