GetScriptPubKeyMan spamming the logs with irrelevant message #21716

issue ben-kaufman opened this issue on April 17, 2021
  1. ben-kaufman commented at 7:55 AM on April 17, 2021: contributor

    In the current way in which GetScriptPubKeyMan is used, there are multiple places where it is expected to fail and return empty. When this happens, the function writes to the logs that the searched output type doesn't exist. Since this function is called in multiple places as part of a loop to search the output types which do exist, this logs gets outputted a lot, while it's really quite irrelevant and expected. In the current situation, it can sometimes practically spam the logs with this quite unclear and worrying message, while in fact it is completely expected and (at least mostly) irrelevant...

    I would suggest to either remove it or suppress it where it is used in a loop to search for the existing type. If this makes sense I'd be happy to submit a PR for this.

  2. practicalswift commented at 10:32 AM on April 17, 2021: contributor

    Can you provide some example log output (with any sensitive information removed) to illustrate the problem?

    I feel your pain generally: the log is part of the UI, and log spam is simply bad UI :)

  3. ben-kaufman commented at 1:02 PM on April 17, 2021: contributor

    Here's how it looks for example when loading a wallet:

    2021-04-17T07:21:28Z opencon thread start
    2021-04-17T07:21:30Z New outbound peer connected: version: 70016, blocks=679562, peer=1 (block-relay)
    2021-04-17T07:21:31Z New outbound peer connected: version: 70016, blocks=679562, peer=2 (full-relay)
    2021-04-17T07:21:39Z P2P peers available. Skipped DNS seeding.
    2021-04-17T07:21:39Z dnsseed thread exit
    2021-04-17T07:21:54Z New outbound peer connected: version: 70015, blocks=679562, peer=3 (full-relay)
    2021-04-17T07:21:57Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    2021-04-17T07:21:57Z init message: Loading wallet...
    2021-04-17T07:21:57Z Using SQLite Version 3.35.4
    2021-04-17T07:21:57Z init message: Loading wallet...
    2021-04-17T07:21:57Z [] Wallet File Version = 169900
    2021-04-17T07:21:57Z [] Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total. Unknown wallet records: 0
    2021-04-17T07:21:57Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:57Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:57Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:57Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:57Z [] Wallet completed loading in              98ms
    2021-04-17T07:21:57Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:57Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:57Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:57Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:57Z [] Wallet File Version = 169900
    2021-04-17T07:21:58Z [] Keys: 0 plaintext, 0 encrypted, 1806 w/ metadata, 0 total. Unknown wallet records: 0
    2021-04-17T07:21:58Z [] Wallet completed loading in             481ms
    2021-04-17T07:21:58Z ] setKeyPool.size() = 418
    2021-04-17T07:21:58Z [] mapWallet.size() = 125
    2021-04-17T07:21:58Z [] m_address_book.size() = 303
    2021-04-17T07:21:58Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:58Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:58Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:58Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:58Z [] setKeyPool.size() = 2000
    2021-04-17T07:21:58Z [] mapWallet.size() = 0
    2021-04-17T07:21:58Z [] m_address_book.size() = 0
    2021-04-17T07:21:58Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:58Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:58Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:58Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] External scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 0 does not exist
    2021-04-17T07:21:59Z [] Internal scriptPubKey Manager for output type 1 does not exist
    2021-04-17T07:21:59Z Using SQLite Version 3.35.4
    
  4. klementtan commented at 5:26 PM on May 7, 2021: contributor

    Created a PR(#21880) to attempt to fix this

  5. S3RK commented at 6:07 PM on June 29, 2021: member

    I believe we can just drop the log message in GetScriptPubKeyMan, all case when a log/error message is needed seemed to be covered by client-code #22334

  6. fanquake commented at 2:10 AM on July 1, 2021: member

    Closing this as fixed-by #19651.

  7. fanquake closed this on Jul 1, 2021

  8. S3RK commented at 10:23 AM on July 1, 2021: member

    #19651 only fixed a part of it. #22334 should fully address this issue

  9. DrahtBot locked this on Aug 18, 2022

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-15 21:14 UTC

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