mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 15:11:38 +00:00
test: remove some avoidable test waits #36446
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!36446
Loading…
Reference in a new issue
No description provided.
Delete branch "speedup-tests"
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?
A few of our longer-running tests have some unnecessary waits and timeouts in them. Reduce or replace them to shorten test times:
p2p_node_network_limitedreplace the expected sync timeout with header/ping barriers and a bounded negative check. At CI timeout factor 40, saves roughly 195 seconds per transport.interface_ipc_miningcap three expected no-event waits at five seconds, saving roughly 105 seconds at factor 40 in CI.WalletLoadingDescriptorshonor sanity mode’s single epoch, avoiding four unnecessary wallet unload/load cycles.BasicTestingSetupavoiding construction of two unused 100-block chains.The timeout changes alone save approximately eight minutes of accumulated test-worker time on CI jobs running both transports and IPC mining. Wall-clock savings depend on parallel scheduling, CPU etc.
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.
I run these on free GHA runners here: https://github.com/willcl-ark/bitcoin/actions/runs/37357329900
Base:
acaf322fc438e6bd180b23189a5661c8f02d88fbHead:
ce1d88b2632cc3950f47d8b191bdd74b806eb3aeDesign and approach
Bound readiness waits (test/functional/p2p_node_network_limited.py:147, head)
Both readiness barriers use
wait_until’s default 60-second timeout, scaled bytimeout_factor. At factor 40, either can stall for up to 40 minutes before the bounded negative check runs. The replacedsync_blockswait was bounded at 5 seconds before scaling, or 200 seconds at factor 40. Give the readiness phase an explicit, shared timeout budget suited to these local-node exchanges while allowing for slow CI.Review coverage was incomplete. The archaeology review had incomplete evidence. The alternatives experiment had incomplete evidence.
Full review report
tACK
ce1d88b263Built on macOS (arm64) and compared against master:
p2p_node_network_limited.py: 15 s → 8–9 s (v1 and v2 transport)interface_ipc_mining.py --timeout-factor=10: 50 s → 34 swallet_disableprivkeys + dummy_input_size_test: pass, small speedup (user CPU 0.15 s → 0.11 s)WalletLoadingDescriptors: normal results unchanged (~335 ms/op), as expected;-sanity-checkruns fineAll
wallet_testspasscc @ViniciusCestarii
review ACK
ce1d88b263🐠Show signature
Signature:
nit in
06cb869112: Is the ensure_for needed? There is no "trickle delay" for blocks, so just a plainassert_equallike before should be enough?ACK
ce1d88b263Checked the speed ups on CI and it looks pretty good! "test: avoid unused wallet test chains"
ce1d88b263doens't seem to speed up much, but it is a fine change.There are also other issues and typos in the test, so I fixed it in https://github.com/bitcoin/bitcoin/pull/36541