Page MenuHomePhabricator

[avalanche] Clear finalization when manually switching chaintips
ClosedPublic

Authored by sdulfari on Dec 13 2022, 18:34.

Details

Summary

Presumably calling park/unpark via RPC indicates intent to switch chaintips
even if the current tip has been avalanche finalized. Clearing this will allow
the retriggering of polling blocks near the tip(s).

Test Plan
ninja check check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Tail of the build log:

[362/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[363/535] Building CXX object src/CMakeFiles/server.dir/net.cpp.o
[364/535] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
FAILED: src/CMakeFiles/server.dir/validation.cpp.o 
/usr/bin/ccache /usr/bin/clang++ -DBOOST_AC_USE_STD_ATOMIC -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SP_USE_STD_ATOMIC -DBOOST_THREAD_DYN_LINK -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wgnu -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wthread-safety -Wrange-loop-analysis -Wredundant-decls -Wunreachable-code-loop-increment -Wsign-compare -Wconditional-uninitialized -Wdocumentation -Wformat-security -Wredundant-move -Woverloaded-virtual -Wshadow -Wshadow-field -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/validation.cpp.o -MF src/CMakeFiles/server.dir/validation.cpp.o.d -o src/CMakeFiles/server.dir/validation.cpp.o -c ../../src/validation.cpp
../../src/validation.cpp:3735:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
1 error generated.
[365/535] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[366/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[367/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[368/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[369/535] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[370/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[371/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[372/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[373/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[374/535] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[375/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[376/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[377/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[378/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/interfaces.cpp.o
[379/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[380/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/receive.cpp.o
[381/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[382/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/backup.cpp.o
[383/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/encrypt.cpp.o
[384/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/signmessage.cpp.o
[385/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/util.cpp.o
[386/535] Building CXX object src/CMakeFiles/server.dir/txorphanage.cpp.o
[387/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[388/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[389/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/spend.cpp.o
[390/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[391/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/transaction.cpp.o
[392/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[393/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[394/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[395/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[396/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[397/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[398/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[399/535] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[400/535] Linking CXX static library src/wallet/libwallet.a
[401/535] Linking CXX static library src/wallet/libwallet-tool.a
[402/535] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[403/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[404/535] Linking CXX executable src/bitcoin-wallet
[405/535] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[406/535] Building CXX object src/CMakeFiles/server.dir/wallet/init.cpp.o
[407/535] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[408/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[409/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[410/535] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[411/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[412/535] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[413/535] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

[363/535] Linking CXX executable src/bitcoin-tx
[364/535] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[365/535] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[366/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[367/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[368/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[369/535] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[370/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[371/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[372/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[373/535] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[374/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[375/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[376/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[377/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[378/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/interfaces.cpp.o
[379/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[380/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/receive.cpp.o
[381/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/backup.cpp.o
[382/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[383/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/encrypt.cpp.o
[384/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/signmessage.cpp.o
[385/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/util.cpp.o
[386/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[387/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[388/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/spend.cpp.o
[389/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[390/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/transaction.cpp.o
[391/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[392/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[393/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[394/535] Building CXX object src/CMakeFiles/server.dir/txorphanage.cpp.o
[395/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[396/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[397/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[398/535] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[399/535] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[400/535] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[401/535] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[402/535] Linking CXX static library src/wallet/libwallet.a
[403/535] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[404/535] Linking CXX static library src/wallet/libwallet-tool.a
[405/535] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
[406/535] Linking CXX executable src/bitcoin-wallet
[407/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[408/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[409/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[410/535] Building CXX object src/CMakeFiles/server.dir/wallet/init.cpp.o
[411/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[412/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[413/535] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
FAILED: src/CMakeFiles/server.dir/validation.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DABORT_ON_FAILED_ASSUME -DBOOST_AC_USE_STD_ATOMIC -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SP_USE_STD_ATOMIC -DBOOST_THREAD_DYN_LINK -DBUILD_BITCOIN_INTERNAL -DDEBUG -DDEBUG_LOCKORDER -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -O0 -fPIC -fvisibility=hidden -g3 -ftrapv -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wformat-security -Wredundant-move -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/validation.cpp.o -MF src/CMakeFiles/server.dir/validation.cpp.o.d -o src/CMakeFiles/server.dir/validation.cpp.o -c ../../src/validation.cpp
../../src/validation.cpp: In member function ‘bool CChainState::ClearAvalancheFinalizedBlock()’:
../../src/validation.cpp:3735:1: error: no return statement in function returning non-void [-Werror=return-type]
 3735 | }
      | ^
cc1plus: all warnings being treated as errors
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

[363/535] Building CXX object src/CMakeFiles/server.dir/txorphanage.cpp.o
[364/535] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[365/535] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[366/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[367/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[368/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[369/535] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[370/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[371/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[372/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[373/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[374/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[375/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[376/535] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[377/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/interfaces.cpp.o
[378/535] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[379/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[380/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/receive.cpp.o
[381/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[382/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/backup.cpp.o
[383/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/encrypt.cpp.o
[384/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/signmessage.cpp.o
[385/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/util.cpp.o
[386/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[387/535] Building CXX object src/CMakeFiles/server.dir/wallet/init.cpp.o
[388/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[389/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[390/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/spend.cpp.o
[391/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/transaction.cpp.o
[392/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[393/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[394/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[395/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[396/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[397/535] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[398/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[399/535] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[400/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[401/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[402/535] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[403/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[404/535] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
[405/535] Linking CXX static library src/wallet/libwallet.a
[406/535] Linking CXX static library src/wallet/libwallet-tool.a
[407/535] Linking CXX executable src/bitcoin-wallet
[408/535] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[409/535] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[410/535] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[411/535] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
[412/535] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
FAILED: src/CMakeFiles/server.dir/validation.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DBOOST_AC_USE_STD_ATOMIC -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SP_USE_STD_ATOMIC -DBOOST_THREAD_DYN_LINK -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wformat-security -Wredundant-move -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/validation.cpp.o -MF src/CMakeFiles/server.dir/validation.cpp.o.d -o src/CMakeFiles/server.dir/validation.cpp.o -c ../../src/validation.cpp
../../src/validation.cpp: In member function ‘bool CChainState::ClearAvalancheFinalizedBlock()’:
../../src/validation.cpp:3735:1: error: no return statement in function returning non-void [-Werror=return-type]
 3735 | }
      | ^
cc1plus: all warnings being treated as errors
[413/535] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1

Tail of the build log:

[334/475] Building CXX object src/CMakeFiles/server.dir/timedata.cpp.o
[335/475] Building CXX object src/CMakeFiles/server.dir/rpc/server.cpp.o
[336/475] Building CXX object src/CMakeFiles/server.dir/versionbits.cpp.o
[337/475] Building CXX object src/CMakeFiles/server.dir/txdb.cpp.o
[338/475] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[339/475] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
[340/475] Building CXX object src/CMakeFiles/server.dir/txorphanage.cpp.o
[341/475] Building C object src/secp256k1/CMakeFiles/recover-bench.dir/src/bench_recover.c.o
[342/475] Building CXX object src/CMakeFiles/server.dir/validationinterface.cpp.o
[343/475] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[344/475] Building C object src/secp256k1/CMakeFiles/sign-bench.dir/src/bench_sign.c.o
[345/475] Building C object src/secp256k1/CMakeFiles/verify-bench.dir/src/bench_verify.c.o
[346/475] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[347/475] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[348/475] Building CXX object src/CMakeFiles/server.dir/dummywallet.cpp.o
[349/475] Linking C static library src/secp256k1/libsecp256k1.a
[350/475] Linking CXX static library src/libscript.a
[351/475] Linking CXX static library src/libbitcoinconsensus.a
[352/475] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[353/475] Linking C executable src/secp256k1/recover-bench
[354/475] Linking C executable src/secp256k1/ecmult-bench
[355/475] Linking CXX static library src/libcommon.a
[356/475] Linking C executable src/secp256k1/verify-bench
[357/475] Linking CXX shared library src/libbitcoinconsensus.so.0.26.8
[358/475] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[359/475] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[360/475] Linking C executable src/secp256k1/sign-bench
[361/475] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[362/475] Linking CXX executable src/bitcoin-cli
[363/475] Linking C executable src/secp256k1/internal-bench
[364/475] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[365/475] Building CXX object src/CMakeFiles/bitcoind.dir/bitcoind.cpp.o
[366/475] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[367/475] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[368/475] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[369/475] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[370/475] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[371/475] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[372/475] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[373/475] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[374/475] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
[375/475] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[376/475] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[377/475] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[378/475] Linking CXX executable src/bitcoin-tx
[379/475] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[380/475] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[381/475] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[382/475] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[383/475] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[384/475] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
FAILED: src/CMakeFiles/server.dir/validation.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DBOOST_AC_USE_STD_ATOMIC -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SP_USE_STD_ATOMIC -DBOOST_THREAD_DYN_LINK -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wformat-security -Wredundant-move -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/validation.cpp.o -MF src/CMakeFiles/server.dir/validation.cpp.o.d -o src/CMakeFiles/server.dir/validation.cpp.o -c ../../src/validation.cpp
../../src/validation.cpp: In member function ‘bool CChainState::ClearAvalancheFinalizedBlock()’:
../../src/validation.cpp:3735:1: error: no return statement in function returning non-void [-Werror=return-type]
 3735 | }
      | ^
cc1plus: all warnings being treated as errors
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1
  • Fix cs_main locking
  • Fix clearing logic in parkblock
  • Add some tests

Do not assume finalization is near the current chaintip when calling unparkblock

Failed tests logs:

====== Bitcoin ABC functional tests: abc_p2p_avalanche_voting.py ======

------- Stdout: -------
2022-12-13T20:20:16.438000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20221213_201629/abc_p2p_avalanche_voting_50
2022-12-13T20:20:19.670000Z TestFramework (INFO): Poll for the chain tip...
2022-12-13T20:20:19.738000Z TestFramework (INFO): Poll for a selection of blocks...
2022-12-13T20:20:19.805000Z TestFramework (INFO): Poll for a selection of blocks, but some are now invalid...
2022-12-13T20:20:19.974000Z TestFramework (INFO): Poll for unknown blocks...
2022-12-13T20:20:20.042000Z TestFramework (INFO): Trigger polling from the node...
2022-12-13T20:20:20.403000Z TestFramework (INFO): Answer all polls to finalize...
2022-12-13T20:20:24.383000Z TestFramework (INFO): Answer all polls to park...
2022-12-13T20:20:41.627000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
        def has_finalized_new_tip():
            can_find_block_in_poll(hash_tip_final)
            return node.isfinalblock(fork_tip)
'''
2022-12-13T20:20:41.627000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 135, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_avalanche_voting.py", line 228, in run_test
    self.wait_until(has_finalized_new_tip, timeout=15)
  File "/work/test/functional/test_framework/test_framework.py", line 703, in wait_until
    return wait_until_helper(test_function, timeout=timeout,
  File "/work/test/functional/test_framework/util.py", line 285, in wait_until_helper
    raise AssertionError(
AssertionError: Predicate ''''
        def has_finalized_new_tip():
            can_find_block_in_poll(hash_tip_final)
            return node.isfinalblock(fork_tip)
''' not true after 15.0 seconds
2022-12-13T20:20:41.677000Z TestFramework (INFO): Stopping nodes
2022-12-13T20:20:41.829000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20221213_201629/abc_p2p_avalanche_voting_50
2022-12-13T20:20:41.830000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20221213_201629/abc_p2p_avalanche_voting_50/test_framework.log
2022-12-13T20:20:41.830000Z TestFramework (ERROR): 
2022-12-13T20:20:41.830000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20221213_201629/abc_p2p_avalanche_voting_50' to consolidate all logs
2022-12-13T20:20:41.830000Z TestFramework (ERROR): 
2022-12-13T20:20:41.830000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2022-12-13T20:20:41.830000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2022-12-13T20:20:41.830000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: abc_p2p_avalanche_voting.py

Bail early if block is already unparked

Failed tests logs:

====== Bitcoin ABC functional tests: abc-parkedchain.py ======

------- Stdout: -------
2022-12-13T20:30:18.133000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20221213_202708/abc-parkedchain_35
2022-12-13T20:30:18.828000Z TestFramework (INFO): Test chain parking...
2022-12-13T20:30:19.906000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 135, in main
    self.run_test()
  File "/work/test/functional/abc-parkedchain.py", line 65, in run_test
    assert_equal(node.getbestblockhash(), parked_tip)
  File "/work/test/functional/test_framework/util.py", line 61, in assert_equal
    raise AssertionError("not({})".format(" == ".join(str(arg)
AssertionError: not(2434cf0cce9a5488a3d905cc2f70be887fd2971988c8fd0763616e35c0fbba4b == 60796e03b9504d3e7360afd7b09bbff1df892cc90eed977e792da1d178f3aa91)
2022-12-13T20:30:19.957000Z TestFramework (INFO): Stopping nodes
2022-12-13T20:30:20.360000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20221213_202708/abc-parkedchain_35
2022-12-13T20:30:20.360000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20221213_202708/abc-parkedchain_35/test_framework.log
2022-12-13T20:30:20.360000Z TestFramework (ERROR): 
2022-12-13T20:30:20.360000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20221213_202708/abc-parkedchain_35' to consolidate all logs
2022-12-13T20:30:20.360000Z TestFramework (ERROR): 
2022-12-13T20:30:20.360000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2022-12-13T20:30:20.360000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2022-12-13T20:30:20.360000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: abc-parkedchain.py

Failed tests logs:

====== Bitcoin ABC functional tests: abc-parkedchain.py ======

------- Stdout: -------
2022-12-13T20:33:51.315000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221213_203141/abc-parkedchain_35
2022-12-13T20:33:51.715000Z TestFramework (INFO): Test chain parking...
2022-12-13T20:33:51.739000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 135, in main
    self.run_test()
  File "/work/test/functional/abc-parkedchain.py", line 65, in run_test
    assert_equal(node.getbestblockhash(), parked_tip)
  File "/work/test/functional/test_framework/util.py", line 61, in assert_equal
    raise AssertionError("not({})".format(" == ".join(str(arg)
AssertionError: not(4764dd754c5dcb25b86494f1b348c8c78702b812afb149303d8757bb9594e33c == 3d47f759d6c7436a5be6a818adfbfcb5f6ccd1303f560a01ef9e646d0754723c)
2022-12-13T20:33:51.790000Z TestFramework (INFO): Stopping nodes
2022-12-13T20:33:51.895000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221213_203141/abc-parkedchain_35
2022-12-13T20:33:51.895000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221213_203141/abc-parkedchain_35/test_framework.log
2022-12-13T20:33:51.895000Z TestFramework (ERROR): 
2022-12-13T20:33:51.896000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221213_203141/abc-parkedchain_35' to consolidate all logs
2022-12-13T20:33:51.896000Z TestFramework (ERROR): 
2022-12-13T20:33:51.896000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2022-12-13T20:33:51.896000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2022-12-13T20:33:51.897000Z TestFramework (ERROR):
====== Bitcoin ABC functional tests with the next upgrade activated: abc-parkedchain.py ======

------- Stdout: -------
2022-12-13T20:37:50.284000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221213_203541/abc-parkedchain_35
2022-12-13T20:37:50.687000Z TestFramework (INFO): Test chain parking...
2022-12-13T20:37:51.711000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 135, in main
    self.run_test()
  File "/work/test/functional/abc-parkedchain.py", line 65, in run_test
    assert_equal(node.getbestblockhash(), parked_tip)
  File "/work/test/functional/test_framework/util.py", line 61, in assert_equal
    raise AssertionError("not({})".format(" == ".join(str(arg)
AssertionError: not(08c9553d207b7d088c4542013a95bb7407592505b682e3db9d40dd7d0f2ce691 == 74961431699ef24005f23f4388c3de5cdef5bda46a54f0bfebe5450be08972b4)
2022-12-13T20:37:51.762000Z TestFramework (INFO): Stopping nodes
2022-12-13T20:37:51.863000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221213_203541/abc-parkedchain_35
2022-12-13T20:37:51.863000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221213_203541/abc-parkedchain_35/test_framework.log
2022-12-13T20:37:51.863000Z TestFramework (ERROR): 
2022-12-13T20:37:51.864000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20221213_203541/abc-parkedchain_35' to consolidate all logs
2022-12-13T20:37:51.864000Z TestFramework (ERROR): 
2022-12-13T20:37:51.864000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2022-12-13T20:37:51.864000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2022-12-13T20:37:51.864000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: abc-parkedchain.py
Bitcoin ABC functional tests with the next upgrade activated: abc-parkedchain.py

  • Fix bailing early check to include parked parents
  • Make tests less flaky
sdulfari published this revision for review.Dec 13 2022, 22:53
Fabien added a subscriber: Fabien.

Please fix the nit before landing

src/rpc/blockchain.cpp
2404–2405 ↗(On Diff #37267)

Can be simplified

This revision is now accepted and ready to land.Dec 14 2022, 08:53