Use the updatedBlockTip signal to schedule the proof registration at first new block after IBD is finished.
Add a boolean flag to Processor to indicate that this should be done.
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABCa3903ab998e7: [avalanche] register our proof after IBD
ninja all check-all
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- ava_handshake
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 15352 Build 30630: Build Diff build-without-wallet · lint-circular-dependencies · build-diff · build-clang · build-debug · build-clang-tidy Build 30629: arc lint + arc unit
Event Timeline
if proof validation fails due to missing UTXO, don't give up. Maybe the UTXO will be in a future block.
If we define a minimum coin age for a proof, we can probably stop doing this.
Tail of the build log:
[377/443] Running utility command for check-bitcoin-wallet_crypto_tests [378/443] Running utility command for check-bitcoin-sync_tests [379/443] bitcoin: testing sigencoding_tests [380/443] Running utility command for check-bitcoin-sigencoding_tests [381/443] bitcoin: testing torcontrol_tests [382/443] Running utility command for check-bitcoin-torcontrol_tests [383/443] bitcoin: testing scriptpubkeyman_tests [384/443] bitcoin: testing timedata_tests [385/443] Running utility command for check-bitcoin-scriptpubkeyman_tests [386/443] bitcoin: testing streams_tests [387/443] Running utility command for check-bitcoin-timedata_tests [388/443] Running utility command for check-bitcoin-streams_tests [389/443] bitcoin: testing undo_tests [390/443] bitcoin: testing uint256_tests [391/443] Running utility command for check-bitcoin-undo_tests [392/443] Running utility command for check-bitcoin-uint256_tests [393/443] bitcoin: testing radix_tests [394/443] bitcoin: testing script_standard_tests [395/443] Running utility command for check-bitcoin-radix_tests [396/443] Running utility command for check-bitcoin-script_standard_tests [397/443] bitcoin: testing schnorr_tests [398/443] Running utility command for check-bitcoin-schnorr_tests [399/443] bitcoin: testing blockstatus_tests [400/443] Running utility command for check-bitcoin-blockstatus_tests [401/443] bitcoin: testing versionbits_tests [402/443] Running utility command for check-bitcoin-versionbits_tests [403/443] bitcoin: testing script_tests [404/443] bitcoin: testing wallet_tests [405/443] bitcoin: testing cashaddr_tests [406/443] Running utility command for check-bitcoin-script_tests [407/443] Running utility command for check-bitcoin-wallet_tests [408/443] Running utility command for check-bitcoin-cashaddr_tests [409/443] bitcoin: testing validation_tests [410/443] bitcoin: testing crypto_tests [411/443] bitcoin: testing getarg_tests [412/443] bitcoin: testing cuckoocache_tests [413/443] Running utility command for check-bitcoin-getarg_tests [414/443] bitcoin: testing validation_block_tests [415/443] Running utility command for check-bitcoin-crypto_tests [416/443] Running utility command for check-bitcoin-validation_tests [417/443] Running utility command for check-bitcoin-cuckoocache_tests [418/443] Running utility command for check-bitcoin-validation_block_tests [419/443] bitcoin: testing blockcheck_tests [420/443] Running utility command for check-bitcoin-blockcheck_tests [421/443] bitcoin: testing monolith_opcodes_tests [422/443] Running utility command for check-bitcoin-monolith_opcodes_tests [423/443] bitcoin: testing skiplist_tests [424/443] Running utility command for check-bitcoin-skiplist_tests [425/443] bitcoin: testing op_reversebytes_tests [426/443] Running utility command for check-bitcoin-op_reversebytes_tests [427/443] bitcoin: testing transaction_tests [428/443] Running utility command for check-bitcoin-transaction_tests [429/443] bitcoin: testing coinselector_tests [430/443] Running utility command for check-bitcoin-coinselector_tests [431/443] bitcoin: testing coins_tests [432/443] Running utility command for check-bitcoin-coins_tests [433/443] Running bitcoin test suite PASSED: bitcoin 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:
[0m[1;30mwallet_import_rescan.py | ○ Skipped | 0 s [0m[1;30mwallet_import_with_label.py | ○ Skipped | 0 s [0m[1;30mwallet_importdescriptors.py | ○ Skipped | 0 s [0m[1;30mwallet_importmulti.py | ○ Skipped | 0 s [0m[1;30mwallet_importprunedfunds.py | ○ Skipped | 0 s [0m[1;30mwallet_keypool.py | ○ Skipped | 0 s [0m[1;30mwallet_keypool_topup.py | ○ Skipped | 0 s [0m[1;30mwallet_labels.py | ○ Skipped | 0 s [0m[1;30mwallet_listreceivedby.py | ○ Skipped | 0 s [0m[1;30mwallet_listsinceblock.py | ○ Skipped | 0 s [0m[1;30mwallet_listtransactions.py | ○ Skipped | 0 s [0m[1;30mwallet_multiwallet.py | ○ Skipped | 0 s [0m[1;30mwallet_multiwallet.py --usecli | ○ Skipped | 0 s [0m[1;30mwallet_reorgsrestore.py | ○ Skipped | 0 s [0m[1;30mwallet_resendwallettransactions.py | ○ Skipped | 0 s [0m[1;30mwallet_txn_clone.py | ○ Skipped | 0 s [0m[1;30mwallet_txn_clone.py --mineblock | ○ Skipped | 0 s [0m[1;30mwallet_txn_doublespend.py | ○ Skipped | 0 s [0m[1;30mwallet_txn_doublespend.py --mineblock | ○ Skipped | 0 s [0m[1;30mwallet_watchonly.py | ○ Skipped | 0 s [0m[1;30mwallet_watchonly.py --usecli | ○ Skipped | 0 s [0m[1;30mwallet_zapwallettxes.py | ○ Skipped | 0 s [0m[1m ALL | ✓ Passed | 354 s (accumulated) [0mRuntime: 75 s ---------------------------------------------------------------------- Ran 4 tests in 0.014s OK [147/404] Test Bitcoin RPC authentication... ... ---------------------------------------------------------------------- Ran 3 tests in 0.004s OK [148/404] cd /work/contrib/devtools/chainparams && /usr/bin/python3.7 ./test_make_chainparams.py ..... ---------------------------------------------------------------------- Ran 5 tests in 0.001s OK [162/404] Running seeder test suite PASSED: seeder test suite [166/404] Running pow test suite PASSED: pow test suite [173/404] Running bitcoin-qt test suite PASSED: bitcoin-qt test suite [174/404] 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) { ^~~~~~~~~~~~ [393/404] 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:
[370/436] Running utility command for check-bitcoin-bip32_tests [371/436] bitcoin: testing sync_tests [372/436] Running utility command for check-bitcoin-addrman_tests [373/436] Running utility command for check-bitcoin-sync_tests [374/436] bitcoin: testing torcontrol_tests [375/436] Running utility command for check-bitcoin-torcontrol_tests [376/436] bitcoin: testing scriptpubkeyman_tests [377/436] bitcoin: testing timedata_tests [378/436] bitcoin: testing wallet_crypto_tests [379/436] bitcoin: testing streams_tests [380/436] Running utility command for check-bitcoin-scriptpubkeyman_tests [381/436] Running utility command for check-bitcoin-wallet_crypto_tests [382/436] Running utility command for check-bitcoin-timedata_tests [383/436] Running utility command for check-bitcoin-streams_tests [384/436] bitcoin: testing undo_tests [385/436] bitcoin: testing cuckoocache_tests [386/436] bitcoin: testing uint256_tests [387/436] Running utility command for check-bitcoin-undo_tests [388/436] Running utility command for check-bitcoin-cuckoocache_tests [389/436] Running utility command for check-bitcoin-uint256_tests [390/436] bitcoin: testing radix_tests [391/436] Running utility command for check-bitcoin-radix_tests [392/436] bitcoin: testing script_standard_tests [393/436] bitcoin: testing blockcheck_tests [394/436] Running utility command for check-bitcoin-script_standard_tests [395/436] bitcoin: testing schnorr_tests [396/436] Running utility command for check-bitcoin-blockcheck_tests [397/436] bitcoin: testing blockstatus_tests [398/436] Running utility command for check-bitcoin-schnorr_tests [399/436] Running utility command for check-bitcoin-blockstatus_tests [400/436] bitcoin: testing cashaddr_tests [401/436] bitcoin: testing getarg_tests [402/436] Running utility command for check-bitcoin-cashaddr_tests [403/436] bitcoin: testing versionbits_tests [404/436] Running utility command for check-bitcoin-getarg_tests [405/436] Running utility command for check-bitcoin-versionbits_tests [406/436] bitcoin: testing wallet_tests [407/436] Running utility command for check-bitcoin-wallet_tests [408/436] bitcoin: testing crypto_tests [409/436] bitcoin: testing script_tests [410/436] Running utility command for check-bitcoin-script_tests [411/436] Running utility command for check-bitcoin-crypto_tests [412/436] bitcoin: testing validation_tests [413/436] Running utility command for check-bitcoin-validation_tests [414/436] bitcoin: testing skiplist_tests [415/436] Running utility command for check-bitcoin-skiplist_tests [416/436] bitcoin: testing validation_block_tests [417/436] Running utility command for check-bitcoin-validation_block_tests [418/436] bitcoin: testing op_reversebytes_tests [419/436] Running utility command for check-bitcoin-op_reversebytes_tests [420/436] bitcoin: testing transaction_tests [421/436] Running utility command for check-bitcoin-transaction_tests [422/436] bitcoin: testing coinselector_tests [423/436] Running utility command for check-bitcoin-coinselector_tests [424/436] bitcoin: testing coins_tests [425/436] Running utility command for check-bitcoin-coins_tests [426/436] 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:
[0m[0;32mwallet_createwallet.py --usecli | ✓ Passed | 3 s [0m[0;32mwallet_descriptor.py | ✓ Passed | 11 s [0m[0;32mwallet_disable.py | ✓ Passed | 1 s [0m[0;32mwallet_dump.py | ✓ Passed | 5 s [0m[0;32mwallet_encryption.py | ✓ Passed | 6 s [0m[0;32mwallet_groups.py | ✓ Passed | 41 s [0m[0;32mwallet_hd.py | ✓ Passed | 7 s [0m[0;32mwallet_import_rescan.py | ✓ Passed | 9 s [0m[0;32mwallet_import_with_label.py | ✓ Passed | 1 s [0m[0;32mwallet_importdescriptors.py | ✓ Passed | 5 s [0m[0;32mwallet_importmulti.py | ✓ Passed | 5 s [0m[0;32mwallet_importprunedfunds.py | ✓ Passed | 2 s [0m[0;32mwallet_keypool.py | ✓ Passed | 3 s [0m[0;32mwallet_keypool_topup.py | ✓ Passed | 3 s [0m[0;32mwallet_labels.py | ✓ Passed | 2 s [0m[0;32mwallet_listreceivedby.py | ✓ Passed | 19 s [0m[0;32mwallet_listsinceblock.py | ✓ Passed | 5 s [0m[0;32mwallet_listtransactions.py | ✓ Passed | 29 s [0m[0;32mwallet_multiwallet.py | ✓ Passed | 11 s [0m[0;32mwallet_multiwallet.py --usecli | ✓ Passed | 12 s [0m[0;32mwallet_reorgsrestore.py | ✓ Passed | 3 s [0m[0;32mwallet_resendwallettransactions.py | ✓ Passed | 6 s [0m[0;32mwallet_txn_clone.py | ✓ Passed | 2 s [0m[0;32mwallet_txn_clone.py --mineblock | ✓ Passed | 3 s [0m[0;32mwallet_txn_doublespend.py | ✓ Passed | 3 s [0m[0;32mwallet_txn_doublespend.py --mineblock | ✓ Passed | 4 s [0m[0;32mwallet_watchonly.py | ✓ Passed | 1 s [0m[0;32mwallet_watchonly.py --usecli | ✓ Passed | 1 s [0m[0;32mwallet_zapwallettxes.py | ✓ Passed | 5 s [0m[1m ALL | ✓ Passed | 1142 s (accumulated) [0mRuntime: 229 s ---------------------------------------------------------------------- Ran 4 tests in 0.006s OK [179/444] Running seeder test suite PASSED: seeder test suite [180/444] Test Bitcoin RPC authentication... ... ---------------------------------------------------------------------- Ran 3 tests in 0.004s OK [181/444] cd /work/contrib/devtools/chainparams && /usr/bin/python3.7 ./test_make_chainparams.py ..... ---------------------------------------------------------------------- Ran 5 tests in 0.001s OK [405/444] Running pow test suite PASSED: pow test suite [426/444] Running bitcoin-qt test suite PASSED: bitcoin-qt test suite [433/444] 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:
[0m[0;32mrpc_psbt.py | ✓ Passed | 25 s [0m[0;32mrpc_rawtransaction.py | ✓ Passed | 34 s [0m[0;32mrpc_scantxoutset.py | ✓ Passed | 3 s [0m[0;32mrpc_setban.py | ✓ Passed | 2 s [0m[0;32mrpc_signmessage.py | ✓ Passed | 1 s [0m[0;32mrpc_signrawtransaction.py | ✓ Passed | 1 s [0m[0;32mrpc_txoutproof.py | ✓ Passed | 2 s [0m[0;32mrpc_uptime.py | ✓ Passed | 1 s [0m[0;32mrpc_users.py | ✓ Passed | 5 s [0m[0;32mrpc_whitelist.py | ✓ Passed | 1 s [0m[0;32mtool_wallet.py | ✓ Passed | 4 s [0m[0;32mwallet_abandonconflict.py | ✓ Passed | 9 s [0m[0;32mwallet_address_types.py | ✓ Passed | 14 s [0m[0;32mwallet_avoidreuse.py | ✓ Passed | 4 s [0m[0;32mwallet_backup.py | ✓ Passed | 25 s [0m[0;32mwallet_balance.py | ✓ Passed | 22 s [0m[0;32mwallet_basic.py | ✓ Passed | 19 s [0m[0;32mwallet_coinbase_category.py | ✓ Passed | 1 s [0m[0;32mwallet_create_tx.py | ✓ Passed | 5 s [0m[0;32mwallet_createwallet.py | ✓ Passed | 2 s [0m[0;32mwallet_createwallet.py --usecli | ✓ Passed | 2 s [0m[0;32mwallet_descriptor.py | ✓ Passed | 6 s [0m[0;32mwallet_disable.py | ✓ Passed | 0 s [0m[0;32mwallet_dump.py | ✓ Passed | 5 s [0m[0;32mwallet_encryption.py | ✓ Passed | 5 s [0m[0;32mwallet_groups.py | ✓ Passed | 27 s [0m[0;32mwallet_hd.py | ✓ Passed | 6 s [0m[0;32mwallet_import_rescan.py | ✓ Passed | 5 s [0m[0;32mwallet_import_with_label.py | ✓ Passed | 1 s [0m[0;32mwallet_importdescriptors.py | ✓ Passed | 4 s [0m[0;32mwallet_importmulti.py | ✓ Passed | 3 s [0m[0;32mwallet_importprunedfunds.py | ✓ Passed | 2 s [0m[0;32mwallet_keypool.py | ✓ Passed | 3 s [0m[0;32mwallet_keypool_topup.py | ✓ Passed | 2 s [0m[0;32mwallet_labels.py | ✓ Passed | 1 s [0m[0;32mwallet_listreceivedby.py | ✓ Passed | 8 s [0m[0;32mwallet_listsinceblock.py | ✓ Passed | 4 s [0m[0;32mwallet_listtransactions.py | ✓ Passed | 17 s [0m[0;32mwallet_multiwallet.py | ✓ Passed | 12 s [0m[0;32mwallet_multiwallet.py --usecli | ✓ Passed | 42 s [0m[0;32mwallet_reorgsrestore.py | ✓ Passed | 3 s [0m[0;32mwallet_resendwallettransactions.py | ✓ Passed | 14 s [0m[0;32mwallet_txn_clone.py | ✓ Passed | 2 s [0m[0;32mwallet_txn_clone.py --mineblock | ✓ Passed | 3 s [0m[0;32mwallet_txn_doublespend.py | ✓ Passed | 1 s [0m[0;32mwallet_txn_doublespend.py --mineblock | ✓ Passed | 3 s [0m[0;32mwallet_watchonly.py | ✓ Passed | 1 s [0m[0;32mwallet_watchonly.py --usecli | ✓ Passed | 1 s [0m[0;32mwallet_zapwallettxes.py | ✓ Passed | 4 s [0m[1m ALL | ✓ Passed | 917 s (accumulated) [0mRuntime: 186 s ---------------------------------------------------------------------- Ran 4 tests in 0.001s OK ninja: build stopped: cannot make progress due to previous errors. Build build-diff failed with exit code 1
fix build failure
The tests used the old signature for getPeerId. Just add an alias to call the new function with a dummy validation state.
rebase on master after landing D9342
Revert some changes (checking for the validation state to keep verifying the proof until there is no longer a missing utxo). The rationale for this check was that there is a risk of the node checking the proof immediately after finishing IBD when some utxos are not yet known, but this means that the node would keep checking the proof at each new block even if the UTXO never exists. If/when there will be a minimum coin age limit for the stakes, it is unlikely that this limit will be less than 26 hours, so we will already know if the proof is valid after IBD.
Based on D9342, we can potentially register the proof earlier depending on the proofs ValidationState at init.
We still need to be reasonably sure that no UTXO was spent since last time the node was up to date.