log, doc: Confusing log message #17139

issue hebasto opened this issue on October 14, 2019
  1. hebasto commented at 7:50 PM on October 14, 2019: member
    bitcoind -par=1
    

    Excerpt from the debug.log:

    Using 0 threads for script verification
    

    Zero? I guess not ;)

  2. hebasto added the label Bug on Oct 14, 2019
  3. laanwj commented at 6:33 AM on October 15, 2019: member

    It's always been like that. It doesn't count the main thread in that message. "Threads" counts the extra threads. Feel free to change it to:

    Using 0 additional threads for script verification
    
  4. hebasto commented at 6:53 AM on October 15, 2019: member

    "Threads" counts the extra threads.

    But setting -par=2 gets "Using 2 threads for script verification".

  5. laanwj removed the label Bug on Oct 15, 2019
  6. laanwj added the label Utils/log/libs on Oct 15, 2019
  7. laanwj commented at 12:04 PM on October 15, 2019: member

    Huh.

  8. jnewbery commented at 9:50 PM on October 31, 2019: member

    EDIT: Corrected number of dedicated script-checking threads (thanks @sipa)

    Here's the help message:

      -par=<n>
           Set the number of script verification threads (-4 to 16, 0 = auto, <0 =
           leave that many cores free, default: 0)
    

    The behavior is confusing here:

    • not having a par setting, setting -par=0 or setting -nopar: defaults to starting GetNumCores() - 1 dedicated script-checking threads
    • setting -par=1: starts no dedicated script-checking threads and does all script-checking on the main thread. This is confusing and undocumented!
    • setting -par=n for n > 1: starts n - 1 dedicated script-checking threads (up to a max of 16)
    • setting -par=-n for n > 1: starts GetNumCores() - n dedicated script-checking threads. This is weird but at least it's documented!
  9. sipa commented at 10:00 PM on October 31, 2019: member

    No, -par=N should start N-1 script checking threads, as the main thread always participates (so there should always be N threads in total doing script verification, for N>=1).

  10. laanwj closed this on Nov 1, 2019

  11. sidhujag referenced this in commit d304bb9664 on Nov 1, 2019
  12. sidhujag referenced this in commit 9b70d9e0ff on Nov 10, 2020
  13. PastaPastaPasta referenced this in commit 213c668e2f on Jun 27, 2021
  14. PastaPastaPasta referenced this in commit 7bc7dca5cb on Jun 28, 2021
  15. PastaPastaPasta referenced this in commit ceffbae448 on Jun 29, 2021
  16. DrahtBot locked this on Dec 16, 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: 2026-04-13 15:14 UTC

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