Verification progress tests #17352

issue darosior opened this issue on November 2, 2019
  1. darosior commented at 2:55 PM on November 2, 2019: member

    While trying to test #17328, I noticed that:

    1. We don't test the verification progress (verificationprogress field in getblockchaininfo)
    2. The verification progress would always be 1 on regtest (even during IBD), both in the verificationprogress field of getblockchaininfo, or in the "new best" log message. (I tested this with 3 nodes, node 1 being the transaction spammer, node 2 the miner, node 3 the logger in both normal and blocksonly modes)

    Is 2) due to some regtest special behavior I don't know about ? .1) is not that bad since it seems to work well in main and test networks, but might be a good first issue ?

  2. laanwj added the label Tests on Nov 2, 2019
  3. laanwj added the label RPC/REST/ZMQ on Nov 2, 2019
  4. laanwj commented at 10:22 AM on November 4, 2019: member

    I think I'm starting to understand why, historically, there are no tests for this. The "verification progress" was added as at most a heuristic, and the tests should not set one particular way of estimating progress in stone as it might be improved or changed.

    A sanity check couldn't hurt, I guess.

  5. sipa commented at 12:18 PM on November 4, 2019: member

    It doesn't work for regtest because no statistics on transaction rate are known for regtest. It is not possible for the current approach to work on regtest.

    Just to clarify: progress is computed as the ratio between the total number of processed transactions and an estimate of the total number of transactions in the chain. The latter relies on statistics.

  6. darosior commented at 8:44 AM on November 7, 2019: member

    Ok thank you for the clarification ! I think I can close this then.

  7. darosior closed this on Nov 7, 2019

  8. 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