mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 09:38:38 +00:00
fuzz: check GetStale() returns exactly the stale private broadcast txs #36670
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!36670
Loading…
Reference in a new issue
No description provided.
Delete branch "2026-10-fuzz-private-broadcast-stale-check"
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?
The
private_broadcastfuzz test checks each tx thatGetStale()returns. This adds to it by checking that all stale txs are returned.ReattemptPrivateBroadcast()only retries whatGetStale()returns, and a stale tx left out is never retried.This partly came up during review in https://github.com/bitcoin/bitcoin/pull/35129#pullrequestreview-4427536924, and recently also surfaced in https://mutanthub.space/mutants/3752 , where changing
continuetobreakinGetStale()passes all current tests.This PR records when each tx is added and when each node confirms it. Then it checks that
GetStale()returns exactly the expected txs.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.🔵 Suggestion · Erase timing entries when transactions leave the model
Neither Add() cleanup (lines 92-97) nor Remove() (lines 151-153) erases the PR-added
time_addedmap, so departed CTransactionRefs pile up during an input of up to 10,000 operations. Lookups only touch live transactions, so this is a cleanup issue, not a correctness bug.Location:
src/test/fuzz/private_broadcast.cpp:92(head).Review coverage was incomplete.
Reviewed:
4f3dcb76ab35· Full review report · Previous reportspermalink
cc @vasild @andrewtoth
We can also assert that stale does not return any duplicates.
Thanks, done in
4f3dcb7.ACK
4f3dcb76abFuzzed this PR for an hour on 4 CPUs, with no issues.
I think a worthwhile refactor would be to collect all these individual maps and sets into two maps of structs for CTransactionRef and NodeId.
ACK
4f3dcb76abI agree. Probably worth a follow-up at some point.