Page MenuHomePhabricator

[avalanche] pass chainman to Proof::verify
ClosedPublic

Authored by PiRK on Jul 4 2022, 16:01.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC6c8d3340dc7f: [avalanche] pass chainman to Proof::verify
Summary

This removes usages of the global chainstate in the Proof class.

We now require Proof::verify callers to hold the lock for chainmanager operations.

Depends on D11703

Test Plan

With debug and clang:
ninja all check-all

Event Timeline

PiRK requested review of this revision.Jul 4 2022, 16:01
deadalnix requested changes to this revision.Jul 5 2022, 12:52
deadalnix added a subscriber: deadalnix.

Is there a reason not to pass the chain manager here, instead of passing down various values extracted from it?

This revision now requires changes to proceed.Jul 5 2022, 12:52
PiRK retitled this revision from [avalanche] pass activeHeight to Proof::verify to [avalanche] pass chainman to Proof::verify.
PiRK edited the summary of this revision. (Show Details)
PiRK edited the test plan for this revision. (Show Details)

pass the chainman directly

Tail of the build log:

690cb3d74b5add1cfb7d4cf186426d41117586c57d59da330cc950e2d18d613c
f713dec5d2f798360748914face171d5a45706b9c5f0bc4d561f6e80e098beef
df84548b3a085e29d58ba5e83ad2fd1c9ecbe8595d4240f3f588e52af84cc65b
455f34eb8a00b0799630071c0728481bdb1653035b1484ac33e974aa4ae7db6d
96bd9fee759d81f9bc30e26015d979df3f6046c7a8764582d1a2c5c3d61c2f44
../../src/avalanche/test/proof_tests.cpp(926): error: in "proof_tests/verify": check p->verify(state, *([&]() -> decltype(get_pure_r_value(m_node.chainman)) { auto &&check = (m_node.chainman); (static_cast <bool> ("m_node.chainman" &&check) ? void (0) : __assert_fail ("\"m_node.chainman\" &&check", "../../src/avalanche/test/proof_tests.cpp", 925, __extension__ __PRETTY_FUNCTION__)); return std::forward<decltype(get_pure_r_value(m_node.chainman))>(check); }())) == (result == ProofValidationResult::NONE) has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(926): error: in "proof_tests/verify": check p->verify(state, *([&]() -> decltype(get_pure_r_value(m_node.chainman)) { auto &&check = (m_node.chainman); (static_cast <bool> ("m_node.chainman" &&check) ? void (0) : __assert_fail ("\"m_node.chainman\" &&check", "../../src/avalanche/test/proof_tests.cpp", 925, __extension__ __PRETTY_FUNCTION__)); return std::forward<decltype(get_pure_r_value(m_node.chainman))>(check); }())) == (result == ProofValidationResult::NONE) has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(926): error: in "proof_tests/verify": check p->verify(state, *([&]() -> decltype(get_pure_r_value(m_node.chainman)) { auto &&check = (m_node.chainman); (static_cast <bool> ("m_node.chainman" &&check) ? void (0) : __assert_fail ("\"m_node.chainman\" &&check", "../../src/avalanche/test/proof_tests.cpp", 925, __extension__ __PRETTY_FUNCTION__)); return std::forward<decltype(get_pure_r_value(m_node.chainman))>(check); }())) == (result == ProofValidationResult::NONE) has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(926): error: in "proof_tests/verify": check p->verify(state, *([&]() -> decltype(get_pure_r_value(m_node.chainman)) { auto &&check = (m_node.chainman); (static_cast <bool> ("m_node.chainman" &&check) ? void (0) : __assert_fail ("\"m_node.chainman\" &&check", "../../src/avalanche/test/proof_tests.cpp", 925, __extension__ __PRETTY_FUNCTION__)); return std::forward<decltype(get_pure_r_value(m_node.chainman))>(check); }())) == (result == ProofValidationResult::NONE) has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(926): error: in "proof_tests/verify": check p->verify(state, *([&]() -> decltype(get_pure_r_value(m_node.chainman)) { auto &&check = (m_node.chainman); (static_cast <bool> ("m_node.chainman" &&check) ? void (0) : __assert_fail ("\"m_node.chainman\" &&check", "../../src/avalanche/test/proof_tests.cpp", 925, __extension__ __PRETTY_FUNCTION__)); return std::forward<decltype(get_pure_r_value(m_node.chainman))>(check); }())) == (result == ProofValidationResult::NONE) has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed

*** 29 failures are detected in the test module "Avalanche Test Suite"
[459/479] avalanche: testing compactproofs_tests
[460/479] Running utility command for check-avalanche-compactproofs_tests
[461/479] bitcoin-qt: testing test_bitcoin-qt
[462/479] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[463/479] avalanche: testing processor_tests
[464/479] Running utility command for check-avalanche-processor_tests
[465/479] bitcoin: testing transaction_tests
[466/479] Running utility command for check-bitcoin-transaction_tests
[467/479] avalanche: testing peermanager_tests
[468/479] Running utility command for check-avalanche-peermanager_tests
[469/479] bitcoin: testing coinselector_tests
[470/479] Running utility command for check-bitcoin-coinselector_tests
[471/479] bitcoin: testing coins_tests
[472/479] Running utility command for check-bitcoin-coins_tests
[473/479] Running bitcoin test suite
PASSED: bitcoin test suite
[474/479] avalanche: testing voterecord_tests
[475/479] Running utility command for check-avalanche-voterecord_tests
[476/479] secp256k1: testing secp256k1-tests
[477/479] Running secp256k1 test suite
PASSED: secp256k1 test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

[415/472] bitcoin: testing merkleblock_tests
[416/472] bitcoin: testing txvalidationcache_tests
[417/472] bitcoin: testing bip32_tests
[418/472] Running utility command for check-bitcoin-merkleblock_tests
[419/472] bitcoin: testing scriptpubkeyman_tests
[420/472] Running utility command for check-bitcoin-txvalidationcache_tests
[421/472] bitcoin: testing timedata_tests
[422/472] Running utility command for check-bitcoin-bip32_tests
[423/472] Running utility command for check-bitcoin-scriptpubkeyman_tests
[424/472] Running utility command for check-bitcoin-timedata_tests
[425/472] bitcoin: testing validation_flush_tests
[426/472] bitcoin: testing compilerbug_tests
[427/472] Running utility command for check-bitcoin-validation_flush_tests
[428/472] Running utility command for check-bitcoin-compilerbug_tests
[429/472] bitcoin: testing script_standard_tests
[430/472] Running utility command for check-bitcoin-script_standard_tests
[431/472] bitcoin: testing blockcheck_tests
[432/472] bitcoin: testing op_reversebytes_tests
[433/472] bitcoin: testing blockstatus_tests
[434/472] bitcoin: testing schnorr_tests
[435/472] bitcoin: testing cuckoocache_tests
[436/472] bitcoin: testing radix_tests
[437/472] Running utility command for check-bitcoin-blockcheck_tests
[438/472] Running utility command for check-bitcoin-blockstatus_tests
[439/472] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.o
[440/472] Running utility command for check-bitcoin-op_reversebytes_tests
[441/472] bitcoin: testing versionbits_tests
[442/472] Running utility command for check-bitcoin-schnorr_tests
[443/472] Running utility command for check-bitcoin-radix_tests
[444/472] Running utility command for check-bitcoin-cuckoocache_tests
[445/472] bitcoin: testing crypto_tests
[446/472] Running utility command for check-bitcoin-versionbits_tests
[447/472] Running utility command for check-avalanche-voterecord_tests
[448/472] Running utility command for check-bitcoin-crypto_tests
[449/472] bitcoin: testing intmath_tests
[450/472] Running utility command for check-bitcoin-intmath_tests
[451/472] bitcoin: testing shortidprocessor_tests
[452/472] bitcoin: testing ismine_tests
[453/472] bitcoin: testing cashaddr_tests
[454/472] Running utility command for check-bitcoin-shortidprocessor_tests
[455/472] Running utility command for check-bitcoin-ismine_tests
[456/472] Running utility command for check-bitcoin-cashaddr_tests
[457/472] Linking CXX executable src/qt/test/test_bitcoin-qt
[458/472] bitcoin: testing validation_block_tests
[459/472] Running utility command for check-bitcoin-validation_block_tests
[460/472] bitcoin: testing checkqueue_tests
[461/472] Running utility command for check-bitcoin-checkqueue_tests
[462/472] bitcoin-qt: testing test_bitcoin-qt
[463/472] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[464/472] bitcoin: testing transaction_tests
[465/472] Running utility command for check-bitcoin-transaction_tests
[466/472] bitcoin: testing coinselector_tests
[467/472] Running utility command for check-bitcoin-coinselector_tests
[468/472] bitcoin: testing coins_tests
[469/472] Running utility command for check-bitcoin-coins_tests
[470/472] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

Tail of the build log:

wallet_keypool.py                                      | ○ Skipped | 0 s
wallet_keypool_topup.py                                | ○ Skipped | 0 s
wallet_keypool_topup.py --descriptors                  | ○ Skipped | 0 s
wallet_labels.py                                       | ○ Skipped | 0 s
wallet_labels.py --descriptors                         | ○ Skipped | 0 s
wallet_listreceivedby.py                               | ○ Skipped | 0 s
wallet_listsinceblock.py                               | ○ Skipped | 0 s
wallet_listsinceblock.py --descriptors                 | ○ Skipped | 0 s
wallet_listtransactions.py                             | ○ Skipped | 0 s
wallet_listtransactions.py --descriptors               | ○ Skipped | 0 s
wallet_multiwallet.py                                  | ○ Skipped | 0 s
wallet_multiwallet.py --usecli                         | ○ Skipped | 0 s
wallet_reorgsrestore.py                                | ○ Skipped | 0 s
wallet_resendwallettransactions.py                     | ○ Skipped | 0 s
wallet_send.py                                         | ○ Skipped | 0 s
wallet_startup.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  | 752 s (accumulated) 
Runtime: 151 s

----------------------------------------------------------------------
Ran 10 tests in 0.231s

OK

[178/440] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.016s

OK
[179/440] cd /work/contrib/devtools/chainparams && /usr/bin/python3.7 ./test_make_chainparams.py
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[193/440] Running seeder test suite
PASSED: seeder test suite
[201/440] Running pow test suite
PASSED: pow test suite
[205/440] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[206/440] 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
 BOOST_AUTO_TEST_CASE(script_build) {
                      ^~~~~~~~~~~~
[437/440] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Tail of the build log:

8a2fcc5700a89f37a3726cdf3202353bf61f280815a9df744e3c9de6215a745a
c61ee0416eb9549ea0e09dfd2c6062a11aa5d3ab0adcdf59abcc02dd0de401fc
29deedc94713bbc4d4f88fe96fae6801b91c5ae50601f158fa76a036e18ea468
c24dc13d98d0e0a80c19346b9590368557a66f0f65c0088c179d89eca25107c8
bfc250ca1986177acc779f26eaff80aa8916d23cb3e7e0ce6d3589c4f5ea364c
046e75fa2d7f0868dcfa683bbdf657fc6a49b8f8b0d5c2dfdf90736ded26b076
e66b0ab11de5e2f358d2e1f65b1ebe608e4a1f10a9f5d42f1173b262e1a218a6
ce2812a1decdef0267e0266c68ab53c5ecad292f7b7d0fbd3db9285a08ccd2a1
37a08e004f35d6410b24a5724b8351b41d4e3ac04f285cd76d73a023b2ae5519
1312eff53594f63e61f044c36b2cf2d3e7e44c706f17bfabcf49954741380bbc
de837b44ae2df5408f89dc42039ae53a61ea508a15e214e69a50d940b72e7713
2c90b8359740d675952b570cca76ffb7c1a225984b8c7f47bc27607c58a613b5
289c082f835c2edd24b95e1aee7dbb353dff30cdcaab02d5dc2ac44c57181468
8d97d3ed1884462122976da4706778593fc4b5eaafb859bec0b45f590219f5ba
690cb3d74b5add1cfb7d4cf186426d41117586c57d59da330cc950e2d18d613c
f713dec5d2f798360748914face171d5a45706b9c5f0bc4d561f6e80e098beef
df84548b3a085e29d58ba5e83ad2fd1c9ecbe8595d4240f3f588e52af84cc65b
455f34eb8a00b0799630071c0728481bdb1653035b1484ac33e974aa4ae7db6d
96bd9fee759d81f9bc30e26015d979df3f6046c7a8764582d1a2c5c3d61c2f44
../../src/avalanche/test/proof_tests.cpp(926): error: in "proof_tests/verify": check p->verify(state, *([&]() -> decltype(get_pure_r_value(m_node.chainman)) { auto &&check = (m_node.chainman); (static_cast <bool> ("m_node.chainman" &&check) ? void (0) : __assert_fail ("\"m_node.chainman\" &&check", "../../src/avalanche/test/proof_tests.cpp", 926, __extension__ __PRETTY_FUNCTION__)); return std::forward<decltype(get_pure_r_value(m_node.chainman))>(check); }())) == (result == ProofValidationResult::NONE) has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(926): error: in "proof_tests/verify": check p->verify(state, *([&]() -> decltype(get_pure_r_value(m_node.chainman)) { auto &&check = (m_node.chainman); (static_cast <bool> ("m_node.chainman" &&check) ? void (0) : __assert_fail ("\"m_node.chainman\" &&check", "../../src/avalanche/test/proof_tests.cpp", 926, __extension__ __PRETTY_FUNCTION__)); return std::forward<decltype(get_pure_r_value(m_node.chainman))>(check); }())) == (result == ProofValidationResult::NONE) has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(926): error: in "proof_tests/verify": check p->verify(state, *([&]() -> decltype(get_pure_r_value(m_node.chainman)) { auto &&check = (m_node.chainman); (static_cast <bool> ("m_node.chainman" &&check) ? void (0) : __assert_fail ("\"m_node.chainman\" &&check", "../../src/avalanche/test/proof_tests.cpp", 926, __extension__ __PRETTY_FUNCTION__)); return std::forward<decltype(get_pure_r_value(m_node.chainman))>(check); }())) == (result == ProofValidationResult::NONE) has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(926): error: in "proof_tests/verify": check p->verify(state, *([&]() -> decltype(get_pure_r_value(m_node.chainman)) { auto &&check = (m_node.chainman); (static_cast <bool> ("m_node.chainman" &&check) ? void (0) : __assert_fail ("\"m_node.chainman\" &&check", "../../src/avalanche/test/proof_tests.cpp", 926, __extension__ __PRETTY_FUNCTION__)); return std::forward<decltype(get_pure_r_value(m_node.chainman))>(check); }())) == (result == ProofValidationResult::NONE) has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(926): error: in "proof_tests/verify": check p->verify(state, *([&]() -> decltype(get_pure_r_value(m_node.chainman)) { auto &&check = (m_node.chainman); (static_cast <bool> ("m_node.chainman" &&check) ? void (0) : __assert_fail ("\"m_node.chainman\" &&check", "../../src/avalanche/test/proof_tests.cpp", 926, __extension__ __PRETTY_FUNCTION__)); return std::forward<decltype(get_pure_r_value(m_node.chainman))>(check); }())) == (result == ProofValidationResult::NONE) has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed
../../src/avalanche/test/proof_tests.cpp(927): error: in "proof_tests/verify": check state.GetResult() == result has failed

*** 29 failures are detected in the test module "Avalanche Test Suite"
[413/480] Running secp256k1 test suite
PASSED: secp256k1 test suite
[463/480] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[468/480] Running pow test suite
PASSED: pow test suite
[477/480] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

wallet_abandonconflict.py                              | ✓ Passed  | 17 s
wallet_address_types.py                                | ✓ Passed  | 11 s
wallet_address_types.py --descriptors                  | ✓ Passed  | 8 s
wallet_avoidreuse.py                                   | ✓ Passed  | 4 s
wallet_avoidreuse.py --descriptors                     | ✓ Passed  | 4 s
wallet_backup.py                                       | ✓ Passed  | 24 s
wallet_balance.py                                      | ✓ Passed  | 14 s
wallet_balance.py --descriptors                        | ✓ Passed  | 14 s
wallet_basic.py                                        | ✓ Passed  | 21 s
wallet_coinbase_category.py                            | ✓ Passed  | 1 s
wallet_create_tx.py                                    | ✓ Passed  | 5 s
wallet_createwallet.py                                 | ✓ Passed  | 2 s
wallet_createwallet.py --descriptors                   | ✓ Passed  | 2 s
wallet_createwallet.py --usecli                        | ✓ Passed  | 3 s
wallet_descriptor.py                                   | ✓ Passed  | 6 s
wallet_disable.py                                      | ✓ Passed  | 0 s
wallet_dump.py                                         | ✓ Passed  | 4 s
wallet_encryption.py                                   | ✓ Passed  | 5 s
wallet_encryption.py --descriptors                     | ✓ Passed  | 5 s
wallet_hd.py                                           | ✓ Passed  | 6 s
wallet_hd.py --descriptors                             | ✓ Passed  | 5 s
wallet_import_rescan.py                                | ✓ Passed  | 5 s
wallet_import_with_label.py                            | ✓ Passed  | 1 s
wallet_importdescriptors.py                            | ✓ Passed  | 5 s
wallet_importmulti.py                                  | ✓ Passed  | 3 s
wallet_importprunedfunds.py                            | ✓ Passed  | 2 s
wallet_importprunedfunds.py --descriptors              | ✓ Passed  | 2 s
wallet_keypool.py                                      | ✓ Passed  | 3 s
wallet_keypool_topup.py                                | ✓ Passed  | 2 s
wallet_keypool_topup.py --descriptors                  | ✓ Passed  | 3 s
wallet_labels.py                                       | ✓ Passed  | 1 s
wallet_labels.py --descriptors                         | ✓ Passed  | 1 s
wallet_listreceivedby.py                               | ✓ Passed  | 25 s
wallet_listsinceblock.py                               | ✓ Passed  | 4 s
wallet_listsinceblock.py --descriptors                 | ✓ Passed  | 6 s
wallet_listtransactions.py                             | ✓ Passed  | 4 s
wallet_listtransactions.py --descriptors               | ✓ Passed  | 3 s
wallet_multiwallet.py                                  | ✓ Passed  | 41 s
wallet_multiwallet.py --usecli                         | ✓ Passed  | 11 s
wallet_reorgsrestore.py                                | ✓ Passed  | 3 s
wallet_resendwallettransactions.py                     | ✓ Passed  | 12 s
wallet_send.py                                         | ✓ Passed  | 7 s
wallet_startup.py                                      | ✓ Passed  | 2 s
wallet_txn_clone.py                                    | ✓ Passed  | 2 s
wallet_txn_clone.py --mineblock                        | ✓ Passed  | 3 s
wallet_txn_doublespend.py                              | ✓ Passed  | 1 s
wallet_txn_doublespend.py --mineblock                  | ✓ Passed  | 4 s
wallet_watchonly.py                                    | ✓ Passed  | 1 s
wallet_watchonly.py --usecli                           | ✓ Passed  | 1 s

ALL                                                    | ✓ Passed  | 1278 s (accumulated) 
Runtime: 256 s

----------------------------------------------------------------------
Ran 10 tests in 0.093s

OK

ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1
PiRK planned changes to this revision.Jul 6 2022, 15:24

fix tests. The coins must be added to the actual coinsTip, not to a new CCoinsViewCache based on the tip. Also adding coins requires cs_main to be held. Remove also an unused CCoinsViewCache in the deterministic_proofid suite.

deadalnix requested changes to this revision.Jul 8 2022, 15:39
deadalnix added inline comments.
src/avalanche/peermanager.cpp
454 ↗(On Diff #34300)

I don't think you want to drop that lock.

src/avalanche/proof.cpp
184 ↗(On Diff #34300)

IMO you'd be better off requiring this method to hold the lock. Nothing good comes out of locking/unlocking the lock like a mad man. It doesn't reduce contention, because the lock is relocked immediately, but you get a significantly more complex interleaving of possible events orderings.

This revision now requires changes to proceed.Jul 8 2022, 15:39
PiRK edited the summary of this revision. (Show Details)

require cs_mainto be held for Proof::Verify(state, chainman) calls.

This revision is now accepted and ready to land.Jul 14 2022, 22:57

rebase (minor merge conflict with D11749)

This revision was automatically updated to reflect the committed changes.