Skip to content

Commit 52d7f32

Browse files
committed
Squashed 'libbitcoinkernel-sys/bitcoin/' changes from c9e174da30e1..506c4276cf7a
506c4276cf7a Merge branch 'monolithic-kernel-lib' into kernelApi_symbols fdbade6f8ded kernel: create monolithic kernel static library 75a5c8258ec5 Merge bitcoin/bitcoin#33063: util: Revert "common: Close non-std fds before exec in RunCommandJSON" 3b188b8b3dae Merge bitcoin/bitcoin#31576: test: Move `script_assets_tests` into its own suite 2e97541396b9 Merge bitcoin/bitcoin#32944: wallet: Remove `upgradewallet` RPC b08041cac863 Merge bitcoin/bitcoin#32845: rpc, test: Fix JSON parsing errors in unloadwallet and getdescriptoractivity RPCs fc162299f0cc Merge bitcoin/bitcoin#32994: p2p: rename GetAddresses -> GetAddressesUnsafe 633d8ea17b9f Merge bitcoin/bitcoin#32970: ci: Enable more shellcheck faa1c3e80d95 Revert "Merge bitcoin/bitcoin#32343: common: Close non-std fds before exec in RunCommandJSON" 6cdc5a90cffe Merge bitcoin/bitcoin#32967: log: [refactor] Use info level for init logs 443c32a3e686 Merge bitcoin/bitcoin#32822: fuzz: Make process_message(s) more deterministic face8123fdc1 log: [refactor] Use info level for init logs fa183761cb09 log: Remove function name from init logs 5ad79b203505 Merge bitcoin/bitcoin#32593: wallet, rpc: Move (Un)LockCoin WalletBatch creation out of RPC e17fb86382ea Merge bitcoin/bitcoin#32888: ci: Use optimized Debug build type in test-each-commit fd3d80c209e5 Merge bitcoin/bitcoin#33047: test: check proper OP_2ROT behavior 1119ac51f0c8 Merge bitcoin/bitcoin#33040: doc: update headers and remove manual TOCs e2f2df0ead81 Merge bitcoin/bitcoin#32984: wallet: Set migrated wallet name only on success 16f7b43b6808 Merge bitcoin/bitcoin#33049: doc: Fix typos in asmap README b59dc21847d3 doc: Fix typos in asmap README ca38cf701dc6 doc: fix a few obvious typos in the affected files ddab466e0d95 doc: remove manual TOCs 26a3730711c7 doc: unify `developer-notes` and `productivity` header styles eb137184482c Merge bitcoin/bitcoin#31179: RPC: Add reserve member function to `UniValue` and use it in `blockToJSON` function b94c6356a29b test: check proper OP_2ROT behavior 73e754bd01b0 Merge bitcoin/bitcoin#33001: test: Do not pass tests on unhandled exceptions cfb859e82edf Merge bitcoin/bitcoin#33037: doc: Add release notes for 32521 (MAX_TX_LEGACY_SIGOPS) afd3b34dc5e2 Merge bitcoin/bitcoin#33004: Enable `-natpmp` by default 49bbf9ff28f8 Merge bitcoin/bitcoin#33036: Update secp256k1 subtree to latest master c5c1960f9350 doc: Add release notes for changes in RPCs 90fd5acbe57e rpc, test: Fix error message in getdescriptoractivity 39fef1d20367 test: Add missing logging info for each test 53ac704efd66 rpc, test: Fix error message in unloadwallet 1fc3a8e8e7ae rpc, test: Add EnsureUniqueWalletName tests 900bb53905aa Merge bitcoin/bitcoin#32990: wallet: remove outdated `pszSkip` arg of database `Rewrite` func c8ec423719aa Merge bitcoin/bitcoin#33020: test: delete commented-out tests and add a test case in wallet_signer 09f004bd9fec Merge bitcoin/bitcoin#32945: tests: speed up coins_tests by parallelizing 5d98fc755963 Merge bitcoin/bitcoin#33030: test: check tx is final when there is no locktime b635bc089629 rpc, util: Add EnsureUniqueWalletName da318fe53fa9 test: delete commented out tests 6d80e999a064 test: external signer returns invalid JSON response 065e42976a70 test: IsFinalTx returns true when there is no locktime 1cb23997033c doc: clarify the GetAddresses/GetAddressesUnsafe documentation e5a7dfd79f61 p2p: rename GetAddresses -> GetAddressesUnsafe faa2f3b1afe7 doc: Add release notes for 32521 (MAX_TX_LEGACY_SIGOPS) 336b8be37b22 Update secp256k1 subtree to latest master 5600e6fc4bb4 Squashed 'src/secp256k1/' changes from 4187a46649..b9313c6e1a 06ab3a394ade tests: speed up coins_tests by parallelizing 7129c9ea8e95 Merge bitcoin/bitcoin#32827: mempool: Avoid needless vtx iteration during IBD 11c6a864c9ee Merge bitcoin/bitcoin#33007: test: fix `ReadTopologicalSet` unsigned integer overflow 9bc33432e214 Merge bitcoin/bitcoin#32999: ci: Use APT_LLVM_V in msan task 5878f35446ae Merge bitcoin/bitcoin#31144: [IBD] multi-byte block obfuscation 249889bee6b8 orphanage: avoid vtx iteration when no orphans 41ad2be4340d mempool: Avoid expensive loop in `removeForBlock` during IBD e9edd43a9592 Merge bitcoin/bitcoin#32521: policy: make pathological transactions packed with legacy sigops non-standard 80067ac111c2 Merge bitcoin/bitcoin#31829: p2p: improve TxOrphanage denial of service bounds 31c4e77a256c test: fix ReadTopologicalSet unsigned integer overflow 672c85cb1ea0 Merge bitcoin/bitcoin#32868: test: refactor: overhaul block hash determination for `CBlock{,Header}` objects fa1a14a13a15 fuzz: Reset chainman state in process_message(s) targets fa9a3de09b4c fuzz: DisableNextWrite aeeeeec9f749 fuzz: Reset dirty connman state in process_message(s) targets fa11eea4059a fuzz: Avoid non-determinism in process_message(s) target (PeerMan) faa3e684118b test: Log KeyboardInterrupt as exception b2d07f872c58 Add release notes for -natpmp enabled by default 3fc660d26719 mapport: turn -natpmp to on by default fa30b34026f7 test: Do not pass tests on unhandled exceptions 96da68a38fa2 qa: functional test a transaction running into the legacy sigop limit 367147954d16 qa: unit test standardness of inputs packed with legacy sigops 5863315e33ba policy: make pathological transactions packed with legacy sigops non-standard. 5fa34951ead2 test: avoid unneeded block header hash -> integer conversions 2118301d77c2 test: rename CBlockHeader `.hash` -> `.hash_hex` for consistency 23be0ec2f074 test: rename CBlockHeader `.rehash()`/`.sha256` -> `.hash_int` for consistency 8b09cc350afa test: remove bare CBlockHeader `.rehash()`/`.calc_sha256()` calls 0716382c20a6 test: remove header hash caching in CBlockHeader class 0f044e82bd5f test: avoid direct block header modification in feature_block.py f3c791d2e391 test: refactor: dedup `CBlockHeader` serialization fad040a5787a ci: Use APT_LLVM_V in msan task 060695c22ae7 test: Failed load after migrate should restore backup 248b6a27c351 optimization: peel align-head and unroll body to 64 bytes e7114fc6dc34 optimization: migrate fixed-size obfuscation from `std::vector<std::byte>` to `uint64_t` 478d40afc6fa refactor: encapsulate `vector`/`array` keys into `Obfuscation` 377aab8e5a8d refactor: move `util::Xor` to `Obfuscation().Xor` fa5d296e3beb refactor: prepare mempool_persist for obfuscation key change 6bbf2d9311b4 refactor: prepare `DBWrapper` for obfuscation key change 0b8bec8aa626 scripted-diff: unify xor-vs-obfuscation nomenclature 972697976c02 bench: make ObfuscationBench more representative 618a30e326e9 test: compare util::Xor with randomized inputs against simple impl a5141cd39ecb test: make sure dbwrapper obfuscation key is never obfuscated 54ab0bd64c36 refactor: commit to 8 byte obfuscation keys 7aa557a37b73 random: add fixed-size `std::array` generation 9f713b83dcf7 Merge bitcoin/bitcoin#32837: depends: fix libevent `_WIN32_WINNT` usage 2dfeb6668cb2 wallet: remove outdated `pszSkip` arg of database `Rewrite` func 8a4cfddf23a4 wallet: Set migrated wallet name only on success d89c6fa4a718 wallet: Remove `upgradewallet` RPC 184159e4f30c Merge bitcoin/bitcoin#32922: test: use notarized v28.2 binaries and fix macOS detection 5d17e64a0290 Merge bitcoin/bitcoin#32677: test: headers sync timeout 0087ba409b36 Merge bitcoin/bitcoin#32968: test: fix intermittent failure in rpc_invalidateblock.py 50024620b909 [bench] worst case LimitOrphans and EraseForBlock 45c7a4b56d28 [functional test] orphan resolution works in the presence of DoSy peers 835f5c77cdee [prep/test] restart instead of bumpmocktime between p2p_orphan_handling subtests b113877545a1 [fuzz] Add simulation fuzz test for TxOrphanage 03aaaedc6daf [prep] Return the made-reconsiderable announcements in AddChildrenToWorkSet ea29c4371e86 [p2p] bump DEFAULT_MAX_ORPHANAGE_LATENCY_SCORE to 3,000 24afee8d8f94 [fuzz] TxOrphanage protects peers that don't go over limit a2878cfb4ae2 [unit test] strengthen GetChildrenFromSamePeer tests: results are in recency order 7ce3b7ee579c [unit test] basic TxOrphanage eviction and protection 4d23d1d7e7fa [cleanup] remove unused rng param from LimitOrphans 067365d2a8a4 [p2p] overhaul TxOrphanage with smarter limits 1a41e7962db3 [refactor] create aliases for TxOrphanage Count and Usage b50bd72c42bc [prep] change return type of EraseTx to bool 3da6d7f8f6fc [prep/refactor] make TxOrphanage a virtual class implemented by TxOrphanageImpl 77ebe8f28012 [prep/test] have TxOrphanage remember its own limits in LimitOrphans d0af4239b7f0 [prep/refactor] move DEFAULT_MAX_ORPHAN_TRANSACTIONS to txorphanage.h 51365225b898 [prep/config] remove -maxorphantx 8dd24c29aec8 [prep/test] modify test to not access TxOrphanage internals b53fab1467fd Merge bitcoin/bitcoin#32948: refactor: cleanup index logging fa1fd074685c ci: Enable more shellcheck 61e800e75cff test: headers sync timeout 28416f367a5d test: fix intermittent failure in rpc_invalidateblock.py e72cb20c3fb7 Merge bitcoin/bitcoin#32943: depends: Force `CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE` 97fb46d0a081 Merge bitcoin/bitcoin#32880: ci: Avoid cd into build dir 69b9ad02da89 Merge bitcoin/bitcoin#32954: cmake: Drop no longer necessary "cmakeMinimumRequired" object faa3171ff22f ci: Use optimized Debug build type in test-each-commit fa21c3401e15 ci: [doc] reword debug log message 12a6959892cb cmake: Drop no longer necessary "cmakeMinimumRequired" object 44f532782445 [fuzz] add SeedRandomStateForTest(SeedRand::ZEROS) to txorphan 15a4ec906976 [prep/rpc] remove entry and expiry time from getorphantxs 08e58fa91198 [prep/refactor] move txorphanage to node namespace and directory bb91d23fa956 [txorphanage] change type of usage to int64_t c18bf0bd9be6 refactor: cleanup index logging f5647c6c5ae8 depends: fix libevent _WIN32_WINNT usage 44f3bae300dc depends: Force `CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE` fad191ff48b1 ci: Avoid cd into build dir 4bb4c865999b test: document HOST for get_previous_releases.py 609203d5075c test: stop signing previous releases >= v28.2 c6dc2c29f828 test: replace v28.0 with notarized v28.2 5bd73d96a3a7 test: fix macOS detection c40dbbbf7707 test: Move `script_assets_tests` into its own suite 6135e0553e6e wallet, rpc: Move (Un)LockCoin WalletBatch creation out of RPC 5d82d92aff7c rpc: reserve space for `UniValue` variables in `blockToJSON` 6a506d5c37d1 UniValue: add reserve member function bd461195f4b3 bench: support benching all verbosity of `BlockToJson` git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: 506c4276cf7a2b775265646e2b593262bd18c0ec
1 parent 14b19e5 commit 52d7f32

File tree

205 files changed

+4917
-2621
lines changed

Some content is hidden

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

205 files changed

+4917
-2621
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,25 @@ def run(cmd, **kwargs):
1717

1818

1919
def main():
20-
print("Running test-one-commit on ...")
20+
print("Running tests on commit ...")
2121
run(["git", "log", "-1"])
2222

2323
num_procs = int(run(["nproc"], stdout=subprocess.PIPE).stdout)
2424

25-
# Use clang++, because it is a bit faster and uses less memory than g++
2625
run([
2726
"cmake",
2827
"-B",
2928
"build",
3029
"-Werror=dev",
30+
# Use clang++, because it is a bit faster and uses less memory than g++
3131
"-DCMAKE_C_COMPILER=clang",
3232
"-DCMAKE_CXX_COMPILER=clang++",
33+
# Use mold, because it is faster than the default linker
34+
"-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=mold",
35+
# Use Debug build type for more debug checks, but enable optimizations
36+
"-DAPPEND_CXXFLAGS='-O3 -g2'",
37+
"-DAPPEND_CFLAGS='-O3 -g2'",
38+
"-DCMAKE_BUILD_TYPE=Debug",
3339
"-DWERROR=ON",
3440
"-DWITH_ZMQ=ON",
3541
"-DBUILD_GUI=ON",

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
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 systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev -y
80+
sudo apt-get install clang mold 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

CMakePresets.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"version": 3,
3-
"cmakeMinimumRequired": {"major": 3, "minor": 21, "patch": 0},
43
"configurePresets": [
54
{
65
"name": "vs2022",

ci/test/00_setup_env_native_asan.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export GOAL="install"
2626
export BITCOIN_CONFIG="\
2727
-DWITH_USDT=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON \
2828
-DSANITIZERS=address,float-divide-by-zero,integer,undefined \
29-
-DCMAKE_C_COMPILER=clang-${APT_LLVM_V} \
30-
-DCMAKE_CXX_COMPILER=clang++-${APT_LLVM_V} \
29+
-DCMAKE_C_COMPILER=clang \
30+
-DCMAKE_CXX_COMPILER=clang++ \
3131
-DCMAKE_C_FLAGS='-ftrivial-auto-var-init=pattern' \
3232
-DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern' \
3333
-DAPPEND_CXXFLAGS='-std=c++23' \

ci/test/00_setup_env_native_fuzz.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ export CI_CONTAINER_CAP="--cap-add SYS_PTRACE" # If run with (ASan + LSan), the
1919
export BITCOIN_CONFIG="\
2020
-DBUILD_FOR_FUZZING=ON \
2121
-DSANITIZERS=fuzzer,address,undefined,float-divide-by-zero,integer \
22-
-DCMAKE_C_COMPILER=clang-${APT_LLVM_V} \
23-
-DCMAKE_CXX_COMPILER=clang++-${APT_LLVM_V} \
22+
-DCMAKE_C_COMPILER=clang \
23+
-DCMAKE_CXX_COMPILER=clang++ \
2424
-DCMAKE_C_FLAGS='-ftrivial-auto-var-init=pattern' \
2525
-DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern' \
2626
"
27-
export LLVM_SYMBOLIZER_PATH="/usr/bin/llvm-symbolizer-${APT_LLVM_V}"

ci/test/00_setup_env_native_msan.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
export LC_ALL=C.UTF-8
88

99
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
10+
export APT_LLVM_V="20"
1011
LIBCXX_DIR="/msan/cxx_build/"
1112
export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls"
1213
LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument"
1314
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
1415

1516
export CONTAINER_NAME="ci_native_msan"
16-
export PACKAGES="ninja-build"
17+
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev ninja-build"
1718
export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
1819
export GOAL="install"
1920
# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered.

ci/test/00_setup_env_native_tsan.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export CONTAINER_NAME=ci_native_tsan
1010
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
1111
export APT_LLVM_V="20"
1212
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libc++abi-${APT_LLVM_V}-dev libc++-${APT_LLVM_V}-dev python3-zmq"
13-
export DEP_OPTS="CC=clang-${APT_LLVM_V} CXX='clang++-${APT_LLVM_V} -stdlib=libc++'"
13+
export DEP_OPTS="CC=clang CXX='clang++ -stdlib=libc++'"
1414
export GOAL="install"
1515
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DSANITIZERS=thread \
1616
-DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES'"

ci/test/01_base_install.sh

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,37 @@ elif [ "$CI_OS_NAME" != "macos" ]; then
4444
${CI_RETRY_EXE} bash -c "apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $CI_BASE_PACKAGES"
4545
fi
4646

47+
if [ -n "${APT_LLVM_V}" ]; then
48+
update-alternatives --install /usr/bin/clang++ clang++ "/usr/bin/clang++-${APT_LLVM_V}" 100
49+
update-alternatives --install /usr/bin/clang clang "/usr/bin/clang-${APT_LLVM_V}" 100
50+
update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer "/usr/bin/llvm-symbolizer-${APT_LLVM_V}" 100
51+
fi
52+
4753
if [ -n "$PIP_PACKAGES" ]; then
4854
# shellcheck disable=SC2086
4955
${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
5056
fi
5157

5258
if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
53-
${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b "llvmorg-20.1.0" /msan/llvm-project
54-
55-
cmake -G Ninja -B /msan/clang_build/ \
56-
-DLLVM_ENABLE_PROJECTS="clang" \
57-
-DCMAKE_BUILD_TYPE=Release \
58-
-DLLVM_TARGETS_TO_BUILD=Native \
59-
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
60-
-S /msan/llvm-project/llvm
61-
62-
ninja -C /msan/clang_build/ "$MAKEJOBS"
63-
ninja -C /msan/clang_build/ install-runtimes
64-
65-
update-alternatives --install /usr/bin/clang++ clang++ /msan/clang_build/bin/clang++ 100
66-
update-alternatives --install /usr/bin/clang clang /msan/clang_build/bin/clang 100
67-
update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /msan/clang_build/bin/llvm-symbolizer 100
59+
if [ -n "${APT_LLVM_V}" ]; then
60+
${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b "llvmorg-$( clang --version | sed --silent 's@.*clang version \([0-9.]*\).*@\1@p' )" /msan/llvm-project
61+
else
62+
${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b "llvmorg-20.1.8" /msan/llvm-project
63+
64+
cmake -G Ninja -B /msan/clang_build/ \
65+
-DLLVM_ENABLE_PROJECTS="clang" \
66+
-DCMAKE_BUILD_TYPE=Release \
67+
-DLLVM_TARGETS_TO_BUILD=Native \
68+
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
69+
-S /msan/llvm-project/llvm
70+
71+
ninja -C /msan/clang_build/ "$MAKEJOBS"
72+
ninja -C /msan/clang_build/ install-runtimes
73+
74+
update-alternatives --install /usr/bin/clang++ clang++ /msan/clang_build/bin/clang++ 100
75+
update-alternatives --install /usr/bin/clang clang /msan/clang_build/bin/clang 100
76+
update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /msan/clang_build/bin/llvm-symbolizer 100
77+
fi
6878

6979
cmake -G Ninja -B /msan/cxx_build/ \
7080
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \

ci/test/03_test_script.sh

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,26 @@ PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats"
115115

116116
# Folder where the build is done.
117117
BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST}
118-
mkdir -p "${BASE_BUILD_DIR}"
119-
cd "${BASE_BUILD_DIR}"
120118

121119
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR -Werror=dev"
122120

123121
if [[ "${RUN_TIDY}" == "true" ]]; then
124122
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
125123
fi
126124

127-
bash -c "cmake -S $BASE_ROOT_DIR $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake")) && false)"
125+
bash -c "cmake -S $BASE_ROOT_DIR -B ${BASE_BUILD_DIR} $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || (
126+
# shellcheck disable=SC2046
127+
cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake")
128+
false
129+
)
128130

129-
bash -c "cmake --build . $MAKEJOBS --target all $GOAL" || ( echo "Build failure. Verbose build follows." && cmake --build . --target all "$GOAL" --verbose ; false )
131+
# shellcheck disable=SC2086
132+
cmake --build "${BASE_BUILD_DIR}" "$MAKEJOBS" --target all $GOAL || (
133+
echo "Build failure. Verbose build follows."
134+
# shellcheck disable=SC2086
135+
cmake --build "${BASE_BUILD_DIR}" -j1 --target all $GOAL --verbose
136+
false
137+
)
130138

131139
bash -c "${PRINT_CCACHE_STATISTICS}"
132140
du -sh "${DEPENDS_DIR}"/*/
@@ -137,11 +145,17 @@ if [ -n "$USE_VALGRIND" ]; then
137145
fi
138146

139147
if [ "$RUN_CHECK_DEPS" = "true" ]; then
140-
"${BASE_ROOT_DIR}/contrib/devtools/check-deps.sh" .
148+
"${BASE_ROOT_DIR}/contrib/devtools/check-deps.sh" "${BASE_BUILD_DIR}"
141149
fi
142150

143151
if [ "$RUN_UNIT_TESTS" = "true" ]; then
144-
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" CTEST_OUTPUT_ON_FAILURE=ON ctest --stop-on-failure "${MAKEJOBS}" --timeout $(( TEST_RUNNER_TIMEOUT_FACTOR * 60 ))
152+
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" \
153+
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
154+
CTEST_OUTPUT_ON_FAILURE=ON \
155+
ctest --test-dir "${BASE_BUILD_DIR}" \
156+
--stop-on-failure \
157+
"${MAKEJOBS}" \
158+
--timeout $(( TEST_RUNNER_TIMEOUT_FACTOR * 60 ))
145159
fi
146160

147161
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
@@ -151,7 +165,16 @@ fi
151165
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
152166
# parses TEST_RUNNER_EXTRA as an array which allows for multiple arguments such as TEST_RUNNER_EXTRA='--exclude "rpc_bind.py --ipv6"'
153167
eval "TEST_RUNNER_EXTRA=($TEST_RUNNER_EXTRA)"
154-
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/functional/test_runner.py --ci "${MAKEJOBS}" --tmpdirprefix "${BASE_SCRATCH_DIR}"/test_runner/ --ansi --combinedlogslen=99999999 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" "${TEST_RUNNER_EXTRA[@]}" --quiet --failfast
168+
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
169+
"${BASE_BUILD_DIR}/test/functional/test_runner.py" \
170+
--ci "${MAKEJOBS}" \
171+
--tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" \
172+
--ansi \
173+
--combinedlogslen=99999999 \
174+
--timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" \
175+
"${TEST_RUNNER_EXTRA[@]}" \
176+
--quiet \
177+
--failfast
155178
fi
156179

157180
if [ "${RUN_TIDY}" = "true" ]; then
@@ -185,5 +208,11 @@ fi
185208

186209
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
187210
# shellcheck disable=SC2086
188-
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} "${MAKEJOBS}" -l DEBUG "${DIR_FUZZ_IN}" --empty_min_time=60
211+
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
212+
"${BASE_BUILD_DIR}/test/fuzz/test_runner.py" \
213+
${FUZZ_TESTS_CONFIG} \
214+
"${MAKEJOBS}" \
215+
-l DEBUG \
216+
"${DIR_FUZZ_IN}" \
217+
--empty_min_time=60
189218
fi

contrib/asmap/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Example usage:
99
python3 asmap-tool.py encode /path/to/input.file /path/to/output.file
1010
python3 asmap-tool.py decode /path/to/input.file /path/to/output.file
1111
python3 asmap-tool.py diff /path/to/first.file /path/to/second.file
12-
python3 asmap-tool.py diff-addrs /path/to/first.file /path/to/second.file addrs.file
12+
python3 asmap-tool.py diff_addrs /path/to/first.file /path/to/second.file addrs.file
1313
```
1414
These commands may take a few minutes to run with `python3`,
1515
depending on the amount of data involved and your machine specs.
@@ -43,7 +43,7 @@ increases output size by outputting strictly non-overlapping network ranges.
4343
### Comparing ASmaps
4444

4545
AS control of IP networks changes frequently, therefore it can be useful to get
46-
the changes between to ASmaps via the `diff` and `diff_addrs` commands.
46+
the changes between two ASmaps via the `diff` and `diff_addrs` commands.
4747

4848
`diff` takes two ASmap files, and returns a file detailing the changes
4949
in the state of a network's AS assignment between the first and the second file.

0 commit comments

Comments
 (0)