Skip to content

Commit efac285

Browse files
committed
Merge bitcoin/bitcoin#28710: Remove the legacy wallet and BDB dependency
de054df contrib: Remove legacy wallet RPCs from bash completions (Ava Chow) 5dff04a legacy spkm: Make IsMine() and CanProvide() private and migration only (Ava Chow) c0f3f32 wallet: Remove unused db functions (Ava Chow) 83af1a3 wallet: Delete LegacySPKM (Ava Chow) 8ede6de wallet, rpc: Remove legacy wallet only RPCs (Ava Chow) 4de3cec test: rpcs disabled for descriptor wallets will be removed (Ava Chow) 84f671b test: Run multisig script limit test (Ava Chow) 810476f test: Remove unused options and variables, correct comments (Ava Chow) 04a7a7a build, wallet, doc: Remove BDB (Ava Chow) Pull request description: The final step of #20160. A bare minimum of legacy wallet code is kept in order to perform wallet migration. Migration of legacy wallets uses the independent BDB parser and a minimal `LegacyDataSPKM` that allows the legacy data to be loaded so that the migration can be completed. BDB has been removed as a dependency and documentation have been updated to reflect that. ACKs for top commit: Sjors: re-ACK de054df maflcko: re-ACK de054df 🔗 w0xlt: reACK bitcoin/bitcoin@de054df rkrux: Concept ACK de054df Tree-SHA512: 16a6c265bc1ada5e7a5ef9b95f0ff65015672ca46d9a43b7e10d60e9e085052e9bbfe01ac3e494cc606afb652a1b476b10e434d13e9877b67d2cb0196a9bd190
2 parents 6d5edfc + de054df commit efac285

File tree

96 files changed

+233
-6479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+233
-6479
lines changed

.github/ci-test-each-commit-exec.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set -o errexit -o pipefail -o xtrace
1212
echo "Running test-one-commit on $( git log -1 )"
1313

1414
# Use clang++, because it is a bit faster and uses less memory than g++
15-
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'
15+
CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_USDT=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function'
1616

1717
cmake --build build -j "$( nproc )" && ctest --output-on-failure --stop-on-failure --test-dir build -j "$( nproc )"
1818

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
git config user.name "CI"
7878
- run: |
7979
sudo apt-get update
80-
sudo apt-get install clang ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev -y
80+
sudo apt-get install clang ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev -y
8181
- name: Compile and run tests
8282
run: |
8383
# Run tests on commits after the last merge commit and before the PR head commit
@@ -175,7 +175,7 @@ jobs:
175175
job-type: [standard, fuzz]
176176
include:
177177
- job-type: standard
178-
generate-options: '-DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
178+
generate-options: '-DBUILD_GUI=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
179179
job-name: 'Windows native, VS 2022'
180180
- job-type: fuzz
181181
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="wallet" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'

CMakeLists.txt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,6 @@ if(ENABLE_WALLET)
110110
find_package(SQLite3 3.7.17 REQUIRED)
111111
endif()
112112
endif()
113-
option(WITH_BDB "Enable Berkeley DB (BDB) wallet support." OFF)
114-
cmake_dependent_option(WARN_INCOMPATIBLE_BDB "Warn when using a Berkeley DB (BDB) version other than 4.8." ON "WITH_BDB" OFF)
115-
if(WITH_BDB)
116-
find_package(BerkeleyDB 4.8 MODULE REQUIRED)
117-
set(USE_BDB ON)
118-
if(NOT BerkeleyDB_VERSION VERSION_EQUAL 4.8)
119-
message(WARNING "Found Berkeley DB (BDB) other than 4.8.\n"
120-
"BDB (legacy) wallets opened by this build will not be portable!"
121-
)
122-
if(WARN_INCOMPATIBLE_BDB)
123-
message(WARNING "If this is intended, pass \"-DWARN_INCOMPATIBLE_BDB=OFF\".\n"
124-
"Passing \"-DWITH_BDB=OFF\" will suppress this warning."
125-
)
126-
endif()
127-
endif()
128-
endif()
129113
cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ${BUILD_TESTS} "ENABLE_WALLET" OFF)
130114

131115
option(REDUCE_EXPORTS "Attempt to reduce exported symbols in the resulting executables." OFF)
@@ -677,9 +661,6 @@ message(" bitcoin-chainstate (experimental) ... ${BUILD_UTIL_CHAINSTATE}")
677661
message(" libbitcoinkernel (experimental) ..... ${BUILD_KERNEL_LIB}")
678662
message("Optional features:")
679663
message(" wallet support ...................... ${ENABLE_WALLET}")
680-
if(ENABLE_WALLET)
681-
message(" - legacy wallets (Berkeley DB) ..... ${WITH_BDB}")
682-
endif()
683664
message(" external signer ..................... ${ENABLE_EXTERNAL_SIGNER}")
684665
message(" ZeroMQ .............................. ${WITH_ZMQ}")
685666
if(ENABLE_IPC)

CMakePresets.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@
7878
"BUILD_WALLET_TOOL": "ON",
7979
"ENABLE_EXTERNAL_SIGNER": "ON",
8080
"ENABLE_WALLET": "ON",
81-
"WARN_INCOMPATIBLE_BDB": "OFF",
82-
"WITH_BDB": "ON",
8381
"ENABLE_IPC": "ON",
8482
"WITH_QRENCODE": "ON",
8583
"WITH_USDT": "ON",

ci/test/00_setup_env_native_asan.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ fi
2020

2121
export CONTAINER_NAME=ci_native_asan
2222
export APT_LLVM_V="20"
23-
export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qt6-base-dev qt6-tools-dev qt6-l10n-tools libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}"
23+
export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qt6-base-dev qt6-tools-dev qt6-l10n-tools libevent-dev libboost-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}"
2424
export NO_DEPENDS=1
2525
export GOAL="install"
2626
export BITCOIN_CONFIG="\
27-
-DWITH_USDT=ON -DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=ON \
27+
-DWITH_USDT=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON \
2828
-DSANITIZERS=address,float-divide-by-zero,integer,undefined \
2929
-DCMAKE_C_COMPILER=clang-${APT_LLVM_V} \
3030
-DCMAKE_CXX_COMPILER=clang++-${APT_LLVM_V} \

ci/test/00_setup_env_native_fuzz_with_msan.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
1414

1515
export CONTAINER_NAME="ci_native_fuzz_msan"
1616
export PACKAGES="ninja-build"
17-
# BDB generates false-positives and will be removed in future
18-
export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
17+
export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
1918
export GOAL="all"
2019
# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered.
2120
# _FORTIFY_SOURCE is not compatible with MSAN.

ci/test/00_setup_env_native_msan.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
1414

1515
export CONTAINER_NAME="ci_native_msan"
1616
export PACKAGES="ninja-build"
17-
# BDB generates false-positives and will be removed in future
18-
export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
17+
export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
1918
export GOAL="install"
2019
# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered.
2120
# _FORTIFY_SOURCE is not compatible with MSAN.

ci/test/00_setup_env_native_tidy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
1010
export CONTAINER_NAME=ci_native_tidy
1111
export TIDY_LLVM_V="20"
1212
export APT_LLVM_V="${TIDY_LLVM_V}"
13-
export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libdb++-dev"
13+
export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev"
1414
export NO_DEPENDS=1
1515
export RUN_UNIT_TESTS=false
1616
export RUN_FUNCTIONAL_TESTS=false
@@ -19,7 +19,7 @@ export RUN_CHECK_DEPS=true
1919
export RUN_TIDY=true
2020
export GOAL="install"
2121
export BITCOIN_CONFIG="\
22-
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DWITH_USDT=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF \
22+
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DWITH_USDT=ON \
2323
-DCMAKE_C_COMPILER=clang-${TIDY_LLVM_V} \
2424
-DCMAKE_CXX_COMPILER=clang++-${TIDY_LLVM_V} \
2525
-DCMAKE_C_FLAGS_RELWITHDEBINFO='-O0 -g0' \

ci/test/00_setup_env_native_valgrind.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ export LC_ALL=C.UTF-8
88

99
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
1010
export CONTAINER_NAME=ci_native_valgrind
11-
export PACKAGES="valgrind python3-zmq libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libsqlite3-dev"
11+
export PACKAGES="valgrind python3-zmq libevent-dev libboost-dev libzmq3-dev libsqlite3-dev"
1212
export USE_VALGRIND=1
1313
export NO_DEPENDS=1
1414
export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # feature_init excluded for now, see https://github.com/bitcoin/bitcoin/issues/30011 ; bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
1515
export GOAL="install"
1616
# TODO enable GUI
1717
export BITCOIN_CONFIG="\
18-
-DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=OFF \
18+
-DWITH_ZMQ=ON -DBUILD_GUI=OFF \
1919
"

cmake/bitcoin-build-config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@
123123
/* Define to 1 if strerror_r returns char *. */
124124
#cmakedefine STRERROR_R_CHAR_P 1
125125

126-
/* Define if BDB support should be compiled in */
127-
#cmakedefine USE_BDB 1
128-
129126
/* Define if dbus support should be compiled in */
130127
#cmakedefine USE_DBUS 1
131128

0 commit comments

Comments
 (0)