Include patches from 29.1 (a)#91
Merged
ajtowns merged 59 commits intobitcoin-inquisition:29.xfrom Sep 4, 2025
Merged
Conversation
Github-Pull: bitcoin#32850 Rebased-From: d6aaffc
Some ambiguous uses of "we" referring to either the node or the peer are replaced with clearer phrasing. Also rephrase some comments for consistency and readability. Applies to all relevant outbound eviction tests in p2p_eviction_logic.py. Github-Pull: bitcoin#32823 Rebased-From: 26598ed
Ensure that tip_header.rehash() is used instead of tip_header.hash, which is None when the header is deserialized from hex. This avoids depending on wait_for_getheaders() falling back to any received message, making the test more explicit and robust. Github-Pull: bitcoin#32823 Rebased-From: ec004cd
When building depends on FreeBSD/OpenBSD `aarch64`, the host compilers
default to `default_host_{CC,CXX}`, which resolves to `gcc`/`g++`. This
is incorrect on these systems, where Clang is the default system
compiler.
Github-Pull: bitcoin#32716
Rebased-From: 4f10a57
Currently if the version 3 is selected for an otherwise standard spender, the test will fail. It's unlikely but possible, so change the test to update expectations and sample more aggressively on border values to instigate failures much quicker in the future if another version is made standard. Github-Pull: bitcoin#32841 Rebased-From: 4be81e9
…root Github-Pull: bitcoin#32859 Rebased-From: f0524cd
Github-Pull: bitcoin#32858 Rebased-From: 0a1af44
Also, capitalized the comments in build-unix.md for uniformity with the docs on other targets. Github-Pull: bitcoin#32846 Rebased-From: 0e9f409
- Update `check_smart_estimates` to calculate the fee rate ceiling by taking the maximum of fees seen, minrelaytxfee, and mempoolminfee. - Improve the subtest name and comments. Github-Pull: bitcoin#32463 Rebased-From: 5c1236f
- Increase block weight by 4000 for all nodes with custom -blockmaxweight. Prior to this commit, we generated blocks with 4000 weight units less worth of transactions. See bitcoin#32461 (comment) for details. This commit fixes it by increasing the block weight by 4000. Github-Pull: bitcoin#32463 Rebased-From: 9b75cfd
Github-Pull: bitcoin#32826 Rebased-From: 6967e8e
When using CMake policies 3.14 and below, the `export(PACKAGE)` command by default populates the user package registry, which is stored outside the build tree. Setting the `CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable disables this side effect. In CMake 3.15 and later, this behavior is disabled by default, and the variable has no effect. Github-Pull: bitcoin#32943 Rebased-From: 44f3bae
Github-Pull: bitcoin#32954 Rebased-From: 12a6959
Starting with version 13.x, the mingw headers will define the value of NTDDI_VERSION, based on the value of _WIN32_WINNT, if that version is < Windows 10. Given that libevent was undefining our _WIN32_WINNT, and redefining it to a value < Windows 10 (0x0501), NTDDI_VERSION was also being defined to that value, leading to functions not being exposed in the mingw-w64 headers; see here: https://github.com/mingw-w64/mingw-w64/blob/9c2668ef77e75ea4d8a6c7d100b14643269caec3/mingw-w64-headers/include/iphlpapi.h#L36-L41. Imports a commit from usptream (a14ff91254f40cf36e0fee199e26fb11260fab49). Fixes bitcoin#32707. Github-Pull: bitcoin#32837 Rebased-From: f5647c6
5300295 doc: update release notes for 29.x (fanquake) 730886b depends: fix libevent _WIN32_WINNT usage (fanquake) f798c31 cmake: Drop no longer necessary "cmakeMinimumRequired" object (Hennadii Stepanov) bc2147c depends: Force `CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE` (Hennadii Stepanov) 58b1a65 add more bad p2p ports (Jameson Lopp) f85d41c test: retain the intended behavior of `feature_fee_estimation.py` nodes (ismaelsadeeq) 84c0c0e test: fix incorrect subtest in `feature_fee_estimation.py` (ismaelsadeeq) 83ee49b doc: clarify that the "-j N" goes after the "--build build" part (Salvatore Ingala) e5a7575 doc: Add workaround for vcpkg issue with paths with embedded spaces (Hennadii Stepanov) 59a83fb functional test: correctly detect nonstd TRUC tx vsize in feature_taproot (Greg Sanders) 9f3690b feature_taproot: sample tx version border values more (Greg Sanders) 8a4a938 depends: Override host compilers for FreeBSD and OpenBSD (Hennadii Stepanov) 3a57bfa test: Use rehash() in outbound eviction block-relay (pablomartin4btc) f82015c test: Clarify roles in outbound eviction comments (pablomartin4btc) 222fbfc test: check P2SH sigop count for coinbase tx (brunoerg) Pull request description: Backports - bitcoin#32463 - bitcoin#32716 - bitcoin#32823 - bitcoin#32826 - bitcoin#32837 - bitcoin#32841 - bitcoin#32846 - bitcoin#32850 - bitcoin#32858 - bitcoin#32859 - bitcoin#32943 - bitcoin#32954 ACKs for top commit: hebasto: ACK 5300295, I've backported all listed PRs locally (had 3 conflicts to resolve), and got zero diff with this PR. glozow: ACK 5300295 Tree-SHA512: c2f764ce3dcd1b6c16bfbe73a548a815f8d7db83653436d17686541a5cb530255a96132865442aa2f569340c95abee31aadda8bf0736582c7a19720029096b1e
…standard. The Consensus Cleanup soft fork proposal includes a limit on the number of legacy signature operations potentially executed when validating a transaction. If this change is to be implemented here and activated by Bitcoin users in the future, we should prevent the ability for someone to broadcast a transaction through the p2p network that is not valid according to the new rules. This is because if it was possible it would be a trivial DoS to potentially unupgraded miners after the soft fork activates. We do not know for sure whether users will activate the Consensus Cleanup. However if they do such transactions must have been made non-standard long in advance, due to the time it takes for most nodes on the network to upgrade. In addition this limit may only be run into by pathological transactions which pad the Script with sigops but do not use actual signatures when spending, as otherwise they would run into the standard transaction size limit. Github-Pull: bitcoin#32521 Rebased-From: 5863315
Check bounds and different output types. Github-Pull: bitcoin#32521 Rebased-From: 3671479
It's useful to have an end-to-end test in addition to the unit test to sanity check the RPC error as well as making sure the transaction is otherwise fully standard. Github-Pull: bitcoin#32521 Rebased-From: 96da68a
This adds a missing catch for BaseException (e.g. SystemExit), which would otherwise be silently ignored. Also, remove the redundant other catches, which are just calling log.exception with a redundant log message. Github-Pull: bitcoin#33001 Rebased-From: fa30b34
log.exception is more verbose and useful to debug timeouts. Also, log stderr for CalledProcessError to make debugging easier. Github-Pull: bitcoin#33001 Rebased-From: faa3e68
…ptions 411e151 doc: update release notes for 29.x (fanquake) 5e327e6 test: Log KeyboardInterrupt as exception (MarcoFalke) 79e1a3c test: Do not pass tests on unhandled exceptions (MarcoFalke) Pull request description: Backports bitcoin#33001 to `29.x`. ACKs for top commit: pablomartin4btc: ACK 411e151 marcofleon: lgtm ACK 411e151 Tree-SHA512: ea930f8c24a0a5e18f2107e96540db5c39941442059190d6104dfcf88b4a33d06ecaa7dbdf8baa91e564ee7ca3d12df5118c7fa404a38108de4ad0e5f122f72d
Wait until the node's process has fully stopped before starting a new instance. Since the same code is used in tool_wallet.py, this consolidates the behavior into a 'kill_process()' function. Github-Pull: bitcoin#32069 Rebased-From: 36b0713
c6fe697 doc: update release notes for 29.x (fanquake) 380b5ad test: fix intermittent failure in wallet_reorgsrestore.py (furszy) Pull request description: Backport bitcoin#32069 to 29. This is a test flakiness fix for bitcoin#31757, which was backported to 29 in bitcoin#32589. ACKs for top commit: marcofleon: ACK c6fe697 Tree-SHA512: 82517eef67c8d0fe57e70cb769d1b040ea8dea41c2d2e5b442477e1c7add7d7bac1c4aabbebc5b7d440db5b7bf00f1d70dc6ffb375b7a2e77d9599c543579122
f25dc84 doc: update release notes for 29.x (Antoine Poinsot) 3130233 qa: functional test a transaction running into the legacy sigop limit (Antoine Poinsot) 0a4671d qa: unit test standardness of inputs packed with legacy sigops (Antoine Poinsot) 204b965 policy: make pathological transactions packed with legacy sigops non-standard. (Antoine Poinsot) Pull request description: This backports PR bitcoin#32521 to make the change available to miners who can't (or don't want to) upgrade past version 29. ACKs for top commit: marcofleon: reACK f25dc84 glozow: ACK f25dc84 Tree-SHA512: d5e06618720ed1a96d8a5fccdd8d1dbcbb5748505aa0df69198326828fe13f220e55bbce813f6f2daae82d23348e1f83a3a20a28639ec3fc2455c5b6e79a56e6
The BPF code was incorrectly passing pointer variables by value to bpf_usdt_readarg(), causing the function to fail silently and resulting in transaction hashes and reason strings displaying as zeros or garbage. This fix adds the missing reference operator (&) when passing pointer variables to bpf_usdt_readarg(), allowing the function to properly write the pointer values and enabling correct display of transaction hashes and removal/rejection reasons. Fixes the regression introduced in ec47ba3 where bpf_usdt_readarg_p was replaced with bpf_usdt_readarg but the calling convention wasn't properly updated for pointer arguments. Github-Pull: bitcoin#33086 Rebased-From: 0ce041e
Currently there is a warning for this in guix-build, but we also need one in guix-codesign, otherwise the codesigned hashes are not reproducible. Move common functionality into prelude and call the function in both guix actions. Github-Pull: bitcoin#33073 Rebased-From: 1bed0f7
This was missed in the v29.0 release notes.
Github-Pull: bitcoin#33088 Rebased-From: 6757052
The getpeerinfo docs incorrectly specified the ping durations as milliseconds. This was incorrectly changed in a3789c7 (released in v25; master since Sept. 2022). The correct duration unit is seconds. Also, remove the documentation of the getpeerinfo RPC response from the ping RPC since it's incomplete. Better to just reference the getpeerinfo RPC and it's documenation for this. Github-Pull: bitcoin#33133 Rebased-From: 1252eeb
…nd_vin' is the correct field Github-Pull: bitcoin#33119 Rebased-From: 3543bfd
b9e637b doc: update release notes for 29.x (fanquake) 2b9738a test: Fix 'getdescriptoractivity' RPCHelpMan, add test to verify 'spend_vin' is the correct field (Chris Stewart) 4e8abca rpc: fix getpeerinfo ping duration unit docs (0xb10c) a08886d doc: move `cmake -B build -LH` up in Unix build docs (Bufo) 264418f doc: Add rel note for breaking change in dumptxoutset RPC (Chris Stewart) a18b53f guix: warn SOURCE_DATE_EPOCH set in guix-codesign (will) 9437415 tracing: fix pointer argument handling in mempool_monitor.py (deadmanoz) 3cd8612 doc/zmq: fix unix socket path example (Roman Zeyde) Pull request description: Backports: * bitcoin#33070 * bitcoin#33073 * bitcoin#33086 * bitcoin#33088 * bitcoin#33103 * bitcoin#33119 * bitcoin#33133 ACKs for top commit: glozow: ACK b9e637b Tree-SHA512: bf2a700ec4d730548cf5abf10930b41e26742ea23582149b0eddcaaa48c1db05ab657ef9ffc7dcba2d1af2e265d0ea866d7b484a321a9c9ac662a6dc2263d102
We mark ~DebugLogHelper as noexcept(false) to be able to catch the exception it throws. This lets us use it in test in combination with BOOST_CHECK_THROW and BOOST_CHECK_NO_THROW to check that certain log messages are (not) logged. Co-Authored-By: Niklas Gogge <n.goeggi@gmail.com> Github-Pull: bitcoin#32604 Rebased-From: df7972a
LogRateLimiter will be used to keep track of source locations and our current time-based logging window. It contains an unordered_map and a m_suppressions_active bool to track source locations. The map is keyed by std::source_location, so a custom Hash function (SourceLocationHasher) and custom KeyEqual function (SourceLocationEqual) is provided. SourceLocationHasher uses CSipHasher(0,0) under the hood to get a uniform distribution. A public Reset method is provided so that a scheduler (e.g. the "b-scheduler" thread) can periodically reset LogRateLimiter's state when the time window has elapsed. The LogRateLimiter::Consume method checks if we have enough available bytes in our rate limiting budget to log an additional string. It returns a Status enum that denotes the rate limiting status and can be used by the caller to emit a warning, skip logging, etc. The Status enum has three states: - UNSUPPRESSED (logging was successful) - NEWLY_SUPPRESSED (logging was succcesful, next log will be suppressed) - STILL_SUPPRESSED (logging was unsuccessful) LogLimitStats counts the available bytes left for logging per source location for the current logging window. It does not track actual source locations; it is used as a value in m_source_locations. Also exposes a SuppressionsActive() method so the logger can use that in a later commit to prefix [*] to logs whenenever suppressions are active. Co-Authored-By: Niklas Gogge <n.goeggi@gmail.com> Co-Authored-By: stickies-v <stickies-v@protonmail.com> Github-Pull: bitcoin#32604 Rebased-From: afb9e39
The std::source_location conveniently stores the file name, line number, and function name of a source code location. We switch to using it instead of the __func__ identifier and the __FILE__ and __LINE__ macros. BufferedLog is changed to have a std::source_location member, replacing the source_file, source_line, and logging_function members. As a result, MemUsage no longer explicitly counts source_file or logging_function as the std::source_location memory usage is included in the MallocUsage call. This also changes the behavior of -logsourcelocations as std::source_location includes the entire function signature. Because of this, the functional test feature_config_args.py must be changed to no longer include the function signature as the function signature can differ across platforms. Co-Authored-By: Niklas Gogge <n.goeggi@gmail.com> Co-Authored-By: stickies-v <stickies-v@protonmail.com> Github-Pull: bitcoin#32604 Rebased-From: a6a35cc
…ogPrintLevel To mitigate disk-filling attacks caused by unsafe usages of LogPrintf and friends, we rate-limit them by passing a should_ratelimit bool that eventually makes its way to LogPrintStr which may call LogRateLimiter::Consume. The rate limiting is accomplished by adding a LogRateLimiter member to BCLog::Logger which tracks source code locations for the given logging window. Every hour, a source location can log up to 1MiB of data. Source locations that exceed the limit will have their logs suppressed for the rest of the window determined by m_limiter. This change affects the public LogPrintLevel function if called with a level >= BCLog::Level::Info. The UpdateTipLog function has been changed to use the private LogPrintLevel_ macro with should_ratelimit set to false. This allows UpdateTipLog to log during IBD without hitting the rate limit. Note that on restart, a source location that was rate limited before the restart will be able to log until it hits the rate limit again. Co-Authored-By: Niklas Gogge <n.goeggi@gmail.com> Co-Authored-By: stickies-v <stickies-v@protonmail.com> Github-Pull: bitcoin#32604 Rebased-From: d541409
Github-Pull: bitcoin#32604 Rebased-From: 4c772cb
Github-Pull: bitcoin#33011 Rebased-From: 616bc22
Co-Authored-By: l0rinc <pap.lorinc@gmail.com> Github-Pull: bitcoin#33011 Rebased-From: b8e92fb
Co-Authored-By: l0rinc <pap.lorinc@gmail.com> Github-Pull: bitcoin#33011 Rebased-From: 5f70bc8
Co-Authored-By: stickies-v <stickies-v@protonmail.com> Github-Pull: bitcoin#33011 Rebased-From: 8319a13
Clean up the noisy LogLimitStats and remove references to the time window. Co-Authored-By: stickies-v <stickies-v@protonmail.com> Github-Pull: bitcoin#33011 Rebased-From: 3c7cae4
… there are suppressions In LogPrintStr_: - remove an unnecessary BCLog since we are in the BCLog namespace. - remove an unnecessary \n when rate limiting is triggered since FormatLogStrInPlace will add it. - move the ratelimit bool into an else if block. - prefix all log lines with [*] when suppressions exist. Previously this was only done if should_ratelimit was true. In Reset: - remove an unnecessary \n since FormatLogStrInPlace will add it. - Change Level::Info to Level::Warning. Github-Pull: bitcoin#33011 Rebased-From: e8f9c37
This allows us to safely and explicitly manage the dual dependency on the limiter: one for the Logger, and one for the CScheduler. Github-Pull: bitcoin#33011 Rebased-From: 3d630c2
Deduplicates repeated usage of the same functionality. Github-Pull: bitcoin#33011 Rebased-From: 05d7c22
This ensures log tests behave consistently when other tests modify the log category mask. Github-Pull: bitcoin#33011 Rebased-From: 350193e
- Add helper functions and structs to improve readability and reusability of test code - Make tests more specific by comparing all produced log lines with expected log lines instead of relying on approximations or proxies. Github-Pull: bitcoin#33011 Rebased-From: 9f3b017
Use -nologratelimit by default in functional tests if the bitcoind version supports it. Co-Authored-By: stickies-v <stickies-v@protonmail.com> Github-Pull: bitcoin#33011 Rebased-From: 5c74a0b
Change time_window from 20s to 1h so Reset is not accidentally called if the test takes a while. Change num_lines from 1024 to 10 since LogRateLimiter is parameterized and does not require logging 1MiB of data. Co-Authored-By: stickies-v <stickies-v@protonmail.com> Github-Pull: bitcoin#33211 Rebased-From: 5dda364
0022e25 test: modify logging_filesize_rate_limit params (Eugene Siegel) 206f590 config: add DEBUG_ONLY -logratelimit (Eugene Siegel) dfdd407 test: logging_filesize_rate_limit improvements (stickies-v) 1153816 test: don't leak log category mask across tests (stickies-v) 4ed7a51 test: add ReadDebugLogLines helper function (stickies-v) acfa83d log: make m_limiter a shared_ptr (stickies-v) 8175134 log: clean up LogPrintStr_ and Reset, prefix all logs with "[*]" when there are suppressions (Eugene Siegel) 7c3820f log: change LogLimitStats to struct LogRateLimiter::Stats (Eugene Siegel) dfe4e19 log: clarify RATELIMIT_MAX_BYTES comment, use RATELIMIT_WINDOW (Eugene Siegel) 273ffda log: remove const qualifier from arguments in LogPrintFormatInternal (Eugene Siegel) 9cde68f log: avoid double hashing in SourceLocationHasher (Eugene Siegel) 25f975b test: remove noexcept(false) comment in ~DebugLogHelper (Eugene Siegel) 24c793d doc: add release notes for new rate limiting logging behavior (Eugene Siegel) 0b6b096 log: Add rate limiting to LogPrintf, LogInfo, LogWarning, LogError, LogPrintLevel (Eugene Siegel) a0992a8 log: use std::source_location in place of __func__, __FILE__, __LINE__ (Eugene Siegel) 41262cc log: introduce LogRateLimiter, LogLimitStats, Status (Eugene Siegel) 4987c03 test: Mark ~DebugLogHelper as noexcept(false) (Eugene Siegel) Pull request description: Backports: * bitcoin#32604 * Note that 24c793d isn't clean, as it's added directly to `release-notes.md`. * bitcoin#33011 * bitcoin#33211 ACKs for top commit: instagibbs: utACK 0022e25 dergoegge: utACK 0022e25 stickies-v: ACK 0022e25 - all backports clean except the release notes one, as indicated. Tree-SHA512: 466aa6884a2c936131cf222b94943148bc385fc9574840cc63933f510c40c2cc74d8c9a9b2560205926a0a70a93de0e191a623fa2352628d8cead45bbee59b1c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are the commits that can be merged unmodified.