aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-07Merge bitcoin/bitcoin#29023: doc: add historical release notes for 26.0Andrew Chow
ca5937553b4b4dde53995d0b66e30150401023eb doc: Missing additions to 26.0 release notes (fanquake) 7d4e47d1849ba00c5b45995a96f2c747f1a97c71 doc: add historical release notes for 26.0 (fanquake) 8df4aaabbe3da5036436b96b5839acb1d7cd45f1 doc: add minimum required Linux Kernel to release-notes (fanquake) Pull request description: Bins are now up, used for GH release etc. ACKs for top commit: willcl-ark: ACK ca5937553b4b4dde53995d0b66e30150401023eb achow101: ACK ca5937553b4b4dde53995d0b66e30150401023eb Tree-SHA512: 1fefd857092412231215dc72b5d79b2a7828a8c74aa6cb19a7dbc3c3b77feace3ce7fa89d517b4ce25ea41ed84e7ca4ba840d0923b97bf8f6b40b27ad96affa9
2023-12-07Merge bitcoin/bitcoin#28924: refactor: Remove unused and fragile string ↵fanquake
interface from arith_uint256 fa63f16018d9468e1751d2107b5102184ac2d5ae test: Add uint256 string parse tests (MarcoFalke) facf629ce8ff1d1f6d254dde4e89b5018f8df60e refactor: Remove unused and fragile string interface from arith_uint256 (MarcoFalke) Pull request description: The string interface (`base_uint(const std::string&)`, as well as `base_uint::SetHex`) is problematic for many reasons: * It is unused (except in test-only code). * It is redundant with the `uint256` string interface: `std::string -> uint256 -> UintToArith256`. * It is brittle, because it inherits the brittle `uint256` string interface, which is brittle due to the use of `c_str()` (embedded null will be treated as end-of string), etc ... Instead of fixing the interface, remove it since it is unused and redundant with `UintToArith256`. ACKs for top commit: ajtowns: ACK fa63f16018d9468e1751d2107b5102184ac2d5ae TheCharlatan: ACK fa63f16018d9468e1751d2107b5102184ac2d5ae Tree-SHA512: a95d5b938ffd0473361336bbf6be093d01265a626c50be1345ce2c5e582c0f3f73eb11af5fd1884019f59d7ba27e670ecffdb41d2c624ffb9aa63bd52b780e62
2023-12-07doc: Missing additions to 26.0 release notesfanquake
2023-12-07doc: Add link to needs-release-notes labelMarcoFalke
2023-12-07doc: add historical release notes for 26.0fanquake
2023-12-07doc: add minimum required Linux Kernel to release-notesfanquake
2023-12-07refactor: rpc: Pass CBlockIndex by reference instead of pointerMarcoFalke
All functions assume that the pointer is never null, so pass by reference, to avoid accidental segfaults at runtime, or at least make them more obvious. Also, remove unused c-style casts in touched lines. Also, add CHECK_NONFATAL checks, to turn segfault crashes into an recoverable runtime error with debug information.
2023-12-07refactor: Use reference instead of pointer in IsBlockPrunedMarcoFalke
This makes it harder to pass nullptr and cause issues such as https://github.com/bitcoin/bitcoin/commit/dde7ac5c704688c8a9af29bd07e5ae8114824ce7
2023-12-07fuzz: Use C++20 starts_with in rpc.cppMarcoFalke
2023-12-07Revert "tracepoints: Disables `-Wgnu-zero-variadic-macro-arguments` to ↵MarcoFalke
compile without warnings" This reverts commit 5197660e947435e510ef3ef72be8be8dee3ffa41.
2023-12-07refactor: Drop unused _Pragma to ignore -Wgnu-zero-variadic-macro-argumentsMarcoFalke
2023-12-07refactor: modernize-use-default-member-init for bit-fields (C++20)MarcoFalke
2023-12-07build: Require C++20 compilerMarcoFalke
2023-12-07Merge bitcoin/bitcoin#28622: build: use macOS 14 SDK (Xcode 15.0)fanquake
8ea45e626e5a0482ee11d4376f961d8126ce7c7b build: use macOS 14 SDK (Xcode 15.0) (fanquake) 51c97ffb6989a4cf56ad966d360a9fa0426e174c build: patch boost process for macOS 14 SDK (fanquake) 423949a13b39a193dff8b2758d23d6691d11dbc3 depends: add -platform_version to macOS build flags (fanquake) Pull request description: This fixes: https://github.com/bitcoin/bitcoin/pull/28349#issuecomment-1748515277 (cross-compiling with C++20 for macOS). See https://developer.apple.com/xcode/cpp/#c++20 for C++20 support in Apples libc++, some features landed with Xcode 14.3, although many more landed with Xcode 15.0. ACKs for top commit: hebasto: ACK 8ea45e626e5a0482ee11d4376f961d8126ce7c7b. TheCharlatan: ACK 8ea45e626e5a0482ee11d4376f961d8126ce7c7b Tree-SHA512: 274ce2c9b9f8e4d755c07b8d0d4897a7f92708ac64e6afb7a3f75bdb485e863fc7f40badf3a88b129ce36f6cca72f768dc2ed7fba2bdf0bb6da2bf0c8fedee10
2023-12-06test: Extends MEMPOOL msg functional testSergi Delgado Segura
Currently, p2p_filter.py::test_msg_mempool is not testing much. This extends the tests so the interaction between sending MEMPOOL messages with a filter that does not include all transactions in the mempool reacts, plus how it interacts with INV messages
2023-12-06Merge bitcoin/bitcoin#29012: fuzz: Avoid timeout in bitdequefanquake
fad1903b8a85506378101c1f857ba47b4a058fb4 fuzz: Avoid timeout in bitdeque (MarcoFalke) Pull request description: Avoid timeouts such as https://github.com/bitcoin/bitcoin/issues/28812#issuecomment-1842914664 This is done by: * Limiting the maximum number of iterations if the maximum size of the container is "large" (see the magic numbers in the code). * Check the equality only once. This should be fine, because if a crash were to happen in the equality check, but the crash doesn't happen if further iterations were run, the fuzz engine should eventually find the crash by truncating the fuzz input. ACKs for top commit: sipa: utACK fad1903b8a85506378101c1f857ba47b4a058fb4 dergoegge: utACK fad1903b8a85506378101c1f857ba47b4a058fb4 brunoerg: crACK fad1903b8a85506378101c1f857ba47b4a058fb4 Tree-SHA512: d3d83acb3e736b8fcaf5d17ce225ac82a9f9a2efea048512d2fed594ba6c76c25bae72eb0fab3276d4db37baec0752e5367cecfb18161301b921fed09693045e
2023-12-06Merge bitcoin/bitcoin#27581: net: Continuous ASMap health checkAndrew Chow
3ea54e5db7d53da5afa321e1800c29aa269dd3b3 net: Add continuous ASMap health check logging (Fabian Jahr) 28d7e55dff826a69f3f8e58139dbffb611cc5947 test: Add tests for unfiltered GetAddr usage (Fabian Jahr) b8843d37aed1276ff8527328c956c70c6e02ee13 fuzz: Let fuzzers use filter options in GetAddr/GetAddresses (Fabian Jahr) e16f420547fc72a5a2902927aa7138e43c0fb7c8 net: Optionally include terrible addresses in GetAddr results (Fabian Jahr) Pull request description: There are certain statistics we can collect by running all our known clearnet addresses against the ASMap file. This could show issues with a maliciously manipulated file or with an old file that has decayed with time. This is just a proof of concept for now. My idea currently is to run the analysis once per day and print the results to logs if an ASMap file is used. ACKs for top commit: achow101: ACK 3ea54e5db7d53da5afa321e1800c29aa269dd3b3 mzumsande: ACK 3ea54e5db7d53da5afa321e1800c29aa269dd3b3 brunoerg: crACK 3ea54e5db7d53da5afa321e1800c29aa269dd3b3 Tree-SHA512: 777acbfac43cc43ce4a0a3612434e4ddbc65f59ae8ffc9e24f21de09011bccb297f0599cbaa82bcf40ef68e5af582c4e98556379db7ceff7d9f97574a1cf8e09
2023-12-06fuzz: Detect deadlocks in process_messagedergoegge
2023-12-06Merge bitcoin/bitcoin#28980: rpc: encryptwallet help, mention HD seed ↵Andrew Chow
rotation and backup requirement ca09415e630f0f7de9160cab234bd5ba6968ff2d rpc, doc: encryptwallet, mention HD seed rotation and new backup (furszy) Pull request description: Small and simple PR, updating the `encryptwallet` help message. Better to notify users about the HD seed rotation and the new backup requirement before executing the encryption process. Ensuring they are prepared to update previous backups and securely safeguard the updated wallet file. ACKs for top commit: S3RK: ACK ca09415e630f0f7de9160cab234bd5ba6968ff2d achow101: ACK ca09415e630f0f7de9160cab234bd5ba6968ff2d Tree-SHA512: f0ee65f5cea66450566e3a85e066d4c06b3293dd0e0b2ed5fafdb7fb11da0a2cd94407299a3c57a0706c2ed782f8eabb73443e85d8099a62a3fb10a02636ab46
2023-12-06Merge bitcoin/bitcoin#28989: test: Fix test by checking the actual exception ↵Andrew Chow
instance 55e3dc3e03510e97caba1547a82e3e022b0bbd42 test: Fix test by checking the actual exception instance (Hennadii Stepanov) Pull request description: The `system_tests/run_command` test is broken because it passes even with the diff as follows: ```diff --- a/src/test/system_tests.cpp +++ b/src/test/system_tests.cpp @@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE(run_command) }); } { - BOOST_REQUIRE_THROW(RunCommandParseJSON("echo \"{\""), std::runtime_error); // Unable to parse JSON + BOOST_REQUIRE_THROW(RunCommandParseJSON("invalid_command \"{\""), std::runtime_error); // Unable to parse JSON } // Test std::in, except for Windows #ifndef WIN32 ``` The reason of such fragility is that the [`BOOST_REQUIRE_THROW`](https://www.boost.org/doc/libs/1_83_0/libs/test/doc/html/boost_test/utf_reference/testing_tool_ref/assertion_boost_level_throw.html) macro passes even if the command raises an exception in the underlying subprocess implementation, which might have a type derived from `std::runtime_error`. ACKs for top commit: maflcko: lgtm ACK 55e3dc3e03510e97caba1547a82e3e022b0bbd42 achow101: ACK 55e3dc3e03510e97caba1547a82e3e022b0bbd42 furszy: Non-Windows code ACK 55e3dc3e pablomartin4btc: ACK 55e3dc3e03510e97caba1547a82e3e022b0bbd42 Tree-SHA512: 32f49421bdcc94744c81e82dc10cfa02e3f8ed111974edf1c2a47bdaeb56d7baec1bede67301cc89464fba613029ecb131dedc6bc5948777ab52f0f12df8bfe9
2023-12-06fuzz: Avoid timeout in bitdequeMarcoFalke
2023-12-06Merge bitcoin/bitcoin#29003: rpc: fix getrawtransaction segfaultfanquake
9075a446461ccbc446d21af778aac50b604f39b3 test: add regression test for the getrawtransaction segfault (Martin Zumsande) 494a926d05df44b60b3bc1145ad2a64acf96f61b rpc: fix getrawtransaction segfault (Martin Zumsande) Pull request description: The crash, reported in #28986, happens when calling `getrawtransaction` for any mempool transaction with `verbosity=2`, while pruning, because the rpc calls `IsBlockPruned(const CBlockIndex* pblockindex)`, which dereferences `pblockindex` without a check. For ease of backporting this PR fixes it just locally in `rpc/rawtransaction.cpp` by moving the check for`!blockindex` up so that `IsBlockPruned()` will not be called with a `nullptr`. We might also want to change `IsBlockPruned()` so it doesn't crash when called with a `nullptr`, but I didn't do that here. Fixes #28986 ACKs for top commit: maflcko: lgtm test-was-added ACK 9075a446461ccbc446d21af778aac50b604f39b3 theStack: Tested ACK 9075a446461ccbc446d21af778aac50b604f39b3 Tree-SHA512: 0f7ed52579487196c206e16b45582b64e4b02ecf2a2eb0a31d2f3b52415bc9c64278cb94259314ef14ab7fb393c6195f79b3027d6de471d67614e51474498b11
2023-12-06Merge bitcoin/bitcoin#28992: ci: Use Ubuntu 24.04 Noble for asan,tsan,tidy,fuzzfanquake
fad2392c5861a88a87cb8a03d2fc9773e178feb8 ci: Use Ubuntu 24.04 Noble for asan (MarcoFalke) fa83b65ef8934b44fbac02da8dbc27fc0bc230e6 ci: Use Ubuntu 24.04 Noble for tsan,tidy,fuzz (MarcoFalke) Pull request description: 23.10 will be EOL mid next year, so a bump is needed before then for the `master` branch (and possibly the `26.x` branch). Doing the bump now is fine, because the clang version is pinned to 17 inside the CI tasks. So a default clang version change in the system image should not affect the tasks. Once clang-18 is available and the default in April next year (https://discourse.ubuntu.com/t/noble-numbat-release-schedule/35649#planned-and-potentially-disruptive-archive-wide-activities-2), the pinned version could be bumped (for CI tasks that require a pin, like tidy), or the pin can be removed (for CI tasks that usually do not require a pin, like fuzz or the sanitizers). ACKs for top commit: fanquake: ACK fad2392c5861a88a87cb8a03d2fc9773e178feb8 Tree-SHA512: c40aede4e2281a5d539d5f65d2c08a57bf92e4a00b4f45a4260b57b7443a63d1a0603115da4a3bbd100ac5f6ade3f2eda0916e4b565573741162a76294ec0ac5
2023-12-06fuzz: p2p: Detect peer deadlocksMarcoFalke
2023-12-06test: fix v2 transport intermittent test failure (#29002)Sebastian Falbesoner
Only relying on the number of peers for detecting a new connection suffers from race conditions, as unrelated previous peers could disconnect at anytime in-between. Use the more robust approach of watching for an increased highest peer id instead (again using the `getpeerinfo` RPC call), with a newly introduced context manager method `TestNode.wait_for_new_peer()`. Fixes #29009.
2023-12-05test: add regression test for the getrawtransaction segfaultMartin Zumsande
This fails on master without the previous commit.
2023-12-05rpc, doc: encryptwallet, mention HD seed rotation and new backupfurszy
Better to notify users about the HD seed rotation and the new backup requirement before executing the encryption process. Ensuring they are prepared to update previous backups and securely safeguard the updated wallet file. Co-authored-by: jonatack <jon@atack.com>
2023-12-05rpc: fix getrawtransaction segfaultMartin Zumsande
The crash would happen when querying a mempool transaction with verbosity=2, while pruning.
2023-12-05build: Enable -Wunreachable-codeMarcoFalke
2023-12-05Merge bitcoin/bitcoin#28856: depends: Build the `native_capnp` and `capnp` ↵fanquake
packages with CMake 11d797e3a078b8f5f0039a1073047d3f0a8c6cdc depends: Build `native_capnp` package with CMake (Hennadii Stepanov) 90389c95e9edf3d705fb9376388c83f07d1a570e depends: Build `capnp` package with CMake (Hennadii Stepanov) Pull request description: The first commit fixes two bugs when cross-compiling the `capnp` package on the master branch @ 160d23677ad799cf9b493eaa923b2ac080c3fb8e: - for `x86_64-w64-mingw32` (see https://github.com/bitcoin/bitcoin/pull/28735#issuecomment-1790406668): ``` libtool: link: x86_64-w64-mingw32-g++-posix -shared -nostdlib /usr/lib/gcc/x86_64-w64-mingw32/12-posix/../../../../x86_64-w64-mingw32/lib/dllcrt2.o /usr/lib/gcc/x86_64-w64-mingw32/12-posix/crtbegin.o src/kj/.libs/cidr.o src/kj/.libs/common.o src/kj/.libs/units.o src/kj/.libs/memory.o src/kj/.libs/refcount.o src/kj/.libs/array.o src/kj/.libs/list.o src/kj/.libs/string.o src/kj/.libs/string-tree.o src/kj/.libs/source-location.o src/kj/.libs/hash.o src/kj/.libs/table.o src/kj/.libs/encoding.o src/kj/.libs/exception.o src/kj/.libs/debug.o src/kj/.libs/arena.o src/kj/.libs/io.o src/kj/.libs/mutex.o src/kj/.libs/thread.o src/kj/.libs/time.o src/kj/.libs/filesystem.o src/kj/.libs/filesystem-disk-unix.o src/kj/.libs/filesystem-disk-win32.o src/kj/.libs/test-helpers.o src/kj/.libs/main.o src/kj/parse/.libs/char.o -L/home/hebasto/git/bitcoin/depends/x86_64-w64-mingw32/lib -L/usr/lib/gcc/x86_64-w64-mingw32/12-posix -L/usr/lib/gcc/x86_64-w64-mingw32/12-posix/../../../../x86_64-w64-mingw32/lib -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 /usr/lib/gcc/x86_64-w64-mingw32/12-posix/crtend.o -mthreads -O2 -mthreads -mthreads -o .libs/libkj-1-0-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libkj.dll.a /usr/bin/x86_64-w64-mingw32-ld: src/kj/.libs/cidr.o:cidr.c++:(.text+0x1dc): undefined reference to `__imp_inet_ntop' /usr/bin/x86_64-w64-mingw32-ld: src/kj/.libs/cidr.o:cidr.c++:(.text+0x44b): undefined reference to `__imp_inet_pton' collect2: error: ld returned 1 exit status ``` - for `arm64-apple-darwin`: ``` checking build system type... x86_64-pc-linux-gnu checking host system type... Invalid configuration `arm64-apple-darwin': machine `arm64-apple' not recognized configure: error: /bin/bash build-aux/config.sub arm64-apple-darwin failed ``` The second commit applies the same changes for the `native_capnp` package for [consistency](https://github.com/bitcoin/bitcoin/pull/28856#issuecomment-1807936546). ACKs for top commit: ryanofsky: Code review ACK 11d797e3a078b8f5f0039a1073047d3f0a8c6cdc. Since last review arm64-apple-darwin platform is now mentioned in the commit message, and the change to `depends/packages/libmultiprocess.mk` in d1604d4b1d1ee8df279a1776303e167cc3d06193 which was unrelated (but probably still a good optimization) was reverted. Tree-SHA512: c636e53073ce6fcda9724723bc59f3990fa9629a3b2f73d93dbc102a5a1badfbe8f4c5fef841f03588ebcad5cd4883f3ce32b128afcd75f6bc21eb801796a586
2023-12-05Merge bitcoin/bitcoin#28997: fuzz: txorphan check wtxids using ↵fanquake
GenTxid::Wtxid not GenTxid::Txid 38816ff64ed90a55e4879e9b440cdc876302f750 fuzz: txorphan check wtxids using GenTxid::Wtxid not GenTxid::Txid (Greg Sanders) Pull request description: Fixes the bugs in the fuzz test with no more changes as an alternative to https://github.com/bitcoin/bitcoin/pull/28658 ACKs for top commit: naumenkogs: ACK 38816ff64ed90a55e4879e9b440cdc876302f750 dergoegge: ACK 38816ff64ed90a55e4879e9b440cdc876302f750 Tree-SHA512: 5e46a83f2b2a2ac0672a63eb6200b019e01089ab1aa80c4ab869b6fcf27ccf2e84a064e96397f1a1869ccfa43b0c9638cbae681a27c4ca3c96ac71f41262601e
2023-12-05build: use macOS 14 SDK (Xcode 15.0)fanquake
2023-12-05build: patch boost process for macOS 14 SDKfanquake
2023-12-05depends: add -platform_version to macOS build flagsfanquake
```bash -platform_version platform min_version sdk_version This is set to indicate the platform, oldest supported version of that platform that output is to be used on, and the SDK that the output was built against. ```
2023-12-04Merge bitcoin/bitcoin#28852: script, assumeutxo: Enhance validations in ↵Ryan Ofsky
utxo_snapshot.sh 11b7269d83a56f919f9dddb7f7c72a96d428627f script: Enhance validations in utxo_snapshot.sh (pablomartin4btc) Pull request description: This PR resolves #27841 and some more: - Ensure that the snapshot height is higher than the pruned block height when the node is pruned (Suggested by @Sjors [here](https://github.com/bitcoin/bitcoin/pull/28553#issuecomment-1804941396)). - Validate the correctness of the file path and check if the file already exists (@hazeycode's [#27845](https://github.com/bitcoin/bitcoin/pull/27845)). - Make network activity disablement optional for the user (Suggested by @Sjors [here](https://github.com/bitcoin/bitcoin/pull/16899#discussion_r342735815) and [here](https://github.com/bitcoin/bitcoin/pull/16899#issuecomment-536520911)). - Ensure the `reconsiderblock` command is triggered on exit (@hazeycode's same PR as above), even in the case of user interruption (Ctrl-C). In order to perform some testing please follow the instructions in the description of previous @hazeycode's PR #27845. ACKs for top commit: Sjors: tACK 11b7269d83a56f919f9dddb7f7c72a96d428627f ryanofsky: Code review ACK 11b7269d83a56f919f9dddb7f7c72a96d428627f Tree-SHA512: 2b699894c6f732ad5104f5a2bcf5dc86ed31edcc9d664690cab55b94a8ab00e2ca5bde901ee1d63acddca7ea80ad1734d8cfe78f9c02f8470f264fe93a2af759
2023-12-04fuzz: txorphan check wtxids using GenTxid::Wtxid not GenTxid::TxidGreg Sanders
2023-12-04Merge bitcoin/bitcoin#28946: init: don't delete PID file if it was not generatedAndrew Chow
8f6ab318635d823a7e6ad9020ac17b8d2dd0e91b init: don't delete PID file if it was not generated (willcl-ark) Pull request description: In a similar vein to #28784, if a second `bitcoind` is started using the same datadir it will fail to start up, but during shutdown remove the PID file from the first `bitcoind` instance. ACKs for top commit: achow101: ACK 8f6ab318635d823a7e6ad9020ac17b8d2dd0e91b andrewtoth: ACK 8f6ab318635d823a7e6ad9020ac17b8d2dd0e91b romanz: ACK https://github.com/bitcoin/bitcoin/commit/8f6ab318635d823a7e6ad9020ac17b8d2dd0e91b Tree-SHA512: c9af703cbfa179d33ef9580a51e86c1b0acbd28daa18c8d2e5e5ff796ab4d3e2009a962a47e6046a0e5ece936f8a06ee8af5fdf8ff4ae1e52cbcdbec4b942271
2023-12-04depends: Build `native_capnp` package with CMakeHennadii Stepanov
2023-12-04depends: Build `capnp` package with CMakeHennadii Stepanov
This change fixes the `capnp` package cross-compiling for the `x86_64-w64-mingw32` and `arm64-apple-darwin` platforms.
2023-12-04init: don't delete PID file if it was not generatedwillcl-ark
Previously, starting a second bitcoind using the same datadir would correctly fail to init and shutdown. However during shutdown the PID file belonging to the first instance would be erroneously removed by the second process shutting down. Fix this to only delete the PID file if we created it.
2023-12-04ci: Use Ubuntu 24.04 Noble for asanMarcoFalke
2023-12-04ci: Use Ubuntu 24.04 Noble for tsan,tidy,fuzzMarcoFalke
2023-12-03test: Fix test by checking the actual exception instanceHennadii Stepanov
The BOOST_REQUIRE_THROW passes even if the command raises an exception in the underlying subprocess implementation, which might have a type derived from std::runtime_error.
2023-12-02net: Add continuous ASMap health check loggingFabian Jahr
2023-12-01Merge bitcoin/bitcoin#28851: build: Patch Qt to handle minimum macOS version ↵fanquake
properly 05aca093819be276ac7d648472c6ed5c7d235cc5 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov) Pull request description: This PR is: - required to [switch](https://github.com/bitcoin/bitcoin/pull/28622) to macOS 14 SDK (Xcode 15). - an alternative to https://github.com/bitcoin/bitcoin/pull/28732 and https://github.com/bitcoin/bitcoin/pull/28775. Qt relies on the `__MAC_OS_X_VERSION_MIN_REQUIRED` macro, which is set in the `AvailabilityInternal.h` SDK header to the value provided by the Clang driver from the `-mmacos-version-min` / `-mmacosx-version-min` option. Xcode 12 SDK expects the OS-specific `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__` macro: ```c++ #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */ #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ #endif #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/ ``` In the other hand, Xcode 15 SDK expects a general `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` macro: ```c++ #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED #if defined(__has_builtin) && __has_builtin(__is_target_os) #if __is_target_os(macos) #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0 #endif #elif __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0 #endif /* __has_builtin(__is_target_os) && __is_target_os(macos) */ #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */ ``` The latter macro is not provided by LLVM Clang until https://github.com/llvm/llvm-project/commit/c8e2dd8c6f490b68e41fe663b44535a8a21dfeab, which is available in Clang 17. The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header. ACKs for top commit: maflcko: lgtm ACK 05aca093819be276ac7d648472c6ed5c7d235cc5 Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
2023-12-01Merge bitcoin/bitcoin#28973: ci: remove `libz-dev` from macOS build depsfanquake
97d53e90badc01224139a4a4356b934f338568d4 ci: remove libz-dev from macOS build deps (fanquake) Pull request description: Remove no-longer used libz-dev (from DMG compression). Followup to #28432. Missed this in #28932. ACKs for top commit: TheCharlatan: ACK 97d53e90badc01224139a4a4356b934f338568d4 Tree-SHA512: ea4e46d83a11cfb0d77e7c5b370359864a026ca58e02de1a3d30458e4463dabd338db9546da63b782a7fa0ce199446c418fbfdfc400f3803b0ea9dd626aed42f
2023-12-01Merge bitcoin/bitcoin#28368: Fee Estimator updates from Validation ↵Andrew Chow
Interface/CScheduler thread 91504cbe0de2b74ef1aa2709761aaf0597ec66a2 rpc: `SyncWithValidationInterfaceQueue` on fee estimation RPC's (ismaelsadeeq) 714523918ba2b853fc69bee6b04a33ba0c828bf5 tx fees, policy: CBlockPolicyEstimator update from `CValidationInterface` notifications (ismaelsadeeq) dff5ad3b9944cbb56126ba37a8da180d1327ba39 CValidationInterface: modify the parameter of `TransactionAddedToMempool` (ismaelsadeeq) 91532bd38223d7d04166e05de11d0d0b55e60f13 tx fees, policy: update `CBlockPolicyEstimator::processBlock` parameter (ismaelsadeeq) bfcd401368fc0dc43827a8969a37b7e038d5ca79 CValidationInterface, mempool: add new callback to `CValidationInterface` (ismaelsadeeq) 0889e07987294d4ef2814abfca16d8e2a0c5f541 tx fees, policy: cast with static_cast instead of C-Style cast (ismaelsadeeq) a0e3eb7549d2ba4dd3af12b9ce65e29158f59078 tx fees, policy: bugfix: move `removeTx` into reason != `BLOCK` condition (ismaelsadeeq) Pull request description: This is an attempt to #11775 This Pr will enable fee estimator to listen to ValidationInterface notifications to process new transactions added and removed from the mempool. This PR includes the following changes: - Added a new callback to the Validation Interface `MempoolTransactionsRemovedForConnectedBlock`, which notifies listeners about the transactions that have been removed due to a new block being connected, along with the height at which the transactions were removed. - Modified the `TransactionAddedToMempool` callback parameter to include additional information about the transaction needed for fee estimation. - Updated `CBlockPolicyEstimator` to process transactions using` CTransactionRef` instead of `CTxMempoolEntry.` - Implemented the `CValidationInterface` interface in `CBlockPolicyEstimater` and overridden the `TransactionAddedToMempool`, `TransactionRemovedFromMempool`, and `MempoolTransactionsRemovedForConnectedBlock` methods to receive updates from their notifications. Prior to this PR, the fee estimator updates from the mempool, i.e whenever a new block is connected all transactions in the block that are in our mempool are going to be removed using the `removeForBlock` function in `txmempool.cpp`. This removal triggered updates to the fee estimator. As a result, the fee estimator would block mempool's `cs` until it finished updating every time a new block was connected. Instead of being blocked only on mempool tx removal, we were blocking on both tx removal and fee estimator updating. If we want to further improve fee estimation, or add heavy-calulation steps to it, it is currently not viable as we would be slowing down block relay in the process This PR is smaller in terms of the changes made compared to #11775, as it focuses solely on enabling fee estimator updates from the validationInterface/cscheduler thread notifications. I have not split the validation interface because, as I understand it, the rationale behind the split in #11775 was to have `MempoolInterface` signals come from the mempool and `CValidationInterface` events come from validation. I believe this separation can be achieved in a separate refactoring PR when the need arises. Also left out some commits from #11775 - Some refactoring which are no longer needed. - Handle reorgs much better in fee estimator. - Track witness hash malleation in fee estimator I believe they are a separate change that can come in a follow-up after this. ACKs for top commit: achow101: ACK 91504cbe0de2b74ef1aa2709761aaf0597ec66a2 TheCharlatan: Re-ACK 91504cbe0de2b74ef1aa2709761aaf0597ec66a2 willcl-ark: ACK 91504cbe0de2b74ef1aa2709761aaf0597ec66a2 Tree-SHA512: 846dfb9da57a8a42458827b8975722d153907fe6302ad65748d74f311e1925557ad951c3d95fe71fb90ddcc8a3710c45abb343ab86b88780871cb9c38c72c7b1
2023-12-01Merge bitcoin/bitcoin#28784: rpc: keep `.cookie` file if it was not generatedAndrew Chow
7cb9367157eb42ee06bc6fa024522cc14a80138d rpc: keep .cookie if it was not generated (Roman Zeyde) Pull request description: Otherwise, starting bitcoind twice may cause the `.cookie` file generated by the first instance to be deleted by the second instance shutdown (after failing to obtain a lock). ACKs for top commit: willcl-ark: re-ACK 7cb9367157eb42ee06bc6fa024522cc14a80138d achow101: ACK 7cb9367157eb42ee06bc6fa024522cc14a80138d kristapsk: re-ACK 7cb9367157eb42ee06bc6fa024522cc14a80138d stickies-v: ACK 7cb9367157eb42ee06bc6fa024522cc14a80138d Tree-SHA512: 0960dbc457975b0e0535f3d814824a879d7f85c9f1191537415b3fc253429a316a8e4badde56c8bc139778f132392983cec5fbe03891fb15ff61d3bc3f6e681b
2023-12-01Merge bitcoin/bitcoin#28848: bugfix, Change up submitpackage results to ↵Andrew Chow
return results for all transactions f23ba24aa079d68697d475789cd21bd7b5075550 test_submitpackage: only make a chain of 3 txns (Greg Sanders) e67a345162912ef7c1bfa3c89c7e7c629505f0a3 doc: submitpackage vsize results are sigops-adjusted (Greg Sanders) b67db52c399089e5d4c4202ebb905794dfd050d0 RPC submitpackage: change return format to allow partial errors (Greg Sanders) Pull request description: This was prompted by errors being returned that didn't "make any sense" to me, because it would for example return a "fee too low" error, when the "real" error was the child had something invalid, which disallowed CPFP evaluation. Rather than make judgment calls on what error is important(which is currently just return the "first"!), we simply return all errors and let the callers determine what's best. Added a top level `package_msg` for quick eye-balling of general success of the package. This PR also fixes a couple bugs: 1) Currently we don't actually broadcast a transaction, even if it was entered into our mempool, if a subsequent transaction causes `PKG_TX` failure. 2) "other-wtxid" is uncovered by tests, but IIUC was previously required to return "fees" and "vsize" results, but did not. I just make those results optional. ACKs for top commit: Sjors: Light re-utACK f23ba24aa079d68697d475789cd21bd7b5075550 achow101: ACK f23ba24aa079d68697d475789cd21bd7b5075550 glozow: utACK f23ba24aa079d68697d475789cd21bd7b5075550, thanks for taking the suggestions Tree-SHA512: ebfd716a4fed9e8c2dea3d2181ba6a6171b06718d29ac2324c67b7a30b374d199f7e1739f91ab5d036be172d0479de9bc89c32263ee62143c0338b9b622d0cca
2023-12-01build: disable external-signer for Windowsfanquake
It's come to light that Boost ASIO (a Boost Process sub dep) has in some instances, been queitly initialising our network stack on Windows (see PR #28486 and discussion in #28940). This has been shielding a bug in our own code, but the larger issue is that Boost Process/ASIO is running code before main, and doing things like setting up networking. This undermines our own assumptions about how our binary works, happens before we get to run any sanity checks, and also runs before we call our own code to setup networking. It's also not clear why a feature like external signer would have a dependency that would be doing anything network/socket related, given it only exists to spawn a local process.