doc: fix wording of alertnotify to match behaviour #24072

pull willcl-ark wants to merge 1 commits into bitcoin:master from willcl-ark:alert_notify changing 1 files +1 −1
  1. willcl-ark commented at 1:57 PM on January 14, 2022: member

    The documentation of the alertnotify startup option no longer matches the implementation.

    Currently the alert is only triggered by DoWarning (as part of CChainstate::UpdateTip when blocks containing unknown versionbits are detected on the network, indicating that there may be an upcoming softfork which you don't know about), but not when we see a "really long fork":

    https://github.com/bitcoin/bitcoin/blob/2825c41a6121524bc647002cbb4258cbf701a14b/src/validation.cpp#L2418-L2433

    I think it would be desirable in a follow-up PR to implement the logic to alert on a (really) long fork, but not to alert for "partition detection" (abnormally slow/fast blocks). PartitionChecker code was removed in ab8be98fdb25b678a8cd7e89adf06d1b1f6bdd62

  2. fanquake added the label RPC/REST/ZMQ on Jan 14, 2022
  3. ghost commented at 2:17 PM on January 14, 2022: none

    The documentation of the alertnotify RPC no longer matches the implementation.

    -alertnotify is a config option which can also be used as command line parameter with bitcoind. Its not one of the RPC commands.

  4. willcl-ark commented at 2:21 PM on January 14, 2022: member

    The documentation of the alertnotify RPC no longer matches the implementation.

    -alertnotify is a config option which can also be used as command line parameter with bitcoind. Its not one of the RPC commands.

    Whoops, amended

  5. willcl-ark renamed this:
    rpc: fix wording of alertnotify to match behaviour
    doc: fix wording of alertnotify to match behaviour
    on Jan 14, 2022
  6. willcl-ark force-pushed on Jan 14, 2022
  7. MarcoFalke added this to the milestone 23.0 on Jan 14, 2022
  8. in src/init.cpp:395 in f10ec6f2f5 outdated
     391 | @@ -392,7 +392,7 @@ void SetupServerArgs(ArgsManager& argsman)
     392 |  
     393 |      argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
     394 |  #if HAVE_SYSTEM
     395 | -    argsman.AddArg("-alertnotify=<cmd>", "Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
     396 | +    argsman.AddArg("-alertnotify=<cmd>", "Execute command when unknown versionbits are detected in blocks (%s in cmd is replaced by message)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    


    vincenzopalazzo commented at 8:36 AM on January 15, 2022:

    Do you think here that it is better to avoid using "technical" words, like versionbits?

    IMO, this is useful to make the command line more friendly?


    willcl-ark commented at 8:41 AM on January 15, 2022:

    Sure I agree up to a point, however I think priority should be given to providing precise (and concise) information. What the user does with that information afterwords is up to them.


    luke-jr commented at 10:26 PM on January 15, 2022:

    This is too precise: older and potentially newer versions may have different alerts.


    josibake commented at 3:11 PM on January 18, 2022:

    I agree that versionbits is perhaps too precise. The exact wording of the warning is Unknown new rules activated, so maybe an alternative could be "Execute command when unknown rules are activated", or something along those lines?


    luke-jr commented at 5:52 PM on January 18, 2022:

    Just because that's the only alert at the moment, doesn't mean other future alerts won't trigger this


    josibake commented at 5:55 PM on January 18, 2022:

    correct - but this the only alert currently enabled. we should definitely take out wording that incorrectly says this will alert if there is a long fork. in the future, if we enable other alerts, we should then revisit the language to make it more general


    josibake commented at 5:56 PM on January 18, 2022:

    alternatively, we could just make it "Execute command when a relevant alert is received" and then leave it to the user to determine which alerts are enabled. that would be an improvement over what we have now


    willcl-ark commented at 7:52 AM on January 28, 2022:

    OK, I updated this wording to "Execute command when an alert is raised" which I think is general enough to cover any future alerts added (or historical alerts).

  9. josibake commented at 3:13 PM on January 18, 2022: member

    Concept ACK

    Good catch! Suggestion on the wording inline

  10. doc: fix wording of alertnotify
    Since the removal of the PartitionChecker code in ab8be98fdb25b678a8cd7e89adf06d1b1f6bdd62
    the documentation of alertnotify no longer matches the implementation.
    
    Instead simply document that alertnotify will be called when "an alert
    is raised".
    6981de4435
  11. willcl-ark force-pushed on Jan 28, 2022
  12. MarcoFalke added the label Docs on Jan 28, 2022
  13. MarcoFalke removed the label RPC/REST/ZMQ on Jan 28, 2022
  14. achow101 commented at 7:46 PM on February 17, 2022: member

    ACK 6981de4435573ad44ee53fd5efc10894866ed2f9

  15. MarcoFalke merged this on Feb 21, 2022
  16. MarcoFalke closed this on Feb 21, 2022

  17. sidhujag referenced this in commit 0dc51c4b3b on Feb 22, 2022
  18. PastaPastaPasta referenced this in commit 6bf1ba30b7 on Jun 19, 2022
  19. PastaPastaPasta referenced this in commit 4452081dab on Jun 19, 2022
  20. PastaPastaPasta referenced this in commit fd8ac6f563 on Jun 19, 2022
  21. PastaPastaPasta referenced this in commit 093252cba6 on Jun 27, 2022
  22. DrahtBot locked this on Feb 21, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me