Repository navigation
doc: document -blocknotify, -walletnotify and other -*notify options - #35518
fernandguil wants to merge 1 commit into
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. External sites
ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste |
|
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. |
5a1e1d4 to
e205284
Compare
|
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 |
Adds doc/notifications.md describing the shell command notification options (-blocknotify, -walletnotify, -alertnotify, -startupnotify, -shutdownnotify), focusing on the cross-cutting threading and ordering behavior that is not described in the per-option help output, plus a list of the available options. Per-option details remain in --help. Partially addresses bitcoin#14278.
e205284 to
5801ce7
Compare
|
Thanks, all good points. Done: dropped the ZMQ comparison and the |
The -blocknotify command is suppressed for blocks connected during initial block download and reindexing (it only fires once the node is in the post-init sync state). Mention this in the option's help output. Suggested in review of #35518.
… help text d5e64b0 doc: note -blocknotify is not run during IBD/reindex in help text (Guillermo Fernandes) Pull request description: Adds a note to the `-blocknotify` help output that it is not executed for blocks connected during initial block download or reindexing (it only fires once the node reaches the post-init sync state). Suggested by sedited in review of #35518. ACKs for top commit: sedited: ACK d5e64b0 Tree-SHA512: 06b4a3c6354689e9846b5af6c210c3bb360b917477ac9506814c0238a1afb78392c4b6a6bbd51a4b9d98c841a1bc86686e90072155ce9a4f5e8f875cfe288c0c
|
I 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. |
The -blocknotify command is suppressed for blocks connected during initial block download and reindexing (it only fires once the node is in the post-init sync state). Mention this in the option's help output. Suggested in review of bitcoin#35518.
Ping @willcl-ark |

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.