Perform CVerifyDB on pcoinsdbview instead of pcoinsTip #4768

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2014_08_verifydb changing 4 files +5 −5
  1. laanwj commented at 7:28 AM on August 27, 2014: member

    Perform CVerifyDB on pcoinsdbview instead of pcoinsTip. Bypassing the main coins cache allows more thorough checking with the same memory budget.

    This has no effect on performance because everything ends up in the child cache created by VerifyDB itself.

    It has bugged me ever since #4675, which effectively reduced the number of checked blocks to reduce peak memory usage.

    • Pass the coinsview to use as argument to VerifyDB
    • This also avoids that the first pcoinsTip->Flush() after VerifyDB writes a large slew of unchanged coin records (only read by the child cache) back to the database.

    For comparison:

    Without:
    2014-08-27 07:18:09 No coin database inconsistencies in last 148 blocks (61620 transactions)
    
    With:
    2014-08-27 07:12:28 No coin database inconsistencies in last 262 blocks (101764 transactions)
    

    (both started with default arguments to check 282 blocks, this log message reports the actual number of blocks checked at level 3)

  2. Perform CVerifyDB on pcoinsdbview instead of pcoinsTip
    Bypassing the main coins cache allows more thorough checking with the same
    memory budget.
    
    This has no effect on performance because everything ends up in the child
    cache created by VerifyDB itself.
    
    It has bugged me ever since #4675, which effectively reduced the
    number of checked blocks to reduce peak memory usage.
    
    - Pass the coinsview to use as argument to VerifyDB
    
    - This also avoids that the first `pcoinsTip->Flush()` after VerifyDB
      writes a large slew of unchanged coin records back to the database.
    2e280311b8
  3. BitcoinPullTester commented at 7:43 AM on August 27, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4768_2e280311b87ac95a765edd3cac05096e48c73545/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  4. sipa commented at 7:50 AM on August 27, 2014: member

    Untested ACK.

  5. laanwj added the label UTXO Db and Indexes on Aug 28, 2014
  6. gmaxwell commented at 1:52 AM on September 1, 2014: contributor

    ACK. This also reduces bitcoin RES after startup for me by 150MB.

  7. laanwj merged this on Sep 1, 2014
  8. laanwj closed this on Sep 1, 2014

  9. laanwj referenced this in commit 93f97aab62 on Sep 1, 2014
  10. MarcoFalke 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: 2026-04-13 15:15 UTC

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