mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:47:36 +00:00
doc: document -blocknotify, -walletnotify and other -*notify options #35518
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!35518
Loading…
Reference in a new issue
No description provided.
Delete branch "doc/notify-options"
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?
Partially addresses #14278, which asks for documentation of the user-facing
-*notifybehaviors. The five shell-command notification options currently have no documentation outside of--helptext, and several behaviors are only discoverable by reading the source.Adds
doc/notifications.md(indexed indoc/README.md) covering:-blocknotifysrc/init.cpp,NotifyBlockTip_connecthandler)-walletnotifyCWallet::transactionRemovedFromMempool)%s,%b,%h,%w) and the Windows limitation for%w-alertnotifysrc/node/kernel_notifications.cpp)-startupnotify/-shutdownnotifysrc/init.cpp)All described behavior is derived directly from the source.
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.I don't think exhaustively documenting every command here is useful, and would prefer that the command-level docs continue to live in the help output / man page. Some of the documentation there could be expanded a bit, for example with the behaviour during IBD described here. The doc introduced here could be distilled down to a single paragraph explaining threading and ordering behaviour plus a list of the commands.
Thanks for the feedback. I've distilled the doc down to a single paragraph on the threading/ordering behavior plus a list of the options, leaving the per-option details in
--help. I've also opened #35586 to add the IBD/reindex note to the-blocknotifyhelp text, per your suggestion.I would drop this entire sentence about zmq. This is obvious for developers that know what zmq is.
nit: Skip the em dash. Just make this two sentences.
I'm not sure I agree with this last sentence. It is already qualified that events may fire out of order, but internally they seem consistent to me. I would drop this sentence too.
Thanks, all good points. Done: dropped the ZMQ comparison and the
-shutdownnotify"return quickly" sentence, and split the em-dash sentence in two.ACK
5801ce70b3I will take a look here soon.
I did once have a got at correcting this myself with the intention of closing out #14278 in one go, but the branch may be outdated now: https://github.com/willcl-ark/bitcoin/tree/callback-docs-cleanup
I remember adding a few tests for guarantees I we were giving but were untested (see commits in the branch), that may be something we want to do here too, if it makes sense...
edit: yeah re-reading my old branch I don't feel that happy with it now, I have now updated it and will compare with this branch soon
I'm not sure if we really want to guarantee order. It just seems like a brittle thing to be promising. The tests might also not fully capture the ordering guarantee. A test exercising ordering between e.g. rpc and zmq might not catch something in a different component, or in some edge case that we didn't happen to think of. Has anybody complained about this since the original issue was opened? I can also see an argument for it though: We implicitly guarantee order and unwittingly changing something might break somebody's deployment.
Agreed, and ordering (or really any notification legitimacy) is called out here in my branch as basically never being guaranteed:
The tested guarantees I was talking about are here as standalone commits.
Ping @willcl-ark
No verified findings are available from this review.
Review coverage was incomplete.
Reviewed:
5801ce70b34b· Full review report · Previous reportspermalink