Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel: merge all options into ChainstateManagerOptions; disallow invalid wiping settings #24

Open
wants to merge 25 commits into
base: kernelApi
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6fdc7aa
kernel: Introduce initial kernel C header API
TheCharlatan May 28, 2024
cd841a2
kernel: Add logging to kernel library C header
TheCharlatan May 29, 2024
04363c9
kernel: Add kernel library context object
TheCharlatan Jun 3, 2024
a5a2686
kernel: Add chain params context option to C header
TheCharlatan Jun 3, 2024
58900f4
kernel: Add notifications context option to C header
TheCharlatan Jun 3, 2024
0973992
kernel: Add chainstate manager object to C header
TheCharlatan May 28, 2024
9ee454e
kernel: Add chainstate manager option for setting worker threads
TheCharlatan Nov 17, 2024
ca60710
kernel: Add chainstate loading to kernel C header
TheCharlatan May 29, 2024
65a62be
kernel: Add block validation to C header
TheCharlatan Jun 17, 2024
80dba98
kernel: Add options for reindexing in C header
TheCharlatan Jun 17, 2024
1d6da27
kernel: Add chainstate load options for in-memory dbs in C header
TheCharlatan Jun 22, 2024
827763e
kernel: Add import blocks function to C header
TheCharlatan May 30, 2024
c4a9891
kernel: Add interrupt function to C header
TheCharlatan Jun 5, 2024
f048bda
kernel: Add validation interface to C header
TheCharlatan May 30, 2024
e10251d
kernel: Add functions for the block validation state to C header
TheCharlatan May 31, 2024
3d263b7
kernel: Add function for copying block data to C header
TheCharlatan Jun 1, 2024
7dd9fad
kernel: Add functions to read block from disk to C header
TheCharlatan Jun 1, 2024
39bfe31
kernel: Add function to read block undo data from disk to C header
TheCharlatan Jun 1, 2024
8ee7a37
kernel: Add block index utility functions to C header
TheCharlatan Jun 5, 2024
978c42f
kernel: Add functions to get the block hash from a block
TheCharlatan Nov 17, 2024
817865d
kernel: Add pure kernel bitcoin-chainstate
TheCharlatan Jun 14, 2024
b2fbc66
[refactor] kernel: introduce ChainstateManagerOptionsWrapper
stickies-v Feb 6, 2025
caf693b
kernel: remove kernel_ChainstateLoadOptions
stickies-v Feb 6, 2025
e130acf
kernel: remove kernel_BlockManagerOptions
stickies-v Feb 6, 2025
eb783d8
kernel: disallow invalid wiping option combination
stickies-v Feb 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run: |
# Run tests on commits after the last merge commit and before the PR head commit
# Use clang++, because it is a bit faster and uses less memory than g++
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_USDT=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function' && cmake --build build -j $(nproc) && ctest --output-on-failure --stop-on-failure --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 )) --combinedlogslen=99999999" ${{ env.TEST_BASE }}
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_USDT=ON -DBUILD_KERNEL_LIB=ON -DBUILD_KERNEL_TEST=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function' && cmake --build build -j $(nproc) && ctest --output-on-failure --stop-on-failure --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 )) --combinedlogslen=99999999" ${{ env.TEST_BASE }}

macos-native-arm64:
name: ${{ matrix.job-name }}
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
job-type: [standard, fuzz]
include:
- job-type: standard
generate-options: '-DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
generate-options: '-DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON -DBUILD_KERNEL_LIB=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_TEST=OFF'
job-name: 'Win64 native, VS 2022'
- job-type: fuzz
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="sqlite" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ option(BUILD_UTIL "Build bitcoin-util executable." ${BUILD_TESTS})

option(BUILD_UTIL_CHAINSTATE "Build experimental bitcoin-chainstate executable." OFF)
option(BUILD_KERNEL_LIB "Build experimental bitcoinkernel library." ${BUILD_UTIL_CHAINSTATE})
option(BUILD_KERNEL_TEST "Build tests for the experimental bitcoinkernel library." ${BUILD_KERNEL_LIB})

option(ENABLE_WALLET "Enable wallet." ON)
option(WITH_SQLITE "Enable SQLite wallet support." ${ENABLE_WALLET})
Expand Down Expand Up @@ -216,6 +217,7 @@ if(BUILD_FOR_FUZZING)
set(BUILD_UTIL OFF)
set(BUILD_UTIL_CHAINSTATE OFF)
set(BUILD_KERNEL_LIB OFF)
set(BUILD_KERNEL_TEST OFF)
set(BUILD_WALLET_TOOL OFF)
set(BUILD_GUI OFF)
set(ENABLE_EXTERNAL_SIGNER OFF)
Expand Down Expand Up @@ -623,6 +625,7 @@ message(" bitcoin-util ........................ ${BUILD_UTIL}")
message(" bitcoin-wallet ...................... ${BUILD_WALLET_TOOL}")
message(" bitcoin-chainstate (experimental) ... ${BUILD_UTIL_CHAINSTATE}")
message(" libbitcoinkernel (experimental) ..... ${BUILD_KERNEL_LIB}")
message(" kernel-test (experimental) .......... ${BUILD_KERNEL_TEST}")
message("Optional features:")
message(" wallet support ...................... ${ENABLE_WALLET}")
if(ENABLE_WALLET)
Expand Down
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_mac_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export LC_ALL=C.UTF-8
export PIP_PACKAGES="--break-system-packages zmq"
export GOAL="install"
export CMAKE_GENERATOR="Ninja"
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON"
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DBUILD_KERNEL_LIB=ON -DBUILD_KERNEL_TEST=ON -DREDUCE_EXPORTS=ON"
export CI_OS_NAME="macos"
export NO_DEPENDS=1
export OSX_SDK=""
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export CI_IMAGE_NAME_TAG="docker.io/debian:bookworm"
export PACKAGES="python3-zmq clang-16 llvm-16 libc++abi-16-dev libc++-16-dev"
export DEP_OPTS="NO_WALLET=1 CC=clang-16 CXX='clang++-16 -stdlib=libc++'"
export GOAL="install"
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_LIB=ON -DBUILD_SHARED_LIBS=ON"
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_LIB=ON -DBUILD_KERNEL_TEST=ON -DBUILD_SHARED_LIBS=ON"
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_win64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export GOAL="deploy"
# Prior to 11.0.0, the mingw-w64 headers were missing noreturn attributes, causing warnings when
# cross-compiling for Windows. https://sourceforge.net/p/mingw-w64/bugs/306/
# https://github.com/mingw-w64/mingw-w64/commit/1690994f515910a31b9fb7c7bd3a52d4ba987abe
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_GUI_TESTS=OFF \
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_GUI_TESTS=OFF -DBUILD_KERNEL_LIB=ON -DBUILD_KERNEL_TEST=ON -DBUILD_UTIL_CHAINSTATE=ON \
-DCMAKE_CXX_FLAGS='-Wno-error=return-type -Wno-error=maybe-uninitialized -Wno-error=array-bounds'"
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ if(BUILD_FUZZ_BINARY)
add_subdirectory(test/fuzz)
endif()


install(TARGETS ${installable_targets}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
Expand Down
Loading