From 00a3917ab1d4d59e9d01f951593e37f66874b076 Mon Sep 17 00:00:00 2001 From: sedited Date: Tue, 27 Jan 2026 17:28:42 +0100 Subject: [PATCH 1/2] Squashed 'libbitcoinkernel-sys/bitcoin/' changes from 5b8c204275aa..d07a42ca43ed d07a42ca43ed Add sans utxo set block validation 00da3f047017 doc: Add docstrings for ConnectBlock and SpendBlock 1c16831a2fc2 validation: Move coin existence and spend check to SpendBlock 023ad3f66158 validation: Move SetBestBlock out of ConnectBlock d49b24250048 validation: Add SpendBlock function 702df0169535 validation: Use vector of outputs instead of CCoinsViewCache in CheckInputScripts 2f907b9e230f consensus: Use Coin span in CheckTxInputs 1b78755de266 consensus: Use Coin span in GetTransactionSigOpCost ccdcbd82ae3e consensus: Use Coin span in GetP2SHSigOpCount 27aeeff63014 Merge bitcoin/bitcoin#34328: rpc: make `uptime` monotonic across NTP jumps f970cb39fb64 Merge bitcoin/bitcoin#34267: net: avoid unconditional `privatebroadcast` logging (+ warn for debug logs) 8593d965191e Merge bitcoin/bitcoin#33067: test: refactor ValidWitnessMalleatedTx class to helper function 34a5ecadd720 Merge bitcoin/bitcoin#34397: doc: fix arg name hints so bugprone can validate them 1cc58d3a0c65 Merge bitcoin/bitcoin#34281: build: Temporarily remove confusing and brittle `-fdebug-prefix-map` 2778eb46647a Merge bitcoin/bitcoin#34337: fuzz: Return chrono point from ConsumeTime(), Add ConsumeDuration() d70fb8a5754f Merge bitcoin/bitcoin#34351: util: Remove `FilterHeaderHasher` 6472ba06c36a Merge bitcoin/bitcoin#34388: doc: Explain that low-effort pull requests may be closed 5f66fca633c8 Merge bitcoin-core/gui#920: Set peer version and subversion to N/A when not available or detecting 02240a7698e3 Merge bitcoin/bitcoin#34390: test: allow overriding `tar` in `get_previous_releases.py` a73a3ec5532d doc: fix invalid arg name hints for bugprone validation eeee3755f8c4 fuzz: Return chrono point from ConsumeTime(), Add ConsumeDuration() fa15a8d2d03b doc: Explain that low-effort pull requests may be closed be2b48b9f3e5 test: allow overriding tar in get_previous_releases 3f5211cba8e7 test: remove child_one/child_two (w)txid variables 7cfe790820cf test: replace ValidWitnessMalleatedTx class with function ccf9172ab3bb util: Remove `FilterHeaderHasher` 81675a781f3a test: use pre-generated chain 14f99cfe53f0 rpc: make `uptime` monotonic across NTP jumps a9440b1595be util: add `TicksSeconds` faa5a9ebad15 fuzz: Use min option in ConsumeTime fa37928536e0 build: Temporarily remove confusing and brittle -fdebug-prefix-map b39291f4cde0 doc: fix `-logips` description to clarify that non-debug logs can also contain IP addresses c7028d3368e9 init: log that additional logs may contain privacy-sensitive information 31b771a9425d net: move `privatebroadcast` logs to debug category b261100e7169 [qt] Set peer version and subversion to N/A when not available or detecting git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: d07a42ca43edd620bcfee8108b440b0cdf867bec --- CMakeLists.txt | 5 +- CONTRIBUTING.md | 12 + contrib/guix/libexec/build.sh | 1 + src/bench/connectblock.cpp | 5 +- src/bench/mempool_stress.cpp | 4 +- src/coins.cpp | 23 + src/coins.h | 17 + src/common/system.cpp | 9 +- src/common/system.h | 6 +- src/consensus/tx_verify.cpp | 63 ++- src/consensus/tx_verify.h | 25 +- src/index/blockfilterindex.h | 2 +- src/init/common.cpp | 7 +- src/kernel/bitcoinkernel.cpp | 37 ++ src/kernel/bitcoinkernel.h | 63 +++ src/kernel/bitcoinkernel_wrapper.h | 36 ++ src/net.cpp | 2 +- src/net_processing.cpp | 38 +- src/node/interfaces.cpp | 2 +- src/node/psbt.cpp | 3 +- src/qt/clientmodel.cpp | 2 +- src/qt/rpcconsole.cpp | 8 +- src/rpc/mempool.cpp | 2 +- src/rpc/server.cpp | 2 +- src/test/coinstatsindex_tests.cpp | 5 +- src/test/fuzz/addrman.cpp | 8 +- src/test/fuzz/coins_view.cpp | 11 +- src/test/fuzz/headerssync.cpp | 4 +- src/test/fuzz/p2p_headers_presync.cpp | 2 +- src/test/fuzz/util.cpp | 9 +- src/test/fuzz/util.h | 3 +- src/test/headers_sync_chainwork_tests.cpp | 18 +- src/test/kernel/test_kernel.cpp | 19 + src/test/rbf_tests.cpp | 2 +- src/test/script_p2sh_tests.cpp | 11 +- src/test/sigopcount_tests.cpp | 33 +- src/test/transaction_tests.cpp | 6 +- src/test/txvalidationcache_tests.cpp | 35 +- src/test/util_tests.cpp | 9 + src/txmempool.cpp | 4 +- src/util/hasher.h | 4 - src/util/time.h | 6 + src/validation.cpp | 462 +++++++++++------- src/validation.h | 34 +- src/wallet/rpc/wallet.cpp | 2 +- src/wallet/spend.cpp | 2 +- src/wallet/test/coinselection_tests.cpp | 2 +- src/wallet/test/coinselector_tests.cpp | 4 +- src/wallet/test/wallet_tests.cpp | 2 +- src/wallet/wallet.cpp | 4 +- test/functional/feature_block.py | 2 +- test/functional/mempool_accept_wtxid.py | 57 +-- test/functional/p2p_private_broadcast.py | 16 +- test/functional/rpc_uptime.py | 9 +- test/functional/test_framework/script_util.py | 76 +-- test/get_previous_releases.py | 4 +- 56 files changed, 836 insertions(+), 403 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b1df77b..eb27f989 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -488,9 +488,8 @@ try_append_cxx_flags("-fno-extended-identifiers" TARGET core_interface SKIP_LINK # which can cause issues with coverage builds, particularly when using # Clang in the OSS-Fuzz environment due to its use of other options # and a third party script, or with GCC. -try_append_cxx_flags("-fdebug-prefix-map=A=B" TARGET core_interface SKIP_LINK - IF_CHECK_PASSED "-fdebug-prefix-map=${PROJECT_SOURCE_DIR}/src=." -) +# Set `-fmacro-prefix-map`, so that source file names are expanded without the +# src prefix. try_append_cxx_flags("-fmacro-prefix-map=A=B" TARGET core_interface SKIP_LINK IF_CHECK_PASSED "-fmacro-prefix-map=${PROJECT_SOURCE_DIR}/src=." ) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7f42f0be..83a0919a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -78,6 +78,13 @@ The codebase is maintained using the "contributor workflow" where everyone without exception contributes patch proposals using "pull requests" (PRs). This facilitates social contribution, easy testing and peer review. +Pull request authors must fully and confidently understand their own changes +and must have tested them. Contributors should mention which tests cover their +changes, or include the manual steps they used to confirm the change. +Contributors are expected to be prepared to clearly motivate and explain their +changes. If there is doubt, the pull request may be closed. +Please refer to the [peer review](#peer-review) section below for more details. + To contribute a patch, the workflow is as follows: 1. Fork repository ([only for the first time](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)) @@ -338,6 +345,11 @@ reviewers that the changes warrant the review effort, and if reviewers are "Concept NACK'ing" the PR, the author may need to present arguments and/or do research backing their suggested changes. +Moreover, if there is reasonable doubt that the pull request author does not +fully understand the changes they are submitting themselves, or if it becomes +clear that they have not tested the changes on a basic level themselves, the +pull request may be closed immediately. + #### Conceptual Review A review can be a conceptual review, where the reviewer leaves a comment diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index f4db25f4..1eaa86ae 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -211,6 +211,7 @@ CONFIGFLAGS="-DREDUCE_EXPORTS=ON -DBUILD_BENCH=OFF -DBUILD_GUI_TESTS=OFF -DBUILD # CFLAGS HOST_CFLAGS="-O2 -g" HOST_CFLAGS+=$(find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;) +HOST_CFLAGS+=" -fdebug-prefix-map=${DISTSRC}/src=." case "$HOST" in *mingw*) HOST_CFLAGS+=" -fno-ident" ;; *darwin*) unset HOST_CFLAGS ;; diff --git a/src/bench/connectblock.cpp b/src/bench/connectblock.cpp index 434bcdcb..4108476f 100644 --- a/src/bench/connectblock.cpp +++ b/src/bench/connectblock.cpp @@ -9,6 +9,7 @@ #include