mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 16:05:36 +00:00
rpc: clarify preciousblock help text #36415
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!36415
Loading…
Reference in a new issue
No description provided.
Delete branch "preciousblock-help"
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 preciousblock help says only "Treats a block as if it were received before others with the same work". This isn't wrong but could be clearer and it also leaves out cases that confuse users, including me (see discussion in #35300):
This adds both points to the help text and doesn't change any behavior.
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:
65896ac58ea63e29ad19d41b492e37f8722ac715Head:
15d092639957242d443a680d380f8df1def2bd4e🟡 Minor
Equal work does not ensure the requested block becomes active (src/rpc/blockchain.cpp:1716, head)
The RPC description implies that a block with the same work as the current tip will become active.
PreciousBlockonly adds the requested index back to the candidate set when it is transaction-valid and has chain transaction data. Otherwise, activation can leave the existing tip active while the RPC returns successfully. P2P header processing adds headers to the block index before block data arrives, so a known header-only branch can reach this case during normal download. Describe the call as preferring the block among eligible equal-work candidates, not as guaranteeing a switch.Review coverage was incomplete. The archaeology review had incomplete evidence. The adversarial_glm review did not complete.
Full review report
lgtm ACK
11bd28a567"If the submitted block"? we're talking about two blocks kinda mushed together
Good point, Done on
15d0926399. I used the word "specified" instead of "submitted" to avoid any confusion with submitblock.Thanks for the reviews. Force-pushed
15d0926399addressing https://github.com/bitcoin/bitcoin/pull/36415#discussion_r4167955974ACK https://github.com/bitcoin/bitcoin/pull/36415/commits/15d092639957242d443a680d380f8df1def2bd4e
lgtm ACK
15d0926399