Unclear usecase of bitcoind option ‘blocknotify’ and missing definition of there mentioned “best block” #7430

issue ghost openend this issue on January 27, 2016
  1. ghost commented at 8:32 pm on January 27, 2016: none

    Bitcoin core 0.11.2 (bitcoind –help) prints the following: -blocknotify=<cmd> Execute command when the best block changes (%s in cmd is replaced by block hash) Neither in the Bitcoin wiki nor elsewhere ‘best block’ is mentioned. I would suggest to give a hint, what that is and to give an example why someone would want to be notified about the change of it.

    It seems to be in a complete other category than ‘alertnotify’ option, which, I guess, everyone would like to receive.

  2. jonasschnelli added the label Docs and Output on Jan 27, 2016
  3. jonasschnelli added the label Priority Low on Jan 27, 2016
  4. laanwj commented at 10:02 am on January 28, 2016: member

    The best block is the current “head” of the block chain. It is the chain with highest cumulative Proof-of-Work. You’d set this if you want to be notified of new blocks.

    Feel free to reword this into something better, but it’s easy to lose the subtle meaning (e.g., “the longest chain” won’t do - there may be a shorter chain with more work in it).

  5. jnewbery commented at 4:10 pm on November 22, 2016: member

    I disagree that best block should be defined in the help text since it’s difficult to succinctly summarise, it should be a well-understood term, and we shouldn’t add the same definition in many places.

    In fact, it’s already incorrectly defined in the getbestblockhash RPC as “Returns the hash of the best (tip) block in the longest blockchain.” That’s wrong, since the best block is the tip of the chain with the most work, not the tip of the longest chain.

    It’d be far better to make sure that best block is correctly defined at https://bitcoin.org/en/developer-documentation.

  6. laanwj commented at 6:09 am on November 23, 2016: member
    Good point @jnewbery. Sometimes terminology has to be used that can’t all be explained in a succinct help message. Closing this issue.
  7. laanwj closed this on Nov 23, 2016

  8. DrahtBot locked this on Sep 8, 2021

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: 2024-10-05 04:12 UTC

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