mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:50:37 +00:00
WIP: mining: use a steady clock for the getblocktemplate rebuild interval #36922
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!36922
Loading…
Reference in a new issue
No description provided.
Delete branch "block-template-manager-gbt-steady-clock"
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?
Based on #36356 and #36921. Only the last commit is new.
After a mempool change,
getblocktemplateonly rebuilds its cached template once it's more than 5 seconds old, and it measures that age with the system clock. That works fine in practice, but as pointed out in a review comment, a steady clock is the better fit for measuring an interval, since system time changes don't affect it.This switches to the steady clock, like #30372 did for
RandAddSeedPerfmon. Sincesetmocktimedoesn't move it,mining_prioritisetransaction.pynow waits out the 5 seconds, and the unit test uses a fake steady clock.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.
A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
mining_prioritisetransactioncheck that always passes by w0xlt)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.
Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive linked from the Review report for their assessments.
🟠 Minor · Template rebuilds cause false crashes in
rpcfuzzingSource inspection shows that
rpcfuzz inputs reachinggetblocktemplatecache rebuilding will abort; no execution was recorded, and immediate CI impact is unconfirmed.Location:
src/node/block_template_manager.cpp:74(head).Review coverage was incomplete.
Reviewed:
c229b812740f· Review report · Previous reportspermalink
🐙 This pull request conflicts with the target branch and needs rebase.