Page MenuHomePhabricator

[avalanche] orphan pool for proofs, make AlreadyHave support proofs
Changes PlannedPublic

Authored by PiRK on Tue, Apr 6, 16:30.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

This adds a data structure to store orphan proofs, a bloom filter to remember invalid proofs that are sent to us to avoid checking them repeatedly, a method to find a proof if we already have it or return a nullptr if we don't.

This method is used in net_processing.cpp::AlreadyHave, used to tell if an
inventory message corresponds to an object we already have.

The revision also adds support for avaproof messages received from peers. Valid proofs are added to the peer pool, orphan proofs to the new orphan pool, and invalid proofs to the recentRejects filter.

Depends on D9394

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Tue, Apr 6, 16:30
PiRK planned changes to this revision.

Tail of the build log:

-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[326/502] Building CXX object src/CMakeFiles/util.dir/util/error.cpp.o
[327/502] Building CXX object src/CMakeFiles/util.dir/util/message.cpp.o
[328/502] Building CXX object src/CMakeFiles/util.dir/util/settings.cpp.o
[329/502] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/pubkey.cpp.o
[330/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[331/502] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/util/strencodings.cpp.o
[332/502] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[333/502] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[334/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[335/502] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[336/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[337/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[338/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[339/502] Building CXX object src/CMakeFiles/util.dir/util/time.cpp.o
[340/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[341/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[342/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[343/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[344/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[345/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[346/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[347/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[348/502] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqabstractnotifier.cpp.o
[349/502] Building CXX object src/CMakeFiles/util.dir/util/system.cpp.o
[350/502] Linking CXX static library src/libutil.a
[351/502] Linking CXX static library src/librpcclient.a
[352/502] Linking CXX static library src/libbitcoinconsensus.a
[353/502] Linking CXX static library src/libscript.a
[354/502] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[355/502] Linking CXX static library src/libcommon.a
[356/502] Linking CXX shared library src/libbitcoinconsensus.so.0.23.1
[357/502] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[358/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[359/502] Linking CXX executable src/bitcoin-cli
[360/502] Linking CXX executable src/bitcoin-tx
[361/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[362/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[363/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[364/502] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqnotificationinterface.cpp.o
[365/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[366/502] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqpublishnotifier.cpp.o
[367/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[368/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[369/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[370/502] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o
[371/502] Linking CXX static library src/zmq/libzmq.a
[372/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[373/502] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[374/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[375/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[376/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[377/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[378/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[379/502] Linking CXX static library src/wallet/libwallet.a
[380/502] Linking CXX static library src/wallet/libwallet-tool.a
[381/502] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

[323/500] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/hash.cpp.o
[324/500] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/uint256.cpp.o
[325/500] Building CXX object src/CMakeFiles/util.dir/util/message.cpp.o
[326/500] Building CXX object src/CMakeFiles/util.dir/util/error.cpp.o
[327/500] Building CXX object src/CMakeFiles/util.dir/util/settings.cpp.o
[328/500] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[329/500] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/util/strencodings.cpp.o
[330/500] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/pubkey.cpp.o
[331/500] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[332/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[333/500] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[334/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[335/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[336/500] Building CXX object src/CMakeFiles/util.dir/util/time.cpp.o
[337/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[338/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[339/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[340/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[341/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[342/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[343/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[344/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[345/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[346/500] Building CXX object src/CMakeFiles/util.dir/util/system.cpp.o
[347/500] Linking CXX static library src/libutil.a
[348/500] Linking CXX static library src/librpcclient.a
[349/500] Linking CXX static library src/libbitcoinconsensus.a
[350/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[351/500] Linking CXX static library src/libscript.a
[352/500] Linking CXX static library src/libcommon.a
[353/500] Linking CXX shared library src/libbitcoinconsensus.so.0.23.1
[354/500] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[355/500] Linking CXX executable src/bitcoin-cli
[356/500] Linking CXX executable src/bitcoin-tx
[357/500] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqabstractnotifier.cpp.o
[358/500] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[359/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[360/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[361/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[362/500] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqnotificationinterface.cpp.o
[363/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[364/500] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[365/500] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqpublishnotifier.cpp.o
[366/500] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[367/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[368/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[369/500] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o
[370/500] Linking CXX static library src/zmq/libzmq.a
[371/500] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[372/500] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[373/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[374/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[375/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[376/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[377/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[378/500] Linking CXX static library src/wallet/libwallet.a
[379/500] Linking CXX static library src/wallet/libwallet-tool.a
[380/500] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

Tail of the build log:

[331/502] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[332/502] Linking C static library src/secp256k1/libsecp256k1.a
[333/502] Linking CXX static library src/libbitcoinconsensus.a
[334/502] Linking C executable src/secp256k1/ecmult-bench
[335/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[336/502] Linking C executable src/secp256k1/internal-bench
[337/502] Linking C executable src/secp256k1/sign-bench
[338/502] Building CXX object src/CMakeFiles/script.dir/script/signingprovider.cpp.o
[339/502] Linking C executable src/secp256k1/verify-bench
[340/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[341/502] Linking C executable src/secp256k1/recover-bench
[342/502] Installing component secp256k1
-- Install configuration: "Debug"
-- Install component: "secp256k1"
-- Installing: /results/artifacts/lib/libsecp256k1.a
-- Installing: /results/artifacts/include/secp256k1.h
-- Installing: /results/artifacts/include/secp256k1_preallocated.h
-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[343/502] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[344/502] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[345/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[346/502] Linking CXX static library src/libscript.a
[347/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[348/502] Linking CXX static library src/libcommon.a
[349/502] Linking CXX shared library src/libbitcoinconsensus.so.0.23.1
[350/502] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[351/502] Linking CXX executable src/bitcoin-cli
[352/502] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[353/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[354/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[355/502] Linking CXX executable src/bitcoin-tx
[356/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[357/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[358/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[359/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[360/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[361/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[362/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[363/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[364/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[365/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[366/502] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[367/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[368/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[369/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[370/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[371/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[372/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[373/502] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[374/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[375/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[376/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[377/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[378/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[379/502] Linking CXX static library src/wallet/libwallet.a
[380/502] Linking CXX static library src/wallet/libwallet-tool.a
[381/502] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

[331/502] Installing component secp256k1
-- Install configuration: "RelWithDebInfo"
-- Install component: "secp256k1"
-- Installing: /results/artifacts/lib/libsecp256k1.a
-- Installing: /results/artifacts/include/secp256k1.h
-- Installing: /results/artifacts/include/secp256k1_preallocated.h
-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[332/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[333/502] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[334/502] Linking CXX static library src/libbitcoinconsensus.a
[335/502] Building CXX object src/CMakeFiles/common.dir/rpc/rawtransaction_util.cpp.o
[336/502] Building CXX object src/CMakeFiles/common.dir/rpc/util.cpp.o
[337/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[338/502] Building CXX object src/CMakeFiles/script.dir/script/interpreter.cpp.o
[339/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[340/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[341/502] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[342/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[343/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[344/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[345/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[346/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[347/502] Building CXX object src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o
[348/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[349/502] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[350/502] Linking CXX static library src/libscript.a
[351/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[352/502] Linking CXX static library src/libcommon.a
[353/502] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[354/502] Linking CXX shared library src/libbitcoinconsensus.so.0.23.1
[355/502] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[356/502] Linking CXX executable src/bitcoin-cli
[357/502] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[358/502] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[359/502] Linking CXX executable src/bitcoin-tx
[360/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[361/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[362/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[363/502] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[364/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[365/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[366/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[367/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[368/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[369/502] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[370/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[371/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[372/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[373/502] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[374/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[375/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[376/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[377/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[378/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[379/502] Linking CXX static library src/wallet/libwallet.a
[380/502] Linking CXX static library src/wallet/libwallet-tool.a
[381/502] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1

Tail of the build log:

[302/449] Building CXX object src/CMakeFiles/server.dir/pow/pow.cpp.o
[303/449] Building CXX object src/CMakeFiles/server.dir/pow/aserti32d.cpp.o
[304/449] Building CXX object src/CMakeFiles/server.dir/net.cpp.o
[305/449] Building CXX object src/CMakeFiles/server.dir/script/scriptcache.cpp.o
[306/449] Building CXX object src/CMakeFiles/server.dir/shutdown.cpp.o
[307/449] Building CXX object src/CMakeFiles/server.dir/node/ui_interface.cpp.o
[308/449] Building CXX object src/CMakeFiles/server.dir/rpc/abc.cpp.o
[309/449] Building CXX object src/CMakeFiles/server.dir/rest.cpp.o
[310/449] Building CXX object src/CMakeFiles/server.dir/rpc/misc.cpp.o
[311/449] Building CXX object src/CMakeFiles/server.dir/timedata.cpp.o
[312/449] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[313/449] Building CXX object src/CMakeFiles/server.dir/script/sigcache.cpp.o
[314/449] Building CXX object src/CMakeFiles/server.dir/rpc/server.cpp.o
[315/449] Building CXX object src/CMakeFiles/server.dir/versionbits.cpp.o
[316/449] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[317/449] Building C object src/secp256k1/CMakeFiles/sign-bench.dir/src/bench_sign.c.o
[318/449] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[319/449] Building C object src/secp256k1/CMakeFiles/verify-bench.dir/src/bench_verify.c.o
[320/449] Building C object src/secp256k1/CMakeFiles/recover-bench.dir/src/bench_recover.c.o
[321/449] Building CXX object src/CMakeFiles/server.dir/dummywallet.cpp.o
[322/449] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[323/449] Building CXX object src/CMakeFiles/server.dir/validationinterface.cpp.o
[324/449] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
[325/449] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[326/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[327/449] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[328/449] Linking C static library src/secp256k1/libsecp256k1.a
[329/449] Linking CXX static library src/libcommon.a
[330/449] Building CXX object src/CMakeFiles/server.dir/txdb.cpp.o
[331/449] Linking C executable src/secp256k1/ecmult-bench
[332/449] Linking CXX static library src/libscript.a
[333/449] Linking C executable src/secp256k1/internal-bench
[334/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[335/449] Linking CXX static library src/libbitcoinconsensus.a
[336/449] Linking C executable src/secp256k1/sign-bench
[337/449] Linking C executable src/secp256k1/verify-bench
[338/449] Linking CXX shared library src/libbitcoinconsensus.so.0.23.1
[339/449] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[340/449] Linking C executable src/secp256k1/recover-bench
[341/449] Linking CXX executable src/bitcoin-cli
[342/449] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
[343/449] Linking CXX static library src/zmq/libzmq.a
[344/449] Linking CXX executable src/bitcoin-tx
[345/449] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[346/449] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[347/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[348/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[349/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[350/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[351/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[352/449] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[353/449] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[354/449] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[355/449] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[356/449] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[357/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[358/449] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[359/449] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

fix index by proofid for PeerSet and ProofPool: we cannot use the same struct

PiRK planned changes to this revision.Wed, Apr 7, 17:20

Not ready yet

implement addProof, store fully valid proofs as new peers, store proofs with missing UTXOs as orphanProofs, make is a simple map (we can always change back it to a multi-index container if needed), replace hasProof with a getProof method that return a nullptr if we don't have it, rename previous Processor::getProof to Processor::getLocalProof

PiRK planned changes to this revision.Fri, Apr 9, 12:23

Tail of the build log:

[302/449] Building CXX object src/CMakeFiles/server.dir/node/transaction.cpp.o
[303/449] Building CXX object src/CMakeFiles/server.dir/pow/aserti32d.cpp.o
[304/449] Building CXX object src/CMakeFiles/server.dir/pow/pow.cpp.o
[305/449] Building CXX object src/CMakeFiles/server.dir/net.cpp.o
[306/449] Building CXX object src/CMakeFiles/server.dir/script/scriptcache.cpp.o
[307/449] Building CXX object src/CMakeFiles/server.dir/shutdown.cpp.o
[308/449] Building CXX object src/CMakeFiles/server.dir/script/sigcache.cpp.o
[309/449] Building CXX object src/CMakeFiles/server.dir/node/ui_interface.cpp.o
[310/449] Building CXX object src/CMakeFiles/server.dir/rest.cpp.o
[311/449] Building CXX object src/CMakeFiles/server.dir/rpc/abc.cpp.o
[312/449] Building CXX object src/CMakeFiles/server.dir/timedata.cpp.o
[313/449] Building CXX object src/CMakeFiles/server.dir/rpc/misc.cpp.o
[314/449] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[315/449] Building CXX object src/CMakeFiles/server.dir/versionbits.cpp.o
[316/449] Building CXX object src/CMakeFiles/server.dir/rpc/server.cpp.o
[317/449] Building C object src/secp256k1/CMakeFiles/sign-bench.dir/src/bench_sign.c.o
[318/449] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[319/449] Building C object src/secp256k1/CMakeFiles/verify-bench.dir/src/bench_verify.c.o
[320/449] Building C object src/secp256k1/CMakeFiles/recover-bench.dir/src/bench_recover.c.o
[321/449] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[322/449] Building CXX object src/CMakeFiles/server.dir/dummywallet.cpp.o
[323/449] Building CXX object src/CMakeFiles/server.dir/validationinterface.cpp.o
[324/449] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[325/449] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[326/449] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[327/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[328/449] Linking C static library src/secp256k1/libsecp256k1.a
[329/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[330/449] Linking C executable src/secp256k1/ecmult-bench
[331/449] Linking C executable src/secp256k1/internal-bench
[332/449] Building CXX object src/CMakeFiles/server.dir/txdb.cpp.o
[333/449] Linking C executable src/secp256k1/sign-bench
[334/449] Linking C executable src/secp256k1/verify-bench
[335/449] Linking C executable src/secp256k1/recover-bench
[336/449] Linking CXX static library src/zmq/libzmq.a
[337/449] Linking CXX static library src/libcommon.a
[338/449] Linking CXX static library src/libscript.a
[339/449] Linking CXX static library src/libbitcoinconsensus.a
[340/449] Linking CXX shared library src/libbitcoinconsensus.so.0.23.1
[341/449] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[342/449] Linking CXX executable src/bitcoin-cli
[343/449] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[344/449] Linking CXX executable src/bitcoin-tx
[345/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[346/449] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
[347/449] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[348/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[349/449] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[350/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[351/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[352/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[353/449] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[354/449] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[355/449] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[356/449] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[357/449] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[358/449] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[359/449] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Tail of the build log:

[331/502] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[332/502] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[333/502] Linking C static library src/secp256k1/libsecp256k1.a
[334/502] Building CXX object src/CMakeFiles/script.dir/script/signingprovider.cpp.o
[335/502] Linking CXX static library src/libbitcoinconsensus.a
[336/502] Linking C executable src/secp256k1/ecmult-bench
[337/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[338/502] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[339/502] Linking C executable src/secp256k1/internal-bench
[340/502] Linking C executable src/secp256k1/sign-bench
[341/502] Linking C executable src/secp256k1/verify-bench
[342/502] Linking C executable src/secp256k1/recover-bench
[343/502] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[344/502] Installing component secp256k1
-- Install configuration: "Debug"
-- Install component: "secp256k1"
-- Installing: /results/artifacts/lib/libsecp256k1.a
-- Installing: /results/artifacts/include/secp256k1.h
-- Installing: /results/artifacts/include/secp256k1_preallocated.h
-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[345/502] Linking CXX static library src/libscript.a
[346/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[347/502] Linking CXX static library src/libcommon.a
[348/502] Linking CXX shared library src/libbitcoinconsensus.so.0.23.1
[349/502] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[350/502] Linking CXX executable src/bitcoin-cli
[351/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[352/502] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[353/502] Linking CXX executable src/bitcoin-tx
[354/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[355/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[356/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[357/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[358/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[359/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[360/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[361/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[362/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[363/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[364/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[365/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[366/502] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[367/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[368/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[369/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[370/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[371/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[372/502] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[373/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[374/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[375/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[376/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[377/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[378/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[379/502] Linking CXX static library src/wallet/libwallet.a
[380/502] Linking CXX static library src/wallet/libwallet-tool.a
[381/502] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[325/502] Linking C executable src/secp256k1/recover-bench
[326/502] Building CXX object src/CMakeFiles/util.dir/util/error.cpp.o
[327/502] Building CXX object src/CMakeFiles/util.dir/util/message.cpp.o
[328/502] Building CXX object src/CMakeFiles/util.dir/util/settings.cpp.o
[329/502] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/util/strencodings.cpp.o
[330/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[331/502] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/pubkey.cpp.o
[332/502] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[333/502] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[334/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[335/502] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[336/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[337/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[338/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[339/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[340/502] Building CXX object src/CMakeFiles/util.dir/util/time.cpp.o
[341/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[342/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[343/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[344/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[345/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[346/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[347/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[348/502] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqabstractnotifier.cpp.o
[349/502] Building CXX object src/CMakeFiles/util.dir/util/system.cpp.o
[350/502] Linking CXX static library src/libutil.a
[351/502] Linking CXX static library src/librpcclient.a
[352/502] Linking CXX static library src/libbitcoinconsensus.a
[353/502] Linking CXX static library src/libscript.a
[354/502] Linking CXX static library src/libcommon.a
[355/502] Linking CXX shared library src/libbitcoinconsensus.so.0.23.1
[356/502] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[357/502] Linking CXX executable src/bitcoin-cli
[358/502] Linking CXX executable src/bitcoin-tx
[359/502] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[360/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[361/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[362/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[363/502] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqnotificationinterface.cpp.o
[364/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[365/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[366/502] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqpublishnotifier.cpp.o
[367/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[368/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[369/502] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o
[370/502] Linking CXX static library src/zmq/libzmq.a
[371/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[372/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[373/502] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[374/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[375/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[376/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[377/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[378/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[379/502] Linking CXX static library src/wallet/libwallet.a
[380/502] Linking CXX static library src/wallet/libwallet-tool.a
[381/502] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

[331/502] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[332/502] Linking C static library src/secp256k1/libsecp256k1.a
[333/502] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[334/502] Linking CXX static library src/libbitcoinconsensus.a
[335/502] Linking C executable src/secp256k1/ecmult-bench
[336/502] Linking C executable src/secp256k1/sign-bench
[337/502] Linking C executable src/secp256k1/internal-bench
[338/502] Linking C executable src/secp256k1/verify-bench
[339/502] Linking C executable src/secp256k1/recover-bench
[340/502] Installing component secp256k1
-- Install configuration: "RelWithDebInfo"
-- Install component: "secp256k1"
-- Installing: /results/artifacts/lib/libsecp256k1.a
-- Installing: /results/artifacts/include/secp256k1.h
-- Installing: /results/artifacts/include/secp256k1_preallocated.h
-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[341/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[342/502] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[343/502] Linking CXX static library src/libscript.a
[344/502] Linking CXX static library src/libcommon.a
[345/502] Linking CXX shared library src/libbitcoinconsensus.so.0.23.1
[346/502] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[347/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[348/502] Building CXX object src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o
[349/502] Linking CXX executable src/bitcoin-cli
[350/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[351/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[352/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[353/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[354/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[355/502] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[356/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[357/502] Linking CXX executable src/bitcoin-tx
[358/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[359/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[360/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[361/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[362/502] Linking CXX static library src/zmq/libzmq.a
[363/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[364/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[365/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[366/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[367/502] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[368/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[369/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[370/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[371/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[372/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[373/502] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[374/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[375/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[376/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[377/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[378/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[379/502] Linking CXX static library src/wallet/libwallet.a
[380/502] Linking CXX static library src/wallet/libwallet-tool.a
[381/502] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1

Tail of the build log:

[323/500] Linking C executable src/secp256k1/recover-bench
[324/500] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/uint256.cpp.o
[325/500] Building CXX object src/CMakeFiles/util.dir/util/error.cpp.o
[326/500] Building CXX object src/CMakeFiles/util.dir/util/message.cpp.o
[327/500] Building CXX object src/CMakeFiles/util.dir/util/settings.cpp.o
[328/500] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/util/strencodings.cpp.o
[329/500] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[330/500] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[331/500] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/pubkey.cpp.o
[332/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[333/500] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[334/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[335/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[336/500] Building CXX object src/CMakeFiles/util.dir/util/time.cpp.o
[337/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[338/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[339/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[340/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[341/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[342/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[343/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[344/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[345/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[346/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[347/500] Building CXX object src/CMakeFiles/util.dir/util/system.cpp.o
[348/500] Linking CXX static library src/libutil.a
[349/500] Linking CXX static library src/librpcclient.a
[350/500] Linking CXX static library src/libbitcoinconsensus.a
[351/500] Linking CXX static library src/libscript.a
[352/500] Linking CXX static library src/libcommon.a
[353/500] Linking CXX shared library src/libbitcoinconsensus.so.0.23.1
[354/500] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[355/500] Linking CXX executable src/bitcoin-cli
[356/500] Linking CXX executable src/bitcoin-tx
[357/500] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqabstractnotifier.cpp.o
[358/500] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[359/500] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[360/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[361/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[362/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[363/500] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqnotificationinterface.cpp.o
[364/500] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[365/500] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqpublishnotifier.cpp.o
[366/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[367/500] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[368/500] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o
[369/500] Linking CXX static library src/zmq/libzmq.a
[370/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[371/500] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[372/500] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[373/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[374/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[375/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[376/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[377/500] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[378/500] Linking CXX static library src/wallet/libwallet.a
[379/500] Linking CXX static library src/wallet/libwallet-tool.a
[380/500] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

fix build failure : I forgot to change init.cpp when renaming getLocalProof

PiRK planned changes to this revision.Fri, Apr 9, 13:01

Tail of the build log:

[337/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[338/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[339/502] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[340/502] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[341/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[342/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[343/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[344/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[345/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[346/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[347/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[348/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[349/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[350/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[351/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[352/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[353/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[354/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[355/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[356/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[357/502] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[358/502] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[359/502] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[360/502] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[361/502] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[362/502] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[363/502] Linking C static library src/secp256k1/libsecp256k1.a
[364/502] Linking CXX static library src/libbitcoinconsensus.a
[365/502] Installing component secp256k1
-- Install configuration: "RelWithDebInfo"
-- Install component: "secp256k1"
-- Installing: /results/artifacts/lib/libsecp256k1.a
-- Installing: /results/artifacts/include/secp256k1.h
-- Installing: /results/artifacts/include/secp256k1_preallocated.h
-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[366/502] Linking C executable src/secp256k1/verify-bench
[367/502] Linking C executable src/secp256k1/internal-bench
[368/502] Linking C executable src/secp256k1/ecmult-bench
[369/502] Linking C executable src/secp256k1/sign-bench
[370/502] Linking C executable src/secp256k1/recover-bench
[371/502] Linking CXX static library src/libscript.a
[372/502] Linking CXX static library src/libcommon.a
[373/502] Linking CXX shared library src/libbitcoinconsensus.so.0.23.1
[374/502] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[375/502] Linking CXX executable src/bitcoin-cli
[376/502] Linking CXX executable src/bitcoin-tx
[377/502] Linking CXX static library src/wallet/libwallet.a
[378/502] Linking CXX static library src/wallet/libwallet-tool.a
[379/502] Linking CXX executable src/bitcoin-wallet
[380/502] Building CXX object src/CMakeFiles/server.dir/avalanche/peermanager.cpp.o
FAILED: src/CMakeFiles/server.dir/avalanche/peermanager.cpp.o 
/usr/bin/ccache /usr/bin/clang++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -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 -Wformat-security -Wredundant-move -Wshadow -Wshadow-field -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/avalanche/peermanager.cpp.o -MF src/CMakeFiles/server.dir/avalanche/peermanager.cpp.o.d -o src/CMakeFiles/server.dir/avalanche/peermanager.cpp.o -c ../../src/avalanche/peermanager.cpp
../../src/avalanche/peermanager.cpp:475:57: error: calling function 'CoinsTip' requires holding mutex 'cs_main' exclusively [-Werror,-Wthread-safety-analysis]
    const CCoinsViewCache &coins = ::ChainstateActive().CoinsTip();
                                                        ^
1 error generated.
[381/502] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

fix nits and don't verify the proof twice

Add a state output parameter to fetchOrCreateProof to give the caller access to the validation state.

PiRK planned changes to this revision.Fri, Apr 9, 16:12

still missing tests

rebase onto D9394. This puts the getProof -> getLocalProof renaming in it's own diff

PiRK planned changes to this revision.Sun, Apr 11, 08:04

Add also a bloom filter for recent rejects, to avoid checking bad proof multiple time.

I'm thinking that we will need some more granularity when checking the proofs, to be able to tell if a "MISSING_UTXO" proof can ever become valid. But that is too much to cram into this diff.

add a functional test

this does not cover everything, but it is not easy at the moment to do this. It will be easier when nodes start responding to inventory messages

PiRK retitled this revision from [avalanche] implement a ProofPool and AlreadyHave for proofs to [avalanche] orphan pool for proofs, make AlreadyHave support proofs.
PiRK edited the summary of this revision. (Show Details)
deadalnix requested changes to this revision.Tue, Apr 13, 13:21
deadalnix added a subscriber: deadalnix.

This is doing to many things at once. You should break this up, and, as you do so, you'll discover that there are various holes in some parts. This is just going to take forever to get all the parts right if they all prevent each other from moving.

For instance, you just introduced an OOM DoS vector by not limiting the size of the orphan pool.

Add the specific function that you need with unit tests, then wire it into other layers of the node.

src/avalanche/peermanager.h
202

Taking an rvalue reference here is not useful, just take by value.

This revision now requires changes to proceed.Tue, Apr 13, 13:21
PiRK planned changes to this revision.Thu, Apr 15, 13:44

Working on splitting this in smaller pieces, with some refactoring :
D9423