Page MenuHomePhabricator

refactor, validation: Add ChainstateManagerOpts db options
ClosedPublic

Authored by PiRK on May 2 2024, 09:01.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCef56c603f71c: refactor, validation: Add ChainstateManagerOpts db options
Summary

Use ChainstateManagerOpts struct to remove ArgsManager uses from validation.cpp.

This commit does not change behavior.

This concludes backport of core#25862
https://github.com/bitcoin/bitcoin/pull/25862/commits/aadd7c5b9b43a38beaa954b4cb8c2fff55f2200f

Depends on D16093

Test Plan
cmake .. -GNinja -DBUILD_BITCOIN_CHAINSTATE=ON
ninja all check-all

Diff Detail

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

Event Timeline

PiRK requested review of this revision.May 2 2024, 09:01
PiRK planned changes to this revision.May 2 2024, 09:04

Maybe there is an issue with bitcoin-chainstate

Tail of the build log:

FAILED: src/bitcoin-chainstate 
: && /usr/bin/c++ -Werror -g -O2 -fuse-ld=gold -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -lstdc++fs -fPIE -pie src/CMakeFiles/bitcoin-chainstate.dir/bitcoin-chainstate.cpp.o -o src/bitcoin-chainstate  /usr/lib/x86_64-linux-gnu/libjemalloc_pic.a  -lstdc++fs  src/libbitcoinkernel.a  src/crypto/libcrypto.a  src/crypto/libcrypto_sse4.1.a  src/crypto/libcrypto_avx2.a  src/crypto/libcrypto_shani.a  src/univalue/libunivalue.a  src/secp256k1/libsecp256k1.a  src/leveldb/libleveldb.a  src/leveldb/libleveldb-sse4.2.a  src/leveldb/libmemenv.a  /usr/lib/x86_64-linux-gnu/libjemalloc_pic.a  -lm  -pthread  -ldl  -lstdc++fs && :
../../src/index/base.cpp:46: error: undefined reference to 'node::ReadDatabaseArgs(ArgsManager const&, DBOptions&)'
collect2: error: ld returned 1 exit status
[570/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/base58.cpp.o
[571/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/cashaddr.cpp.o
[572/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/bench_bitcoin.cpp.o
[573/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/chacha20.cpp.o
[574/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/chacha_poly_aead.cpp.o
[575/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bitcoingui.cpp.o
[576/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/intro.cpp.o
[577/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bitcoin.cpp.o
[578/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/ccoins_caching.cpp.o
[579/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/crypto_hash.cpp.o
[580/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/guiutil.cpp.o
[581/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/optionsdialog.cpp.o
[582/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/examples.cpp.o
[583/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/checkqueue.cpp.o
[584/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/block_assemble.cpp.o
[585/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/hashpadding.cpp.o
[586/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/data.cpp.o
[587/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/lockedpool.cpp.o
[588/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/gcs_filter.cpp.o
[589/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/optionsmodel.cpp.o
[590/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/checkblock.cpp.o
[591/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/crypto_aes.cpp.o
[592/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/merkle_root.cpp.o
[593/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/poly1305.cpp.o
[594/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/rollingbloom.cpp.o
[595/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/util_time.cpp.o
[596/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/chained_tx.cpp.o
[597/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/peertablemodel.cpp.o
[598/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/prevector.cpp.o
[599/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/bench.cpp.o
[600/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/duplicate_inputs.cpp.o
[601/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/load_external.cpp.o
[602/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/mempool_eviction.cpp.o
[603/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/platformstyle.cpp.o
[604/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/verify_script.cpp.o
[605/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qvalidatedlineedit.cpp.o
[606/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qvaluecombobox.cpp.o
[607/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrc_bitcoin.cpp.o
[608/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/peer_eviction.cpp.o
[609/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/rpc_mempool.cpp.o
[610/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/nanobench.cpp.o
[611/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/mempool_stress.cpp.o
[612/624] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/rpc_blockchain.cpp.o
[613/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/utilitydialog.cpp.o
[614/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/trafficgraphwidget.cpp.o
[615/624] Linking CXX executable src/bench/bitcoin-bench
[616/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrc_bitcoin_locale.cpp.o
[617/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/splashscreen.cpp.o
[618/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/rpcconsole.cpp.o
[619/624] Linking CXX static library src/qt/libbitcoin-qt-base.a
[620/624] Automatic MOC for target bitcoin-qt
[621/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt_autogen/mocs_compilation.cpp.o
[622/624] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/main.cpp.o
[623/624] Linking CXX executable src/qt/bitcoin-qt
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

rebase, remove temporary libbitcoinkernel dependencies in CMakeLists.txt now that chainstate.cpp no longer needs them

This revision is now accepted and ready to land.May 2 2024, 19:39