Page MenuHomePhabricator

[avalanche] Extend to addProofToPool logic for pools with more than 1 proof per utxo
AbandonedPublic

Authored by Fabien on Nov 19 2021, 13:07.

Details

Reviewers
None
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Summary

This is a first step toward replacing the orphan pool with the proof pool. This updates the PeerManager::addProofToPool method to handle more than a single proof per utxo in the pool. The decision of whether proof replacement should be allowed is moved to a bool argument to the method because it will be set in 2 cases: one for actually invalid proofs (the current orphans, which might become valid in the future), and one to work with the -enableavalancheproofreplacement flag being unset.

Ref T1854.

Depends on D10491.

Test Plan
ninja all check-avalanche

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_addproofnopeeroverride
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17292
Build 34412: Build Difflint-circular-dependencies · build-diff · build-debug · build-without-wallet · build-clang · build-clang-tidy
Build 34411: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Nov 19 2021, 13:07

Tail of the build log:

[386/458] bitcoin: testing cuckoocache_tests
[387/458] bitcoin: testing bip32_tests
[388/458] bitcoin: testing scheduler_tests
[389/458] Running utility command for check-bitcoin-cuckoocache_tests
[390/458] Running utility command for check-bitcoin-bip32_tests
[391/458] Running utility command for check-bitcoin-scheduler_tests
[392/458] bitcoin: testing txvalidationcache_tests
[393/458] bitcoin: testing sync_tests
[394/458] Running utility command for check-bitcoin-txvalidationcache_tests
[395/458] bitcoin: testing torcontrol_tests
[396/458] bitcoin: testing op_reversebytes_tests
[397/458] Running utility command for check-bitcoin-sync_tests
[398/458] Running utility command for check-bitcoin-torcontrol_tests
[399/458] Running utility command for check-bitcoin-op_reversebytes_tests
[400/458] bitcoin: testing settings_tests
[401/458] bitcoin: testing streams_tests
[402/458] Running utility command for check-bitcoin-settings_tests
[403/458] bitcoin: testing validation_flush_tests
[404/458] bitcoin: testing timedata_tests
[405/458] bitcoin: testing compilerbug_tests
[406/458] Running utility command for check-bitcoin-streams_tests
[407/458] Running utility command for check-bitcoin-validation_flush_tests
[408/458] Running utility command for check-bitcoin-timedata_tests
[409/458] Running utility command for check-bitcoin-compilerbug_tests
[410/458] bitcoin: testing schnorr_tests
[411/458] bitcoin: testing checkpoints_tests
[412/458] Running utility command for check-bitcoin-schnorr_tests
[413/458] bitcoin: testing transaction_tests
[414/458] Running utility command for check-bitcoin-checkpoints_tests
[415/458] Running utility command for check-bitcoin-transaction_tests
[416/458] bitcoin: testing validationinterface_tests
[417/458] bitcoin: testing script_standard_tests
[418/458] Running utility command for check-bitcoin-validationinterface_tests
[419/458] Running utility command for check-bitcoin-script_standard_tests
[420/458] bitcoin: testing cashaddr_tests
[421/458] bitcoin: testing wallet_tests
[422/458] Running utility command for check-bitcoin-cashaddr_tests
[423/458] Running utility command for check-bitcoin-wallet_tests
[424/458] bitcoin: testing crypto_tests
[425/458] bitcoin: testing versionbits_tests
[426/458] Running utility command for check-bitcoin-crypto_tests
[427/458] bitcoin: testing script_tests
[428/458] Running utility command for check-bitcoin-versionbits_tests
[429/458] Running utility command for check-bitcoin-script_tests
[430/458] bitcoin: testing serialize_tests
[431/458] Running utility command for check-bitcoin-serialize_tests
[432/458] bitcoin: testing monolith_opcodes_tests
[433/458] Running utility command for check-bitcoin-monolith_opcodes_tests
[434/458] bitcoin: testing blockcheck_tests
[435/458] Running utility command for check-bitcoin-blockcheck_tests
[436/458] bitcoin: testing intmath_tests
[437/458] Running utility command for check-bitcoin-intmath_tests
[438/458] bitcoin: testing coinselector_tests
[439/458] Running utility command for check-bitcoin-coinselector_tests
[440/458] bitcoin: testing coins_tests
[441/458] Running utility command for check-bitcoin-coins_tests
[442/458] 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:

wallet_importmulti.py                   | ○ Skipped | 0 s
wallet_importprunedfunds.py             | ○ Skipped | 0 s
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_listtransactions.py              | ○ 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  | 481 s (accumulated) 
Runtime: 97 s

----------------------------------------------------------------------
Ran 10 tests in 0.172s

OK

[145/419] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.017s

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

OK
[170/419] Running seeder test suite
PASSED: seeder test suite
[175/419] Running pow test suite
PASSED: pow test suite
[178/419] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[179/419] 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) {
                      ^~~~~~~~~~~~
[402/419] 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:

[379/451] bitcoin: testing sync_tests
[380/451] bitcoin: testing txvalidationcache_tests
[381/451] bitcoin: testing bip32_tests
[382/451] Running utility command for check-bitcoin-txvalidationcache_tests
[383/451] Running utility command for check-bitcoin-sync_tests
[384/451] Running utility command for check-bitcoin-bip32_tests
[385/451] bitcoin: testing torcontrol_tests
[386/451] Running utility command for check-bitcoin-torcontrol_tests
[387/451] bitcoin: testing op_reversebytes_tests
[388/451] bitcoin: testing settings_tests
[389/451] Running utility command for check-bitcoin-op_reversebytes_tests
[390/451] bitcoin: testing timedata_tests
[391/451] bitcoin: testing blockcheck_tests
[392/451] bitcoin: testing radix_tests
[393/451] bitcoin: testing serialize_tests
[394/451] bitcoin: testing schnorr_tests
[395/451] bitcoin: testing transaction_tests
[396/451] Running utility command for check-bitcoin-settings_tests
[397/451] Running utility command for check-bitcoin-timedata_tests
[398/451] Running utility command for check-bitcoin-blockcheck_tests
[399/451] Running utility command for check-bitcoin-radix_tests
[400/451] Running utility command for check-bitcoin-serialize_tests
[401/451] Running utility command for check-bitcoin-transaction_tests
[402/451] bitcoin: testing streams_tests
[403/451] bitcoin: testing crypto_tests
[404/451] Running utility command for check-bitcoin-schnorr_tests
[405/451] Running utility command for check-bitcoin-streams_tests
[406/451] Running utility command for check-bitcoin-crypto_tests
[407/451] bitcoin: testing validation_flush_tests
[408/451] bitcoin: testing compilerbug_tests
[409/451] bitcoin: testing script_tests
[410/451] Running utility command for check-bitcoin-validation_flush_tests
[411/451] bitcoin: testing checkpoints_tests
[412/451] Running utility command for check-bitcoin-compilerbug_tests
[413/451] bitcoin: testing script_standard_tests
[414/451] Running utility command for check-bitcoin-script_tests
[415/451] Running utility command for check-bitcoin-script_standard_tests
[416/451] Running utility command for check-bitcoin-checkpoints_tests
[417/451] bitcoin: testing validationinterface_tests
[418/451] bitcoin: testing cashaddr_tests
[419/451] Running utility command for check-bitcoin-validationinterface_tests
[420/451] Running utility command for check-bitcoin-cashaddr_tests
[421/451] bitcoin: testing wallet_tests
[422/451] Running utility command for check-bitcoin-wallet_tests
[423/451] bitcoin: testing intmath_tests
[424/451] Running utility command for check-bitcoin-intmath_tests
[425/451] bitcoin: testing coinselector_tests
[426/451] Running utility command for check-bitcoin-coinselector_tests
[427/451] bitcoin: testing versionbits_tests
[428/451] Running utility command for check-bitcoin-versionbits_tests
[429/451] bitcoin: testing monolith_opcodes_tests
[430/451] bitcoin: testing util_tests
[431/451] Running utility command for check-bitcoin-monolith_opcodes_tests
[432/451] Running utility command for check-bitcoin-util_tests
[433/451] bitcoin: testing coins_tests
[434/451] Running utility command for check-bitcoin-coins_tests
[435/451] 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
Fabien planned changes to this revision.Nov 19 2021, 13:16

Tail of the build log:

wallet_hd.py                            | ✓ Passed  | 8 s
wallet_hd.py --descriptors              | ✓ Passed  | 6 s
wallet_import_rescan.py                 | ✓ Passed  | 10 s
wallet_import_with_label.py             | ✓ Passed  | 1 s
wallet_importdescriptors.py             | ✓ Passed  | 9 s
wallet_importmulti.py                   | ✓ Passed  | 6 s
wallet_importprunedfunds.py             | ✓ Passed  | 2 s
wallet_keypool.py                       | ✓ Passed  | 3 s
wallet_keypool_topup.py                 | ✓ Passed  | 4 s
wallet_keypool_topup.py --descriptors   | ✓ Passed  | 4 s
wallet_labels.py                        | ✓ Passed  | 3 s
wallet_labels.py --descriptors          | ✓ Passed  | 2 s
wallet_listreceivedby.py                | ✓ Passed  | 22 s
wallet_listsinceblock.py                | ✓ Passed  | 4 s
wallet_listtransactions.py              | ✓ Passed  | 10 s
wallet_multiwallet.py                   | ✓ Passed  | 54 s
wallet_multiwallet.py --usecli          | ✓ Passed  | 17 s
wallet_reorgsrestore.py                 | ✓ Passed  | 5 s
wallet_resendwallettransactions.py      | ✓ Passed  | 2 s
wallet_send.py                          | ✓ Passed  | 9 s
wallet_startup.py                       | ✓ Passed  | 3 s
wallet_txn_clone.py                     | ✓ Passed  | 3 s
wallet_txn_clone.py --mineblock         | ✓ Passed  | 4 s
wallet_txn_doublespend.py               | ✓ Passed  | 3 s
wallet_txn_doublespend.py --mineblock   | ✓ Passed  | 4 s
wallet_watchonly.py                     | ✓ Passed  | 1 s
wallet_watchonly.py --usecli            | ✓ Passed  | 2 s

ALL                                     | ✓ Passed  | 1410 s (accumulated) 
Runtime: 283 s

----------------------------------------------------------------------
Ran 10 tests in 0.175s

OK

[152/459] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.005s

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

OK
[186/459] Running seeder test suite
PASSED: seeder test suite
[396/459] Running secp256k1 test suite
PASSED: secp256k1 test suite
[416/459] Running pow test suite
PASSED: pow test suite
[437/459] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[442/459] 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

Fix running-the-tests-after-a-rename-but-forgot-to-save issue

Tail of the build log:

rpc_signrawtransaction.py               | ✓ Passed  | 1 s
rpc_txoutproof.py                       | ✓ Passed  | 1 s
rpc_uptime.py                           | ✓ Passed  | 1 s
rpc_users.py                            | ✓ Passed  | 6 s
rpc_whitelist.py                        | ✓ Passed  | 1 s
tool_wallet.py                          | ✓ Passed  | 4 s
wallet_abandonconflict.py               | ✓ Passed  | 6 s
wallet_address_types.py                 | ✓ Passed  | 17 s
wallet_avoidreuse.py                    | ✓ Passed  | 4 s
wallet_avoidreuse.py --descriptors      | ✓ Passed  | 5 s
wallet_backup.py                        | ✓ Passed  | 39 s
wallet_balance.py                       | ✓ Passed  | 6 s
wallet_basic.py                         | ✓ Passed  | 26 s
wallet_coinbase_category.py             | ✓ Passed  | 1 s
wallet_create_tx.py                     | ✓ Passed  | 17 s
wallet_createwallet.py                  | ✓ Passed  | 2 s
wallet_createwallet.py --usecli         | ✓ Passed  | 2 s
wallet_descriptor.py                    | ✓ Passed  | 22 s
wallet_disable.py                       | ✓ Passed  | 1 s
wallet_dump.py                          | ✓ Passed  | 4 s
wallet_encryption.py                    | ✓ Passed  | 5 s
wallet_encryption.py --descriptors      | ✓ Passed  | 6 s
wallet_hd.py                            | ✓ Passed  | 9 s
wallet_hd.py --descriptors              | ✓ Passed  | 9 s
wallet_import_rescan.py                 | ✓ Passed  | 6 s
wallet_import_with_label.py             | ✓ Passed  | 1 s
wallet_importdescriptors.py             | ✓ Passed  | 6 s
wallet_importmulti.py                   | ✓ Passed  | 3 s
wallet_importprunedfunds.py             | ✓ 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  | 2 s
wallet_labels.py --descriptors          | ✓ Passed  | 2 s
wallet_listreceivedby.py                | ✓ Passed  | 32 s
wallet_listsinceblock.py                | ✓ Passed  | 3 s
wallet_listtransactions.py              | ✓ Passed  | 11 s
wallet_multiwallet.py                   | ✓ Passed  | 41 s
wallet_multiwallet.py --usecli          | ✓ Passed  | 17 s
wallet_reorgsrestore.py                 | ✓ Passed  | 3 s
wallet_resendwallettransactions.py      | ✓ Passed  | 12 s
wallet_send.py                          | ✓ Passed  | 9 s
wallet_startup.py                       | ✓ Passed  | 2 s
wallet_txn_clone.py                     | ✓ Passed  | 1 s
wallet_txn_clone.py --mineblock         | ✓ Passed  | 3 s
wallet_txn_doublespend.py               | ✓ Passed  | 1 s
wallet_txn_doublespend.py --mineblock   | ✓ Passed  | 3 s
wallet_watchonly.py                     | ✓ Passed  | 1 s
wallet_watchonly.py --usecli            | ✓ Passed  | 1 s

ALL                                     | ✓ Passed  | 1169 s (accumulated) 
Runtime: 235 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

More logical return value

Fabien planned changes to this revision.Nov 24 2021, 08:28