mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:47:36 +00:00
test: make orphanage_dos_many fill the orphanage #36407
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!36407
Loading…
Reference in a new issue
No description provided.
Delete branch "test-orphanage-dos-many-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?
test_orphanage_dos_manychecks that a normal peer's orphan survives while DoS peers flood the orphanage. I found that the orphanage never fills: the 60 peers send the same 51 orphans astx, and atxalready held as an orphan is dropped inReceivedTxwithout recording its sender. The orphanage peaks at 152 announcements against a limit of 3000, so nothing is evicted.Here the first peer sends the orphans and the other 59 announce them by
inv, which does add them as announcers. The test now asserts that the orphanage holds 3000 announcements, instead of asserting on what it sends. It takes about as long as before.If
LimitOrphansis changed to evict the normal peer's orphan first, the test used to pass and now fails. (test_orphanage_dos_largealready catches that change.)Found while porting these tests to https://github.com/btclib-org/bitcoin-node-tests.
Made with my usual tools: a computer, the Internet and an LLM. The mistakes, as usual, are all mine.
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.Base:
7988380da987c0b860885853ace8149b84ac2ee8Head:
86ff13a0af0679ee0c725bac9c64c3e373cb0283No verified findings are available from this partial review.
Review coverage was incomplete. The archaeology review had incomplete evidence. The adversarial review had incomplete evidence.
Full review report
ACK
86ff13a0afI remember writing/reviewing this slop, thanks for fixing it with something we didn't consider!
Test failure seems unrelated
tACK
86ff13a0afLogged the total number of announcements right after peers are synced
self.log.info(f"announcements: {sum(len(o['from']) for o in node.getorphantxs(verbosity=1))}")on master:
2026-10-19T12:56:46.099833Z TestFramework (INFO): announcements: 51Duplicate txs dropped, so the orphanage never reaches its limit
this pr:
2026-10-19T13:03:07.679566Z TestFramework (INFO): announcements: 3000Orphanage is full, limit is reached