Page MenuHomePhabricator

[avalanche] make avalanche peer discovery in a simple case
AbandonedPublic

Authored by PiRK on May 5 2021, 17:23.

Details

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

This implements a basic peer discovery mechanism that works only between active avalanche nodes with valid proofs.
A node sends an avahello message if it has a proof and the other peer signals the avalanche flag. Each peer then requests the other peer's proof with a GETDATA message using the proof id that is in the delegation included in the avahello message. If everything checks out, each node add the peer as a new avalanche peer.

A configuration option is added to disable this new behavior by default.

Test Plan

ninja all check-all

Diff Detail

Event Timeline

PiRK requested review of this revision.May 5 2021, 17:23
PiRK planned changes to this revision.

make it work (the test was taking the local and remote entropy in the wrong order, so checking the avahello signature failed)

TODO: make this new behavior depend on a configuration flag so it can be tested in a sandboxed environment first

PiRK planned changes to this revision.May 6 2021, 17:46
test/functional/abc_p2p_avalanche.py
50 ↗(On Diff #28372)

remove. That was part of an earlier iteration when the p2p_framework didn't send a proper delegation based on a proper proof.

130 ↗(On Diff #28372)

no need for a function inside another function

Add an -exchangeavaproofs configuration option, with default false. If false, don't ask for avaproof, don't reply to avaproof getdata requests, don't process AVAPROOF messages.
Unless a node enables this option, it shouldn't be able to add avalanche nodes automatically, and other nodes shouldn't be able to add it, unless it is done via the addavalanchenode RPC.

Add AVAPROOF to the list of messages to be ignored when enableavalanche is false. Test the discouragement behavior when a peer sends us an unsollicited message.

Minor improvements:

  • no need to implement __eq__ on AvalancheProof in the test framework to compare proofs, compare the serialized proofs instead
  • remove some unecessary comments -
PiRK edited the test plan for this revision. (Show Details)
deadalnix requested changes to this revision.May 7 2021, 13:29
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/net.h
1003 ↗(On Diff #28377)

There is no point storing the signature here.

src/net_processing.cpp
4061 ↗(On Diff #28377)

Why does this needs gating?

4066 ↗(On Diff #28377)

That isn't how getdata get sent. Why reinvent the wheel?

4105 ↗(On Diff #28377)

Why is this done here? It makes no sense.

This revision now requires changes to proceed.May 7 2021, 13:29
Mengerian added a task: Restricted Maniphest Task.May 28 2021, 16:30
PiRK edited the summary of this revision. (Show Details)

rebase onto current master. This fixes the avahello signature (D9565).

TODO:

  • now the proof sending is broken because Processor::getProof has been removed (D9589). This will be fixed after D9595 is merged and we can fetch the proof again.
  • send the GETDATA message the proper way
PiRK planned changes to this revision.Jun 2 2021, 15:29

Tail of the build log:

[341/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[342/506] Linking C static library src/secp256k1/libsecp256k1.a
[343/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[344/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[345/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[346/506] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[347/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[348/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[349/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[350/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[351/506] Linking CXX static library src/libbitcoinconsensus.a
[352/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[353/506] Linking C executable src/secp256k1/ecmult-bench
[354/506] Linking C executable src/secp256k1/internal-bench
[355/506] Linking C executable src/secp256k1/sign-bench
[356/506] Linking C executable src/secp256k1/recover-bench
[357/506] 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
[358/506] Linking C executable src/secp256k1/verify-bench
[359/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[360/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[361/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[362/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[363/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[364/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[365/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[366/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[367/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[368/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[369/506] Linking CXX static library src/libscript.a
[370/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[371/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[372/506] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[373/506] Linking CXX static library src/libcommon.a
[374/506] Linking CXX shared library src/libbitcoinconsensus.so.0.23.5
[375/506] Linking CXX executable src/bitcoin-cli
[376/506] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[377/506] Linking CXX executable src/bitcoin-tx
[378/506] Linking CXX static library src/wallet/libwallet.a
[379/506] Linking CXX static library src/wallet/libwallet-tool.a
[380/506] Linking CXX executable src/bitcoin-wallet
[381/506] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
FAILED: src/CMakeFiles/server.dir/net_processing.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/net_processing.cpp.o -MF src/CMakeFiles/server.dir/net_processing.cpp.o.d -o src/CMakeFiles/server.dir/net_processing.cpp.o -c ../../src/net_processing.cpp
../../src/net_processing.cpp:2025:57: error: no member named 'getProof' in 'avalanche::Processor'
            const avalanche::Proof proof = g_avalanche->getProof();
                                           ~~~~~~~~~~~  ^
1 error generated.
[382/506] Building CXX object src/CMakeFiles/server.dir/avalanche/processor.cpp.o
[383/506] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[384/506] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
[385/506] Building CXX object src/CMakeFiles/server.dir/validation.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:

[313/453] Building CXX object src/CMakeFiles/server.dir/rpc/misc.cpp.o
[314/453] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[315/453] Building CXX object src/CMakeFiles/server.dir/shutdown.cpp.o
[316/453] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[317/453] Building CXX object src/CMakeFiles/server.dir/script/sigcache.cpp.o
[318/453] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[319/453] Building CXX object src/CMakeFiles/server.dir/rpc/server.cpp.o
[320/453] Building CXX object src/CMakeFiles/server.dir/script/scriptcache.cpp.o
[321/453] Building CXX object src/CMakeFiles/server.dir/timedata.cpp.o
[322/453] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[323/453] Building CXX object src/CMakeFiles/server.dir/versionbits.cpp.o
[324/453] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[325/453] Building CXX object src/CMakeFiles/server.dir/txdb.cpp.o
[326/453] Building C object src/secp256k1/CMakeFiles/sign-bench.dir/src/bench_sign.c.o
[327/453] Building CXX object src/CMakeFiles/server.dir/validationinterface.cpp.o
[328/453] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[329/453] Building C object src/secp256k1/CMakeFiles/recover-bench.dir/src/bench_recover.c.o
[330/453] Building CXX object src/CMakeFiles/server.dir/dummywallet.cpp.o
[331/453] Building C object src/secp256k1/CMakeFiles/verify-bench.dir/src/bench_verify.c.o
[332/453] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[333/453] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[334/453] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[335/453] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[336/453] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[337/453] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[338/453] Linking C static library src/secp256k1/libsecp256k1.a
[339/453] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[340/453] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[341/453] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[342/453] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[343/453] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[344/453] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[345/453] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[346/453] Linking C executable src/secp256k1/sign-bench
[347/453] Linking C executable src/secp256k1/ecmult-bench
[348/453] Linking C executable src/secp256k1/internal-bench
[349/453] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[350/453] Linking C executable src/secp256k1/verify-bench
[351/453] Linking C executable src/secp256k1/recover-bench
[352/453] Linking CXX static library src/libcommon.a
[353/453] Linking CXX static library src/libscript.a
[354/453] Linking CXX static library src/libbitcoinconsensus.a
[355/453] Linking CXX shared library src/libbitcoinconsensus.so.0.23.5
[356/453] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[357/453] Linking CXX executable src/bitcoin-cli
[358/453] Linking CXX executable src/bitcoin-tx
[359/453] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
FAILED: src/CMakeFiles/server.dir/net_processing.cpp.o 
/usr/bin/ccache /usr/bin/c++  -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-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 -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/net_processing.cpp.o -MF src/CMakeFiles/server.dir/net_processing.cpp.o.d -o src/CMakeFiles/server.dir/net_processing.cpp.o -c ../../src/net_processing.cpp
../../src/net_processing.cpp: In function ‘void ProcessGetData(const Config&, CNode&, CConnman&, CTxMemPool&, const std::atomic<bool>&)’:
../../src/net_processing.cpp:2025:57: error: ‘class avalanche::Processor’ has no member named ‘getProof’; did you mean ‘getPeers’?
             const avalanche::Proof proof = g_avalanche->getProof();
                                                         ^~~~~~~~
                                                         getPeers
[360/453] Building CXX object src/CMakeFiles/server.dir/avalanche/processor.cpp.o
[361/453] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[362/453] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[363/453] Building CXX object src/CMakeFiles/server.dir/init.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:

[335/506] 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
[336/506] Linking C executable src/secp256k1/recover-bench
[337/506] Linking C executable src/secp256k1/verify-bench
[338/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[339/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[340/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[341/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[342/506] Building CXX object src/CMakeFiles/common.dir/warnings.cpp.o
[343/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[344/506] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[345/506] Building CXX object src/CMakeFiles/script.dir/script/interpreter.cpp.o
[346/506] Linking CXX static library src/libscript.a
[347/506] Linking CXX static library src/libcommon.a
[348/506] Linking CXX shared library src/libbitcoinconsensus.so.0.23.5
[349/506] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[350/506] Linking CXX executable src/bitcoin-cli
[351/506] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[352/506] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[353/506] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[354/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[355/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[356/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[357/506] Linking CXX executable src/bitcoin-tx
[358/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[359/506] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[360/506] Building CXX object src/CMakeFiles/server.dir/wallet/init.cpp.o
[361/506] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[362/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[363/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[364/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[365/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[366/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[367/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[368/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[369/506] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[370/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[371/506] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[372/506] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[373/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[374/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[375/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[376/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[377/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[378/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[379/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[380/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[381/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[382/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[383/506] Linking CXX static library src/wallet/libwallet.a
[384/506] Linking CXX static library src/wallet/libwallet-tool.a
[385/506] 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:

-- 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
[335/506] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[336/506] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[337/506] Building CXX object src/CMakeFiles/common.dir/psbt.cpp.o
[338/506] Linking CXX static library src/libbitcoinconsensus.a
[339/506] Building CXX object src/CMakeFiles/common.dir/core_read.cpp.o
[340/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[341/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[342/506] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[343/506] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[344/506] Linking C executable src/secp256k1/internal-bench
[345/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[346/506] Building CXX object src/CMakeFiles/common.dir/rpc/util.cpp.o
[347/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[348/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[349/506] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[350/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[351/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[352/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[353/506] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
[354/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[355/506] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[356/506] Linking CXX static library src/libscript.a
[357/506] Linking CXX static library src/libcommon.a
[358/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[359/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[360/506] Linking CXX shared library src/libbitcoinconsensus.so.0.23.5
[361/506] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[362/506] Linking CXX executable src/bitcoin-cli
[363/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[364/506] Linking CXX executable src/bitcoin-tx
[365/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[366/506] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[367/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[368/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[369/506] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[370/506] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[371/506] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[372/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[373/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[374/506] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[375/506] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[376/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[377/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[378/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[379/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[380/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[381/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[382/506] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[383/506] Linking CXX static library src/wallet/libwallet.a
[384/506] Linking CXX static library src/wallet/libwallet-tool.a
[385/506] 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:

[327/504] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/hash.cpp.o
[328/504] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/uint256.cpp.o
[329/504] Building CXX object src/CMakeFiles/util.dir/util/error.cpp.o
[330/504] Building CXX object src/CMakeFiles/util.dir/util/message.cpp.o
[331/504] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/util/strencodings.cpp.o
[332/504] Building CXX object src/CMakeFiles/util.dir/util/settings.cpp.o
[333/504] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[334/504] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/pubkey.cpp.o
[335/504] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[336/504] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[337/504] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[338/504] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[339/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[340/504] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[341/504] Building CXX object src/CMakeFiles/util.dir/util/time.cpp.o
[342/504] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[343/504] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[344/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[345/504] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[346/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[347/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[348/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[349/504] Building CXX object src/CMakeFiles/util.dir/util/system.cpp.o
[350/504] Linking CXX static library src/libutil.a
[351/504] Linking CXX static library src/librpcclient.a
[352/504] Linking CXX static library src/libbitcoinconsensus.a
[353/504] Linking CXX static library src/libscript.a
[354/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[355/504] Linking CXX static library src/libcommon.a
[356/504] Linking CXX shared library src/libbitcoinconsensus.so.0.23.5
[357/504] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[358/504] Linking CXX executable src/bitcoin-cli
[359/504] Linking CXX executable src/bitcoin-tx
[360/504] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[361/504] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqabstractnotifier.cpp.o
[362/504] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[363/504] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[364/504] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqnotificationinterface.cpp.o
[365/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[366/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[367/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[368/504] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[369/504] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqpublishnotifier.cpp.o
[370/504] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[371/504] Building CXX object src/zmq/CMakeFiles/zmq.dir/zmqrpc.cpp.o
[372/504] Linking CXX static library src/zmq/libzmq.a
[373/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[374/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[375/504] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[376/504] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[377/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[378/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[379/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[380/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[381/504] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[382/504] Linking CXX static library src/wallet/libwallet.a
[383/504] Linking CXX static library src/wallet/libwallet-tool.a
[384/504] 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

rebase on current master
Now this review does not need to implement GetData for proofs any longer. The proof needs to be verified by a local node before it can be requested. There is now a Processor::addProof method, so we can use in in the code handling NetMsgType::AVAPROOF messages to store proofs even if they don't belong to the node sending it (for now we are not looking for the owner to add it, in such a case).

TODO: after D9650 is merged we can call AddKnownProof when receiving an AVAPROOF msg.

PiRK planned changes to this revision.Jun 10 2021, 09:52