Page MenuHomePhabricator

validation: rename snapshot chainstate dir
ClosedPublic

Authored by PiRK on Oct 19 2023, 13:33.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCdabda24d1975: validation: rename snapshot chainstate dir
Summary

db: add StoragePath to CDBWrapper/CCoinsViewDB

This is used in subsequent commits. It allows us to clean up UTXO
snapshot chainstate after background validation completes.

https://github.com/bitcoin/bitcoin/pull/25667/commits/d14bebf100aaaa25c7558eeed8b5c536da99885

validation: rename snapshot chainstate dir

This changes the snapshot's leveldb chainstate dir name from
chainstate_[blockhash] to chainstate_snapshot. This simplifies
later logic that loads snapshot data, and enforces the limitation
of a single snapshot at any given time.

Since we still need to persist the blockhash of the base block, we
write that out to a file (chainstate_snapshot/base_blockhash) for
later use during initialization, so that we can reinitialize the
snapshot chainstate.

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>

https://github.com/bitcoin/bitcoin/pull/25667/commits/f9f1735f139b6a1f1c7fea50717ff90dc4ba2bce

test: allow on-disk coins and block tree dbs in tests

Used when testing cleanup of on-disk chainstate data for snapshot
testcases. Also necessary for simulating node restart in .cpp tests.

https://github.com/bitcoin/bitcoin/pull/25667/commits/51fc9241c08a00f1f407f1534853a5cddbbc0a23

Note: TestChain100Setup now inherits TestingSetup instead of RegTestingSetup. This would normally be done in core#22818 which we didn't backport because the whole softfork machiney is not relevant to us.

This is a partial backport of core#25667

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Oct 19 2023, 13:33

Tail of the build log:

[433/489] bitcoin: testing crypto_tests
[434/489] Running utility command for check-bitcoin-crypto_tests
[435/489] bitcoin: testing cuckoocache_tests
[436/489] Running utility command for check-bitcoin-cuckoocache_tests
[437/489] bitcoin: testing psbt_wallet_tests
[438/489] bitcoin: testing logging_tests
[439/489] bitcoin: testing walletdb_tests
[440/489] bitcoin: testing merkle_tests
[441/489] Running utility command for check-bitcoin-psbt_wallet_tests
[442/489] Running utility command for check-bitcoin-logging_tests
[443/489] Running utility command for check-bitcoin-walletdb_tests
[444/489] Running utility command for check-bitcoin-merkle_tests
[445/489] Running utility command for check-pow-aserti32d_tests
[446/489] Running pow test suite
PASSED: pow test suite
[447/489] bitcoin: testing miner_tests
[448/489] Running utility command for check-bitcoin-miner_tests
[449/489] bitcoin: testing coinstatsindex_tests
[450/489] bitcoin: testing denialofservice_tests
[451/489] bitcoin: testing init_tests
[452/489] Running utility command for check-bitcoin-coinstatsindex_tests
[453/489] bitcoin: testing rcu_tests
[454/489] bitcoin: testing uint256_tests
[455/489] Running utility command for check-bitcoin-denialofservice_tests
[456/489] Running utility command for check-bitcoin-init_tests
[457/489] Running utility command for check-bitcoin-rcu_tests
[458/489] Running utility command for check-bitcoin-uint256_tests
[459/489] Linking CXX executable src/seeder/test/test-seeder
[460/489] seeder: testing message_writer_tests
[461/489] Linking CXX executable src/qt/test/test_bitcoin-qt
[462/489] seeder: testing options_tests
[463/489] seeder: testing parse_name_tests
[464/489] seeder: testing p2p_messaging_tests
[465/489] Running utility command for check-seeder-message_writer_tests
[466/489] Running utility command for check-seeder-options_tests
[467/489] Running utility command for check-seeder-parse_name_tests
[468/489] Running utility command for check-seeder-p2p_messaging_tests
[469/489] seeder: testing write_name_tests
[470/489] Running utility command for check-seeder-write_name_tests
[471/489] bitcoin: testing wallet_crypto_tests
[472/489] Running seeder test suite
PASSED: seeder test suite
[473/489] Running utility command for check-bitcoin-wallet_crypto_tests
[474/489] bitcoin: testing txrequest_tests
[475/489] Running utility command for check-bitcoin-txrequest_tests
[476/489] bitcoin: testing blockcheck_tests
[477/489] Running utility command for check-bitcoin-blockcheck_tests
[478/489] bitcoin-qt: testing test_bitcoin-qt
[479/489] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[480/489] bitcoin: testing coinselector_tests
[481/489] Running utility command for check-bitcoin-coinselector_tests
[482/489] bitcoin: testing wallet_tests
[483/489] Running utility command for check-bitcoin-wallet_tests
[484/489] bitcoin: testing transaction_tests
[485/489] Running utility command for check-bitcoin-transaction_tests
[486/489] bitcoin: testing coins_tests
[487/489] Running utility command for check-bitcoin-coins_tests
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

wallet_timelock.py                         | ○ Skipped | 0 s
wallet_txn_clone.py                        | ○ Skipped | 0 s
wallet_txn_clone.py --mineblock            | ○ Skipped | 0 s
wallet_txn_doublespend.py                  | ○ Skipped | 0 s
wallet_txn_doublespend.py --mineblock      | ○ Skipped | 0 s
wallet_watchonly.py                        | ○ Skipped | 0 s
wallet_watchonly.py --usecli               | ○ Skipped | 0 s

ALL                                        | ✓ Passed  | 773 s (accumulated) 
Runtime: 155 s

[161/450] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.021s

OK
[162/450] cd /work/contrib/devtools/chainparams && /usr/bin/python3.9 ./test_make_chainparams.py
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[169/450] Running pow test suite
PASSED: pow test suite
[185/450] Running seeder test suite
PASSED: seeder test suite
[199/450] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[212/450] Running avalanche test suite
PASSED: avalanche test suite
[213/450] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
In file included from /usr/include/boost/test/unit_test.hpp:19,
                 from ../../src/test/script_tests.cpp:30:
../../src/test/script_tests.cpp: In member function ‘void script_tests::script_build::test_method()’:
../../src/test/script_tests.cpp:540:22: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
  540 | BOOST_AUTO_TEST_CASE(script_build) {
      |                      ^~~~~~~~~~~~
[430/450] bitcoin: testing validation_chainstatemanager_tests
FAILED: src/test/CMakeFiles/check-bitcoin-validation_chainstatemanager_tests 
cd /work/abc-ci-builds/build-without-wallet/src/test && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-without-wallet/test/junit && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-without-wallet/test/log && /usr/bin/cmake -E env /work/cmake/utils/log-and-print-on-failure.sh /work/abc-ci-builds/build-without-wallet/test/log/bitcoin-validation_chainstatemanager_tests.log /work/abc-ci-builds/build-without-wallet/src/test/test_bitcoin --run_test=validation_chainstatemanager_tests --logger=HRF,message:JUNIT,message,bitcoin-validation_chainstatemanager_tests.xml --catch_system_errors=no
Running 4 test cases...
0  Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/bbd7ed3111d264b339c700d2e42239d8f85941e798323b80b313295289e3bfc4/test_snapshot.100.dat: {"coins_written":100,"base_hash":"5afde277a26b6f36aee8f61a1dbf755587e1c6be63e654a88abe2a1ff0fbfb05","base_height":100}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/bbd7ed3111d264b339c700d2e42239d8f85941e798323b80b313295289e3bfc4/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/bbd7ed3111d264b339c700d2e42239d8f85941e798323b80b313295289e3bfc4/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/bbd7ed3111d264b339c700d2e42239d8f85941e798323b80b313295289e3bfc4/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/bbd7ed3111d264b339c700d2e42239d8f85941e798323b80b313295289e3bfc4/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/bbd7ed3111d264b339c700d2e42239d8f85941e798323b80b313295289e3bfc4/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/bbd7ed3111d264b339c700d2e42239d8f85941e798323b80b313295289e3bfc4/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
../../src/test/validation_chainstatemanager_tests.cpp(258): error: in "validation_chainstatemanager_tests/chainstatemanager_activate_snapshot": check *node::ReadSnapshotBaseBlockhash( m_args.GetDataDirNet() / "chainstate_snapshot") == *chainman.SnapshotBlockhash() has failed [00000002dd81fc8031317fffdd81fdc0000000000000101201007fff00000030 != 47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c]
Checking coins in Chainstate [ibd] @ height 110 (47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c)
Checking coins in Chainstate [snapshot] @ height 110 (47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c)
Checking coins in Chainstate [ibd] @ height 110 (47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c)
Checking coins in Chainstate [snapshot] @ height 210 (767967616a02b32b05f8a587565190a388b333913d038846542009893f48e474)
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/bbd7ed3111d264b339c700d2e42239d8f85941e798323b80b313295289e3bfc4/test_snapshot.210.dat: {"coins_written":210,"base_hash":"767967616a02b32b05f8a587565190a388b333913d038846542009893f48e474","base_height":210}
0  
*** 1 failure is detected in the test module "Bitcoin ABC unit tests"
[447/450] Running utility command for check-bitcoin-transaction_tests
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Tail of the build log:

[425/482] Running utility command for check-bitcoin-scriptpubkeyman_tests
[426/482] Running utility command for check-bitcoin-scheduler_tests
[427/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/__/__/wallet/test/wallet_test_fixture.cpp.o
[428/482] bitcoin: testing coinstatsindex_tests
[429/482] bitcoin: testing walletdb_tests
[430/482] bitcoin: testing psbt_wallet_tests
[431/482] Running utility command for check-bitcoin-coinstatsindex_tests
[432/482] Running utility command for check-bitcoin-walletdb_tests
[433/482] Running utility command for check-bitcoin-psbt_wallet_tests
[434/482] bitcoin: testing merkle_tests
[435/482] Running utility command for check-bitcoin-merkle_tests
[436/482] bitcoin: testing logging_tests
[437/482] Running utility command for check-bitcoin-logging_tests
[438/482] bitcoin: testing denialofservice_tests
[439/482] Running utility command for check-bitcoin-denialofservice_tests
[440/482] bitcoin: testing miner_tests
[441/482] bitcoin: testing init_tests
[442/482] Running utility command for check-bitcoin-miner_tests
[443/482] Running utility command for check-bitcoin-init_tests
[444/482] bitcoin: testing uint256_tests
[445/482] Running utility command for check-bitcoin-uint256_tests
[446/482] bitcoin: testing wallet_crypto_tests
[447/482] Running utility command for check-bitcoin-wallet_crypto_tests
[448/482] bitcoin: testing rcu_tests
[449/482] Running utility command for check-bitcoin-rcu_tests
[450/482] bitcoin: testing txrequest_tests
[451/482] Running utility command for check-bitcoin-txrequest_tests
[452/482] bitcoin: testing blockcheck_tests
[453/482] Running utility command for check-bitcoin-blockcheck_tests
[454/482] bitcoin: testing coinselector_tests
[455/482] Running utility command for check-bitcoin-coinselector_tests
[456/482] bitcoin: testing wallet_tests
[457/482] Running utility command for check-bitcoin-wallet_tests
[458/482] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/fixture.cpp.o
[459/482] Linking CXX executable src/seeder/test/test-seeder
[460/482] seeder: testing p2p_messaging_tests
[461/482] seeder: testing options_tests
[462/482] seeder: testing message_writer_tests
[463/482] seeder: testing parse_name_tests
[464/482] seeder: testing write_name_tests
[465/482] Running utility command for check-seeder-p2p_messaging_tests
[466/482] Running utility command for check-seeder-message_writer_tests
[467/482] Running utility command for check-seeder-parse_name_tests
[468/482] Running utility command for check-seeder-options_tests
[469/482] Running utility command for check-seeder-write_name_tests
[470/482] Running seeder test suite
PASSED: seeder test suite
[471/482] bitcoin: testing transaction_tests
[472/482] Running utility command for check-bitcoin-transaction_tests
[473/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/addressbooktests.cpp.o
[474/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.o
[475/482] bitcoin: testing coins_tests
[476/482] Running utility command for check-bitcoin-coins_tests
[477/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/paymentservertests.cpp.o
[478/482] Linking CXX executable src/qt/test/test_bitcoin-qt
[479/482] bitcoin-qt: testing test_bitcoin-qt
[480/482] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1
PiRK planned changes to this revision.Oct 19 2023, 13:45

Apparently I didn't squash enough commits. The test added in validation_chainstatemanager_tests does not work as long as the chainstate is only in memory, which is fixed in D14651. Might have to squash these two, unless I figure out a better solution

Tail of the build log:

chronik_script_confirmed_txs.py            | ○ Skipped | 0 s
chronik_script_history.py                  | ○ Skipped | 0 s
chronik_script_unconfirmed_txs.py          | ○ Skipped | 0 s
chronik_script_utxos.py                    | ○ Skipped | 0 s
chronik_serve.py                           | ○ Skipped | 0 s
chronik_spent_by.py                        | ○ Skipped | 0 s
chronik_tx.py                              | ○ Skipped | 0 s
chronik_ws.py                              | ○ Skipped | 0 s
chronik_ws_script.py                       | ○ Skipped | 0 s
interface_usdt_net.py                      | ○ Skipped | 0 s
interface_usdt_utxocache.py                | ○ Skipped | 0 s
interface_usdt_validation.py               | ○ Skipped | 0 s

ALL                                        | ✓ Passed  | 2121 s (accumulated) 
Runtime: 425 s

[163/490] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.006s

OK
[164/490] cd /work/contrib/devtools/chainparams && /usr/bin/python3.9 ./test_make_chainparams.py
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[211/490] bitcoin: testing validation_chainstatemanager_tests
FAILED: src/test/CMakeFiles/check-bitcoin-validation_chainstatemanager_tests 
cd /work/abc-ci-builds/build-debug/src/test && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-debug/test/junit && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-debug/test/log && /usr/bin/cmake -E env /work/cmake/utils/log-and-print-on-failure.sh /work/abc-ci-builds/build-debug/test/log/bitcoin-validation_chainstatemanager_tests.log /work/abc-ci-builds/build-debug/src/test/test_bitcoin --run_test=validation_chainstatemanager_tests --logger=HRF,message:JUNIT,message,bitcoin-validation_chainstatemanager_tests.xml --catch_system_errors=no
Running 4 test cases...
0  Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/a0afec410948fbfb4853fc01540f83a94378d9d8de9c017228f7cfdc507de7d8/test_snapshot.100.dat: {"coins_written":100,"base_hash":"5afde277a26b6f36aee8f61a1dbf755587e1c6be63e654a88abe2a1ff0fbfb05","base_height":100}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/a0afec410948fbfb4853fc01540f83a94378d9d8de9c017228f7cfdc507de7d8/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/a0afec410948fbfb4853fc01540f83a94378d9d8de9c017228f7cfdc507de7d8/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/a0afec410948fbfb4853fc01540f83a94378d9d8de9c017228f7cfdc507de7d8/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/a0afec410948fbfb4853fc01540f83a94378d9d8de9c017228f7cfdc507de7d8/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/a0afec410948fbfb4853fc01540f83a94378d9d8de9c017228f7cfdc507de7d8/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/a0afec410948fbfb4853fc01540f83a94378d9d8de9c017228f7cfdc507de7d8/test_snapshot.110.dat: {"coins_written":110,"base_hash":"47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c","base_height":110}
../../src/test/validation_chainstatemanager_tests.cpp(258): error: in "validation_chainstatemanager_tests/chainstatemanager_activate_snapshot": check *node::ReadSnapshotBaseBlockhash( m_args.GetDataDirNet() / "chainstate_snapshot") == *chainman.SnapshotBlockhash() has failed [00007f302f76d38000007f302e8d4e30000000000000000100007ffd7442ecc0 != 47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c]
Checking coins in Chainstate [ibd] @ height 110 (47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c)
Checking coins in Chainstate [snapshot] @ height 110 (47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c)
Checking coins in Chainstate [ibd] @ height 110 (47cfb2b77860d250060e78d3248bb050928765453cbcbdbc121e3c48b99a376c)
Checking coins in Chainstate [snapshot] @ height 210 (767967616a02b32b05f8a587565190a388b333913d038846542009893f48e474)
Wrote UTXO snapshot to /tmp/test_common_Bitcoin ABC/a0afec410948fbfb4853fc01540f83a94378d9d8de9c017228f7cfdc507de7d8/test_snapshot.210.dat: {"coins_written":210,"base_hash":"767967616a02b32b05f8a587565190a388b333913d038846542009893f48e474","base_height":210}
0  
*** 1 failure is detected in the test module "Bitcoin ABC unit tests"
[389/490] Running secp256k1 test suite
PASSED: secp256k1 test suite
[459/490] Running seeder test suite
PASSED: seeder test suite
[464/490] Running avalanche test suite
PASSED: avalanche test suite
[467/490] Running pow test suite
PASSED: pow test suite
[479/490] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[487/490] Running utility command for check-bitcoin-coins_tests
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

wallet_groups.py                           | ✓ Passed  | 13 s
wallet_hd.py                               | ✓ Passed  | 7 s
wallet_hd.py --descriptors                 | ✓ Passed  | 5 s
wallet_import_rescan.py                    | ✓ Passed  | 7 s
wallet_import_with_label.py                | ✓ Passed  | 1 s
wallet_importdescriptors.py                | ✓ Passed  | 4 s
wallet_importmulti.py                      | ✓ Passed  | 2 s
wallet_importprunedfunds.py                | ✓ Passed  | 2 s
wallet_importprunedfunds.py --descriptors  | ✓ Passed  | 1 s
wallet_keypool.py                          | ✓ Passed  | 3 s
wallet_keypool_topup.py                    | ✓ Passed  | 3 s
wallet_keypool_topup.py --descriptors      | ✓ Passed  | 3 s
wallet_labels.py                           | ✓ Passed  | 1 s
wallet_labels.py --descriptors             | ✓ Passed  | 2 s
wallet_listreceivedby.py                   | ✓ Passed  | 5 s
wallet_listsinceblock.py                   | ✓ Passed  | 5 s
wallet_listsinceblock.py --descriptors     | ✓ Passed  | 2 s
wallet_listtransactions.py                 | ✓ Passed  | 4 s
wallet_listtransactions.py --descriptors   | ✓ Passed  | 3 s
wallet_multiwallet.py                      | ✓ Passed  | 40 s
wallet_multiwallet.py --usecli             | ✓ Passed  | 9 s
wallet_reorgsrestore.py                    | ✓ Passed  | 3 s
wallet_resendwallettransactions.py         | ✓ Passed  | 4 s
wallet_send.py                             | ✓ Passed  | 9 s
wallet_startup.py                          | ✓ Passed  | 2 s
wallet_timelock.py                         | ✓ Passed  | 1 s
wallet_txn_clone.py                        | ✓ Passed  | 1 s
wallet_txn_clone.py --mineblock            | ✓ Passed  | 2 s
wallet_txn_doublespend.py                  | ✓ Passed  | 1 s
wallet_txn_doublespend.py --mineblock      | ✓ Passed  | 2 s
wallet_watchonly.py                        | ✓ Passed  | 1 s
wallet_watchonly.py --usecli               | ✓ Passed  | 1 s
chronik_avalanche.py                       | ○ Skipped | 0 s
chronik_block.py                           | ○ Skipped | 0 s
chronik_block_info.py                      | ○ Skipped | 0 s
chronik_block_txs.py                       | ○ Skipped | 0 s
chronik_blockchain_info.py                 | ○ Skipped | 0 s
chronik_blocks.py                          | ○ Skipped | 0 s
chronik_disallow_prune.py                  | ○ Skipped | 0 s
chronik_pause.py                           | ○ Skipped | 0 s
chronik_raw_tx.py                          | ○ Skipped | 0 s
chronik_resync.py                          | ○ Skipped | 0 s
chronik_script_confirmed_txs.py            | ○ Skipped | 0 s
chronik_script_history.py                  | ○ Skipped | 0 s
chronik_script_unconfirmed_txs.py          | ○ Skipped | 0 s
chronik_script_utxos.py                    | ○ Skipped | 0 s
chronik_serve.py                           | ○ Skipped | 0 s
chronik_spent_by.py                        | ○ Skipped | 0 s
chronik_tx.py                              | ○ Skipped | 0 s
chronik_ws.py                              | ○ Skipped | 0 s
chronik_ws_script.py                       | ○ Skipped | 0 s
interface_usdt_net.py                      | ○ Skipped | 0 s
interface_usdt_utxocache.py                | ○ Skipped | 0 s
interface_usdt_validation.py               | ○ Skipped | 0 s

ALL                                        | ✓ Passed  | 1219 s (accumulated) 
Runtime: 244 s

ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1
PiRK edited the summary of this revision. (Show Details)

move/squash commit *test: allow on-disk coins and block tree dbs in tests* from D14651 to this diff to fix the failing test

src/test/util/setup_common.h
151–153 ↗(On Diff #42708)

This change is from https://github.com/bitcoin/bitcoin/pull/22818 (see comment in diff summary)

Fabien requested changes to this revision.Oct 23 2023, 12:11
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/dbwrapper.h
272 ↗(On Diff #42708)

#include <optional>

src/validation.cpp
5888 ↗(On Diff #42708)

Does that make sense to store the block hash if the validation above failed ?

This revision now requires changes to proceed.Oct 23 2023, 12:11
src/validation.cpp
5888 ↗(On Diff #42708)

After D14654, the entire directory including that file will be deleted if !snapshot_ok. So it saves an indentation level to not check before writing.

In this commit, it does not really make a difference. In any case if the above validation fails we will leave an invalid leveldb dir on disk (not great, but as of this commit we don't detect it on the next startup so it is not really a problem either)

This revision is now accepted and ready to land.Oct 23 2023, 15:35