Page MenuHomePhabricator

[Chronik] Add `ChronikBridge` to access the node from Rust
ClosedPublic

Authored by tobias_ruck on Sep 26 2022, 16:44.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC9045d36906ec: [Chronik] Add `ChronikBridge` to access the node from Rust
Summary

Chronik needs to be able to read data from the node. We add ChronikBridge (which stores a reference to NodeContext), which currently exposes get_chain_tip to get the tip of the chain.

Since for Rust this is an opaque C++ type, we need to pass it around as std::unique_ptr, using make_bridge. Eventually, this will be part of the Chronik struct so we can access the node when we need.

Test Plan
  1. ninja test_bitcoin
  2. ./src/test/test_bitcoin -t chronikbridge_tests

Diff Detail

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

Event Timeline

Tail of the build log:

[347/528] Building CXX object src/CMakeFiles/script.dir/script/interpreter.cpp.o
[348/528] Building CXX object src/CMakeFiles/script.dir/script/sign.cpp.o
[349/528] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[350/528] Building CXX object src/CMakeFiles/common.dir/rpc/util.cpp.o
[351/528] Building CXX object src/CMakeFiles/script.dir/script/signingprovider.cpp.o
[352/528] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[353/528] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[354/528] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[355/528] Linking C static library src/secp256k1/libsecp256k1.a
[356/528] Linking CXX static library src/libbitcoinconsensus.a
[357/528] Linking C executable src/secp256k1/ecmult-bench
[358/528] Linking C executable src/secp256k1/internal-bench
[359/528] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[360/528] Linking C executable src/secp256k1/sign-bench
[361/528] Linking C executable src/secp256k1/verify-bench
[362/528] Linking C executable src/secp256k1/recover-bench
[363/528] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[364/528] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[365/528] Building CXX object src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o
[366/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[367/528] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[368/528] Linking CXX static library src/libscript.a
[369/528] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[370/528] Linking CXX static library src/libcommon.a
[371/528] Linking CXX shared library src/libbitcoinconsensus.so.0.26.2
[372/528] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[373/528] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[374/528] Linking CXX executable src/bitcoin-cli
[375/528] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[376/528] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[377/528] Linking CXX executable src/bitcoin-tx
[378/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[379/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[380/528] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[381/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[382/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[383/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[384/528] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[385/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[386/528] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[387/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[388/528] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[389/528] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[390/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[391/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[392/528] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[393/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[394/528] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[395/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[396/528] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[397/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[398/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[399/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[400/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[401/528] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[402/528] Linking CXX static library src/wallet/libwallet.a
[403/528] Linking CXX static library src/wallet/libwallet-tool.a
[404/528] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-chronik failed with exit code 1
Fabien requested changes to this revision.Sep 27 2022, 09:24
Fabien added inline comments.
chronik/CMakeLists.txt
107 ↗(On Diff #35193)

Just target_link_libraries(chronik leveldb)

chronik/chronik-cpp/chronik_bridge.cpp
35 ↗(On Diff #35193)

needs cs_main to be locked, and should be const

chronik/chronik-lib/src/bridge.rs
16 ↗(On Diff #35193)

This log is not useful and doesn't replace a proper test for the get_chain_tip() method

This revision now requires changes to proceed.Sep 27 2022, 09:24

Remove integration into setup_chronik (for now), and add chronikbridge_tests

Tail of the build log:

[178/482] Test Bitcoin utilities...
[179/482] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/eda_tests.cpp.o
[180/482] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/aserti32d_tests.cpp.o
[181/482] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/grasberg_tests.cpp.o
[182/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/bitcoinaddressvalidatortests.cpp.o
[183/482] Linking CXX executable src/pow/test/test-pow
[184/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/compattests.cpp.o
[185/482] pow: testing eda_tests
[186/482] Running utility command for check-pow-eda_tests
[187/482] pow: testing daa_tests
[188/482] Running utility command for check-pow-daa_tests
[189/482] pow: testing grasberg_tests
[190/482] Running utility command for check-pow-grasberg_tests
[191/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/util.cpp.o
[192/482] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_tests.cpp.o
[193/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/guiutiltests.cpp.o
[194/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_bitcoin-qt_autogen/mocs_compilation.cpp.o
[195/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/apptests.cpp.o
[196/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/uritests.cpp.o
[197/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_main.cpp.o
[198/482] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/peermanager_tests.cpp.o
[199/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/rpcnestedtests.cpp.o
[200/482] pow: testing aserti32d_tests
[201/482] Running utility command for check-pow-aserti32d_tests
[202/482] Running pow test suite
PASSED: pow test suite
[203/482] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/util_tests.cpp.o
[204/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/__/__/wallet/test/wallet_test_fixture.cpp.o
[205/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/paymentservertests.cpp.o
[206/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/addressbooktests.cpp.o
[207/482] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/processor_tests.cpp.o
[208/482] Linking CXX executable src/avalanche/test/test-avalanche
[209/482] avalanche: testing init_tests
[210/482] Running utility command for check-avalanche-init_tests
[211/482] avalanche: testing delegation_tests
[212/482] Running utility command for check-avalanche-delegation_tests
[213/482] avalanche: testing proofcomparator_tests
[214/482] Running utility command for check-avalanche-proofcomparator_tests
[215/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.o
[216/482] avalanche: testing proofpool_tests
[217/482] Running utility command for check-avalanche-proofpool_tests
[218/482] Linking CXX executable src/qt/test/test_bitcoin-qt
[219/482] avalanche: testing proof_tests
[220/482] Running utility command for check-avalanche-proof_tests
[221/482] avalanche: testing compactproofs_tests
[222/482] Running utility command for check-avalanche-compactproofs_tests
[223/482] bitcoin-qt: testing test_bitcoin-qt
[224/482] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[225/482] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
[226/482] avalanche: testing processor_tests
[227/482] Running utility command for check-avalanche-processor_tests
[228/482] avalanche: testing peermanager_tests
[229/482] Running utility command for check-avalanche-peermanager_tests
[230/482] avalanche: testing voterecord_tests
[231/482] Running utility command for check-avalanche-voterecord_tests
[232/482] Running avalanche test suite
PASSED: avalanche test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

[171/475] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/coinselector_tests.cpp.o
[172/475] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/daa_tests.cpp.o
[173/475] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/proofpool_tests.cpp.o
[174/475] Linking CXX executable src/avalanche/test/test-avalanche
[175/475] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/aserti32d_tests.cpp.o
[176/475] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/eda_tests.cpp.o
[177/475] avalanche: testing init_tests
[178/475] Running utility command for check-avalanche-init_tests
[179/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/bitcoinaddressvalidatortests.cpp.o
[180/475] avalanche: testing compactproofs_tests
[181/475] Running utility command for check-avalanche-compactproofs_tests
[182/475] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/grasberg_tests.cpp.o
[183/475] avalanche: testing delegation_tests
[184/475] Running utility command for check-avalanche-delegation_tests
[185/475] avalanche: testing proofcomparator_tests
[186/475] Running utility command for check-avalanche-proofcomparator_tests
[187/475] avalanche: testing proofpool_tests
[188/475] Running utility command for check-avalanche-proofpool_tests
[189/475] avalanche: testing proof_tests
[190/475] Running utility command for check-avalanche-proof_tests
[191/475] avalanche: testing processor_tests
[192/475] Running utility command for check-avalanche-processor_tests
[193/475] Linking CXX executable src/pow/test/test-pow
[194/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/compattests.cpp.o
[195/475] pow: testing daa_tests
[196/475] Running utility command for check-pow-daa_tests
[197/475] pow: testing eda_tests
[198/475] Running utility command for check-pow-eda_tests
[199/475] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/util_tests.cpp.o
[200/475] pow: testing grasberg_tests
[201/475] Running utility command for check-pow-grasberg_tests
[202/475] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_tests.cpp.o
[203/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_bitcoin-qt_autogen/mocs_compilation.cpp.o
[204/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/util.cpp.o
[205/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/guiutiltests.cpp.o
[206/475] avalanche: testing peermanager_tests
[207/475] Running utility command for check-avalanche-peermanager_tests
[208/475] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
[209/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/apptests.cpp.o
[210/475] pow: testing aserti32d_tests
[211/475] Running utility command for check-pow-aserti32d_tests
[212/475] Running pow test suite
PASSED: pow test suite
[213/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/rpcnestedtests.cpp.o
[214/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_main.cpp.o
[215/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/uritests.cpp.o
[216/475] avalanche: testing voterecord_tests
[217/475] Running utility command for check-avalanche-voterecord_tests
[218/475] Running avalanche test suite
PASSED: avalanche test suite
[219/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/__/__/wallet/test/wallet_test_fixture.cpp.o
[220/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/paymentservertests.cpp.o
[221/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/addressbooktests.cpp.o
[222/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.o
[223/475] Linking CXX executable src/qt/test/test_bitcoin-qt
[224/475] bitcoin-qt: testing test_bitcoin-qt
[225/475] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

Tail of the build log:

[186/482] seeder: testing options_tests
[187/482] Running utility command for check-seeder-write_name_tests
[188/482] seeder: testing message_writer_tests
[189/482] Running utility command for check-seeder-options_tests
[190/482] Running utility command for check-seeder-message_writer_tests
[191/482] avalanche: testing proof_tests
[192/482] seeder: testing p2p_messaging_tests
[193/482] Running utility command for check-avalanche-proof_tests
[194/482] Running utility command for check-seeder-p2p_messaging_tests
[195/482] seeder: testing parse_name_tests
[196/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/bitcoinaddressvalidatortests.cpp.o
[197/482] pow: testing grasberg_tests
[198/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/apptests.cpp.o
[199/482] Running utility command for check-seeder-parse_name_tests
[200/482] Running utility command for check-pow-grasberg_tests
[201/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/compattests.cpp.o
[202/482] Running seeder test suite
PASSED: seeder test suite
[203/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/guiutiltests.cpp.o
[204/482] Test Bitcoin utilities...
[205/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/util.cpp.o
[206/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/rpcnestedtests.cpp.o
[207/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/uritests.cpp.o
[208/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/__/__/wallet/test/wallet_test_fixture.cpp.o
[209/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_main.cpp.o
[210/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/addressbooktests.cpp.o
[211/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.o
[212/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/paymentservertests.cpp.o
[213/482] avalanche: testing compactproofs_tests
[214/482] Running utility command for check-avalanche-compactproofs_tests
[215/482] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_bitcoin-qt_autogen/mocs_compilation.cpp.o
[216/482] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/chronikbridge_tests.cpp.o
FAILED: src/test/CMakeFiles/test_bitcoin.dir/chronikbridge_tests.cpp.o 
/usr/bin/ccache /usr/bin/clang++ -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBOOST_TEST_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/univalue/include -I../../src/. -Isrc -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIE -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/test/CMakeFiles/test_bitcoin.dir/chronikbridge_tests.cpp.o -MF src/test/CMakeFiles/test_bitcoin.dir/chronikbridge_tests.cpp.o.d -o src/test/CMakeFiles/test_bitcoin.dir/chronikbridge_tests.cpp.o -c ../../src/test/chronikbridge_tests.cpp
../../src/test/chronikbridge_tests.cpp:5:10: fatal error: 'chronik-bridge/src/ffi.rs.h' file not found
#include <chronik-bridge/src/ffi.rs.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[217/482] Linking CXX executable src/qt/test/test_bitcoin-qt
[218/482] avalanche: testing processor_tests
[219/482] Running utility command for check-avalanche-processor_tests
[220/482] bitcoin-qt: testing test_bitcoin-qt
[221/482] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[222/482] avalanche: testing peermanager_tests
[223/482] Running utility command for check-avalanche-peermanager_tests
[224/482] pow: testing aserti32d_tests
[225/482] Running utility command for check-pow-aserti32d_tests
[226/482] Running pow test suite
PASSED: pow test suite
[227/482] secp256k1: testing secp256k1-exhaustive_tests
[228/482] avalanche: testing voterecord_tests
[229/482] Running utility command for check-avalanche-voterecord_tests
[230/482] Running avalanche test suite
PASSED: avalanche test suite
[231/482] secp256k1: testing secp256k1-tests
[232/482] Running secp256k1 test suite
PASSED: secp256k1 test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

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

ALL                                       | ✓ Passed  | 1832 s (accumulated) 
Runtime: 372 s

----------------------------------------------------------------------
Ran 9 tests in 0.191s

OK

[161/483] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.020s

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

OK
[183/483] Running seeder test suite
PASSED: seeder test suite
[222/483] Running pow test suite
PASSED: pow test suite
[225/483] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[230/483] Running avalanche test suite
PASSED: avalanche test suite
[232/483] Running secp256k1 test suite
PASSED: secp256k1 test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

wallet_keypool_topup.py                   | ○ Skipped | 0 s
wallet_keypool_topup.py --descriptors     | ○ Skipped | 0 s
wallet_labels.py                          | ○ Skipped | 0 s
wallet_labels.py --descriptors            | ○ Skipped | 0 s
wallet_listreceivedby.py                  | ○ Skipped | 0 s
wallet_listsinceblock.py                  | ○ Skipped | 0 s
wallet_listsinceblock.py --descriptors    | ○ Skipped | 0 s
wallet_listtransactions.py                | ○ Skipped | 0 s
wallet_listtransactions.py --descriptors  | ○ Skipped | 0 s
wallet_multiwallet.py                     | ○ Skipped | 0 s
wallet_multiwallet.py --usecli            | ○ Skipped | 0 s
wallet_reorgsrestore.py                   | ○ Skipped | 0 s
wallet_resendwallettransactions.py        | ○ Skipped | 0 s
wallet_send.py                            | ○ Skipped | 0 s
wallet_startup.py                         | ○ Skipped | 0 s
wallet_txn_clone.py                       | ○ Skipped | 0 s
wallet_txn_clone.py --mineblock           | ○ Skipped | 0 s
wallet_txn_doublespend.py                 | ○ Skipped | 0 s
wallet_txn_doublespend.py --mineblock     | ○ Skipped | 0 s
wallet_watchonly.py                       | ○ Skipped | 0 s
wallet_watchonly.py --usecli              | ○ Skipped | 0 s

ALL                                       | ✓ Passed  | 671 s (accumulated) 
Runtime: 135 s

----------------------------------------------------------------------
Ran 9 tests in 0.156s

OK

[170/443] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.006s

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

OK
[196/443] Running seeder test suite
PASSED: seeder test suite
[199/443] Running pow test suite
PASSED: pow test suite
[203/443] Running avalanche test suite
PASSED: avalanche test suite
[208/443] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[209/443] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
In file included from /usr/include/boost/test/unit_test.hpp:19,
                 from ../../src/test/script_tests.cpp:30:
../../src/test/script_tests.cpp: In member function ‘void script_tests::script_build::test_method()’:
../../src/test/script_tests.cpp:540:22: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 BOOST_AUTO_TEST_CASE(script_build) {
                      ^~~~~~~~~~~~
[210/443] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/util_tests.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:

[171/475] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/daa_tests.cpp.o
[172/475] Test Bitcoin utilities...
[173/475] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/proofpool_tests.cpp.o
[174/475] Linking CXX executable src/avalanche/test/test-avalanche
[175/475] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/aserti32d_tests.cpp.o
[176/475] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/eda_tests.cpp.o
[177/475] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/grasberg_tests.cpp.o
[178/475] avalanche: testing init_tests
[179/475] Running utility command for check-avalanche-init_tests
[180/475] avalanche: testing compactproofs_tests
[181/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/bitcoinaddressvalidatortests.cpp.o
[182/475] Running utility command for check-avalanche-compactproofs_tests
[183/475] avalanche: testing delegation_tests
[184/475] Running utility command for check-avalanche-delegation_tests
[185/475] avalanche: testing proofcomparator_tests
[186/475] Running utility command for check-avalanche-proofcomparator_tests
[187/475] avalanche: testing proofpool_tests
[188/475] avalanche: testing proof_tests
[189/475] Running utility command for check-avalanche-proofpool_tests
[190/475] Running utility command for check-avalanche-proof_tests
[191/475] avalanche: testing processor_tests
[192/475] Running utility command for check-avalanche-processor_tests
[193/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/compattests.cpp.o
[194/475] Linking CXX executable src/pow/test/test-pow
[195/475] pow: testing daa_tests
[196/475] Running utility command for check-pow-daa_tests
[197/475] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_tests.cpp.o
[198/475] pow: testing eda_tests
[199/475] Running utility command for check-pow-eda_tests
[200/475] pow: testing grasberg_tests
[201/475] Running utility command for check-pow-grasberg_tests
[202/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_bitcoin-qt_autogen/mocs_compilation.cpp.o
[203/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/guiutiltests.cpp.o
[204/475] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/util_tests.cpp.o
[205/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/util.cpp.o
[206/475] avalanche: testing peermanager_tests
[207/475] Running utility command for check-avalanche-peermanager_tests
[208/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/apptests.cpp.o
[209/475] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
[210/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_main.cpp.o
[211/475] pow: testing aserti32d_tests
[212/475] Running utility command for check-pow-aserti32d_tests
[213/475] Running pow test suite
PASSED: pow test suite
[214/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/rpcnestedtests.cpp.o
[215/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/uritests.cpp.o
[216/475] avalanche: testing voterecord_tests
[217/475] Running utility command for check-avalanche-voterecord_tests
[218/475] Running avalanche test suite
PASSED: avalanche test suite
[219/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/__/__/wallet/test/wallet_test_fixture.cpp.o
[220/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/paymentservertests.cpp.o
[221/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/addressbooktests.cpp.o
[222/475] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.o
[223/475] Linking CXX executable src/qt/test/test_bitcoin-qt
[224/475] bitcoin-qt: testing test_bitcoin-qt
[225/475] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

Tail of the build log:

wallet_listsinceblock.py --descriptors    | ○ Skipped | 0 s
wallet_listtransactions.py                | ○ Skipped | 0 s
wallet_listtransactions.py --descriptors  | ○ Skipped | 0 s
wallet_multiwallet.py                     | ○ Skipped | 0 s
wallet_multiwallet.py --usecli            | ○ Skipped | 0 s
wallet_reorgsrestore.py                   | ○ Skipped | 0 s
wallet_resendwallettransactions.py        | ○ Skipped | 0 s
wallet_send.py                            | ○ Skipped | 0 s
wallet_startup.py                         | ○ Skipped | 0 s
wallet_txn_clone.py                       | ○ Skipped | 0 s
wallet_txn_clone.py --mineblock           | ○ Skipped | 0 s
wallet_txn_doublespend.py                 | ○ Skipped | 0 s
wallet_txn_doublespend.py --mineblock     | ○ Skipped | 0 s
wallet_watchonly.py                       | ○ Skipped | 0 s
wallet_watchonly.py --usecli              | ○ Skipped | 0 s

ALL                                       | ✓ Passed  | 728 s (accumulated) 
Runtime: 146 s

----------------------------------------------------------------------
Ran 9 tests in 0.137s

OK

[31/443] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.004s

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

OK
[67/443] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/chronikbridge_tests.cpp.o
FAILED: src/test/CMakeFiles/test_bitcoin.dir/chronikbridge_tests.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBOOST_TEST_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/univalue/include -I../../src/. -Isrc -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIE -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 -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/test/CMakeFiles/test_bitcoin.dir/chronikbridge_tests.cpp.o -MF src/test/CMakeFiles/test_bitcoin.dir/chronikbridge_tests.cpp.o.d -o src/test/CMakeFiles/test_bitcoin.dir/chronikbridge_tests.cpp.o -c ../../src/test/chronikbridge_tests.cpp
../../src/test/chronikbridge_tests.cpp:5:10: fatal error: chronik-bridge/src/ffi.rs.h: No such file or directory
 #include <chronik-bridge/src/ffi.rs.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[126/443] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
In file included from /usr/include/boost/test/unit_test.hpp:19,
                 from ../../src/test/script_tests.cpp:30:
../../src/test/script_tests.cpp: In member function ‘void script_tests::script_build::test_method()’:
../../src/test/script_tests.cpp:540:22: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 BOOST_AUTO_TEST_CASE(script_build) {
                      ^~~~~~~~~~~~
[176/443] Running seeder test suite
PASSED: seeder test suite
[200/443] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[205/443] Running pow test suite
PASSED: pow test suite
[210/443] Running avalanche test suite
PASSED: avalanche test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Tail of the build log:

wallet_address_types.py                   | ✓ Passed  | 14 s
wallet_address_types.py --descriptors     | ✓ Passed  | 9 s
wallet_avoidreuse.py                      | ✓ Passed  | 4 s
wallet_avoidreuse.py --descriptors        | ✓ Passed  | 5 s
wallet_backup.py                          | ✓ Passed  | 29 s
wallet_balance.py                         | ✓ Passed  | 6 s
wallet_balance.py --descriptors           | ✓ Passed  | 6 s
wallet_basic.py                           | ✓ Passed  | 17 s
wallet_coinbase_category.py               | ✓ Passed  | 1 s
wallet_create_tx.py                       | ✓ Passed  | 6 s
wallet_createwallet.py                    | ✓ Passed  | 2 s
wallet_createwallet.py --descriptors      | ✓ Passed  | 3 s
wallet_createwallet.py --usecli           | ✓ Passed  | 3 s
wallet_descriptor.py                      | ✓ Passed  | 7 s
wallet_disable.py                         | ✓ Passed  | 0 s
wallet_dump.py                            | ✓ Passed  | 4 s
wallet_encryption.py                      | ✓ Passed  | 5 s
wallet_encryption.py --descriptors        | ✓ Passed  | 5 s
wallet_groups.py                          | ✓ Passed  | 8 s
wallet_hd.py                              | ✓ Passed  | 6 s
wallet_hd.py --descriptors                | ✓ Passed  | 5 s
wallet_import_rescan.py                   | ✓ Passed  | 5 s
wallet_import_with_label.py               | ✓ Passed  | 1 s
wallet_importdescriptors.py               | ✓ Passed  | 4 s
wallet_importmulti.py                     | ✓ Passed  | 3 s
wallet_importprunedfunds.py               | ✓ Passed  | 2 s
wallet_importprunedfunds.py --descriptors | ✓ Passed  | 2 s
wallet_keypool.py                         | ✓ Passed  | 3 s
wallet_keypool_topup.py                   | ✓ Passed  | 3 s
wallet_keypool_topup.py --descriptors     | ✓ Passed  | 3 s
wallet_labels.py                          | ✓ Passed  | 2 s
wallet_labels.py --descriptors            | ✓ Passed  | 2 s
wallet_listreceivedby.py                  | ✓ Passed  | 5 s
wallet_listsinceblock.py                  | ✓ Passed  | 5 s
wallet_listsinceblock.py --descriptors    | ✓ Passed  | 7 s
wallet_listtransactions.py                | ✓ Passed  | 4 s
wallet_listtransactions.py --descriptors  | ✓ Passed  | 3 s
wallet_multiwallet.py                     | ✓ Passed  | 40 s
wallet_multiwallet.py --usecli            | ✓ Passed  | 11 s
wallet_reorgsrestore.py                   | ✓ Passed  | 3 s
wallet_resendwallettransactions.py        | ✓ Passed  | 3 s
wallet_send.py                            | ✓ Passed  | 8 s
wallet_startup.py                         | ✓ Passed  | 2 s
wallet_txn_clone.py                       | ✓ Passed  | 2 s
wallet_txn_clone.py --mineblock           | ✓ Passed  | 3 s
wallet_txn_doublespend.py                 | ✓ Passed  | 1 s
wallet_txn_doublespend.py --mineblock     | ✓ Passed  | 3 s
wallet_watchonly.py                       | ✓ Passed  | 1 s
wallet_watchonly.py --usecli              | ✓ Passed  | 1 s

ALL                                       | ✓ Passed  | 1248 s (accumulated) 
Runtime: 250 s

----------------------------------------------------------------------
Ran 9 tests in 0.106s

OK

ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1

Tail of the build log:

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

ALL                                       | ✓ Passed  | 1794 s (accumulated) 
Runtime: 364 s

----------------------------------------------------------------------
Ran 9 tests in 0.233s

OK

[161/483] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.020s

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

OK
[186/483] Running seeder test suite
PASSED: seeder test suite
[222/483] Running pow test suite
PASSED: pow test suite
[228/483] Running avalanche test suite
PASSED: avalanche test suite
[230/483] Running secp256k1 test suite
PASSED: secp256k1 test suite
[232/483] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Don't add chronikbridge_tests if we're not compiling Chronik

Also move Chronik CPP tests to /chronik/tests

Tail of the build log:

wallet_address_types.py                   | ✓ Passed  | 14 s
wallet_address_types.py --descriptors     | ✓ Passed  | 8 s
wallet_avoidreuse.py                      | ✓ Passed  | 4 s
wallet_avoidreuse.py --descriptors        | ✓ Passed  | 5 s
wallet_backup.py                          | ✓ Passed  | 21 s
wallet_balance.py                         | ✓ Passed  | 5 s
wallet_balance.py --descriptors           | ✓ Passed  | 7 s
wallet_basic.py                           | ✓ Passed  | 17 s
wallet_coinbase_category.py               | ✓ Passed  | 1 s
wallet_create_tx.py                       | ✓ Passed  | 5 s
wallet_createwallet.py                    | ✓ Passed  | 2 s
wallet_createwallet.py --descriptors      | ✓ Passed  | 2 s
wallet_createwallet.py --usecli           | ✓ Passed  | 3 s
wallet_descriptor.py                      | ✓ Passed  | 6 s
wallet_disable.py                         | ✓ Passed  | 1 s
wallet_dump.py                            | ✓ Passed  | 4 s
wallet_encryption.py                      | ✓ Passed  | 5 s
wallet_encryption.py --descriptors        | ✓ Passed  | 5 s
wallet_groups.py                          | ✓ Passed  | 8 s
wallet_hd.py                              | ✓ Passed  | 6 s
wallet_hd.py --descriptors                | ✓ Passed  | 5 s
wallet_import_rescan.py                   | ✓ Passed  | 5 s
wallet_import_with_label.py               | ✓ Passed  | 1 s
wallet_importdescriptors.py               | ✓ Passed  | 4 s
wallet_importmulti.py                     | ✓ Passed  | 3 s
wallet_importprunedfunds.py               | ✓ Passed  | 2 s
wallet_importprunedfunds.py --descriptors | ✓ Passed  | 2 s
wallet_keypool.py                         | ✓ Passed  | 3 s
wallet_keypool_topup.py                   | ✓ Passed  | 3 s
wallet_keypool_topup.py --descriptors     | ✓ Passed  | 3 s
wallet_labels.py                          | ✓ Passed  | 2 s
wallet_labels.py --descriptors            | ✓ Passed  | 2 s
wallet_listreceivedby.py                  | ✓ Passed  | 5 s
wallet_listsinceblock.py                  | ✓ Passed  | 4 s
wallet_listsinceblock.py --descriptors    | ✓ Passed  | 6 s
wallet_listtransactions.py                | ✓ Passed  | 4 s
wallet_listtransactions.py --descriptors  | ✓ Passed  | 3 s
wallet_multiwallet.py                     | ✓ Passed  | 39 s
wallet_multiwallet.py --usecli            | ✓ Passed  | 12 s
wallet_reorgsrestore.py                   | ✓ Passed  | 3 s
wallet_resendwallettransactions.py        | ✓ Passed  | 2 s
wallet_send.py                            | ✓ Passed  | 7 s
wallet_startup.py                         | ✓ Passed  | 2 s
wallet_txn_clone.py                       | ✓ Passed  | 2 s
wallet_txn_clone.py --mineblock           | ✓ Passed  | 3 s
wallet_txn_doublespend.py                 | ✓ Passed  | 1 s
wallet_txn_doublespend.py --mineblock     | ✓ Passed  | 3 s
wallet_watchonly.py                       | ✓ Passed  | 1 s
wallet_watchonly.py --usecli              | ✓ Passed  | 1 s

ALL                                       | ✓ Passed  | 1157 s (accumulated) 
Runtime: 232 s

----------------------------------------------------------------------
Ran 9 tests in 0.105s

OK

ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1
Fabien requested changes to this revision.Sep 28 2022, 18:59

The test is failing to build, back on your queue

This revision now requires changes to proceed.Sep 28 2022, 18:59
tobias_ruck edited the test plan for this revision. (Show Details)

rerun tests

Fabien requested changes to this revision.Sep 29 2022, 12:42

Please update the summary according to the last revision

chronik/chronik-cpp/chronik_bridge.cpp
36 ↗(On Diff #35269)

No need to hold the lock that long:
const CBlockIndex *tip = WITH_LOCK(cs_main, return m_node.chainman->ActiveTip());

chronik/test/chronikbridge_tests.cpp
1 ↗(On Diff #35269)

I doubt it

10–11 ↗(On Diff #35269)
37 ↗(On Diff #35269)

Use BOOST_CHECK instead, throwing is messing the output of the unit tests

44 ↗(On Diff #35269)

Dito

54 ↗(On Diff #35269)

Use HashToArray()

58 ↗(On Diff #35269)

Might be good to test using random blocks rather than null and genesis only which are both special cases. This can be done easily from the TestChain100Setup fixture and its CreateAndProcessBlock() method.

With boost unit test you can specify a different fixture for each case if needed, using BOOST_FIXTURE_TEST_CASE instead of BOOST_AUTO_TEST_CASE which applies the suite-default fixture.

src/test/CMakeLists.txt
246 ↗(On Diff #35269)

This should be it's own test suite like pow or avalanche, but let's keep that for another diff to not bloat this one

This revision now requires changes to proceed.Sep 29 2022, 12:42

Simplify tests using individual fixtures

chronik/test/chronikbridge_tests.cpp
28 ↗(On Diff #35291)

You actually removed the case for the genesis block

Add test_get_chain_tip_genesis test case

Tail of the build log:

wallet_address_types.py                   | ✓ Passed  | 13 s
wallet_address_types.py --descriptors     | ✓ Passed  | 10 s
wallet_avoidreuse.py                      | ✓ Passed  | 4 s
wallet_avoidreuse.py --descriptors        | ✓ Passed  | 6 s
wallet_backup.py                          | ✓ Passed  | 29 s
wallet_balance.py                         | ✓ Passed  | 5 s
wallet_balance.py --descriptors           | ✓ Passed  | 6 s
wallet_basic.py                           | ✓ Passed  | 15 s
wallet_coinbase_category.py               | ✓ Passed  | 1 s
wallet_create_tx.py                       | ✓ Passed  | 6 s
wallet_createwallet.py                    | ✓ Passed  | 2 s
wallet_createwallet.py --descriptors      | ✓ Passed  | 2 s
wallet_createwallet.py --usecli           | ✓ Passed  | 3 s
wallet_descriptor.py                      | ✓ Passed  | 6 s
wallet_disable.py                         | ✓ Passed  | 1 s
wallet_dump.py                            | ✓ Passed  | 5 s
wallet_encryption.py                      | ✓ Passed  | 5 s
wallet_encryption.py --descriptors        | ✓ Passed  | 5 s
wallet_groups.py                          | ✓ Passed  | 7 s
wallet_hd.py                              | ✓ Passed  | 7 s
wallet_hd.py --descriptors                | ✓ Passed  | 5 s
wallet_import_rescan.py                   | ✓ Passed  | 5 s
wallet_import_with_label.py               | ✓ Passed  | 1 s
wallet_importdescriptors.py               | ✓ Passed  | 2 s
wallet_importmulti.py                     | ✓ Passed  | 3 s
wallet_importprunedfunds.py               | ✓ Passed  | 2 s
wallet_importprunedfunds.py --descriptors | ✓ Passed  | 2 s
wallet_keypool.py                         | ✓ Passed  | 3 s
wallet_keypool_topup.py                   | ✓ Passed  | 3 s
wallet_keypool_topup.py --descriptors     | ✓ Passed  | 3 s
wallet_labels.py                          | ✓ Passed  | 2 s
wallet_labels.py --descriptors            | ✓ Passed  | 2 s
wallet_listreceivedby.py                  | ✓ Passed  | 5 s
wallet_listsinceblock.py                  | ✓ Passed  | 4 s
wallet_listsinceblock.py --descriptors    | ✓ Passed  | 7 s
wallet_listtransactions.py                | ✓ Passed  | 4 s
wallet_listtransactions.py --descriptors  | ✓ Passed  | 3 s
wallet_multiwallet.py                     | ✓ Passed  | 40 s
wallet_multiwallet.py --usecli            | ✓ Passed  | 11 s
wallet_reorgsrestore.py                   | ✓ Passed  | 3 s
wallet_resendwallettransactions.py        | ✓ Passed  | 10 s
wallet_send.py                            | ✓ Passed  | 8 s
wallet_startup.py                         | ✓ Passed  | 2 s
wallet_txn_clone.py                       | ✓ Passed  | 2 s
wallet_txn_clone.py --mineblock           | ✓ Passed  | 4 s
wallet_txn_doublespend.py                 | ✓ Passed  | 1 s
wallet_txn_doublespend.py --mineblock     | ✓ Passed  | 4 s
wallet_watchonly.py                       | ✓ Passed  | 1 s
wallet_watchonly.py --usecli              | ✓ Passed  | 1 s

ALL                                       | ✓ Passed  | 1222 s (accumulated) 
Runtime: 245 s

----------------------------------------------------------------------
Ran 9 tests in 0.106s

OK

ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1

Rename setup_bridge to make_bridge

"setup" usually implies some side effect, like interactions with a file or port

Remove incorrect comment change in chronik-lib/src/lib.rs

chronik/test/chronikbridge_tests.cpp
35–36 ↗(On Diff #35293)

need to #include <chainparams.h> with this change

Use chainparams for genesis hash

This revision is now accepted and ready to land.Sep 29 2022, 15:11
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.