aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-02-28protocol: make message types constexprVasil Dimov
As a side effect the names of the constants do not have to be repeated in `src/protocol.cpp`.
2024-02-28net: make the list of known message types a compile time constantVasil Dimov
Turn the `std::vector` to `std::array` because it is cheaper and allows us to have the number of the messages as a compile time constant: `ALL_NET_MESSAGE_TYPES.size()` which can be used in future code to build other `std::array`s with that size.
2024-02-27Merge bitcoin/bitcoin#29475: doc: Fix Broken Linksfanquake
6fa61e35320ac2bc623a9c9ca11b270b34e2d05a doc: Fix Broken Links (Justin Dhillon) Pull request description: ### Summery Here is what I have fixed: http://voorloopnul.com/blog/a-python-netstat-in-less-than-100-lines-of-code/ --> https://web.archive.org/web/20190424172231/http://voorloopnul.com/blog/a-python-netstat-in-less-than-100-lines-of-code/ ### Support my work These links were found with [link-inspector](https://github.com/justindhillon/link-inspector). If you find this PR useful, give the repo a ⭐ ACKs for top commit: fjahr: ACK 6fa61e35320ac2bc623a9c9ca11b270b34e2d05a Tree-SHA512: ba83badfc8a89f33813801f749bcd7ad41d4c9c817ece76f3bb1b60f24c28e99cfccc485a0ba059ec2c1134e8ffb5fa37fdc9835e553229ee5b1167c9b2e8d1f
2024-02-27doc: Fix Broken LinksJustin Dhillon
2024-02-27Merge bitcoin/bitcoin#29481: doc: Update OpenBSD build docs for 7.4fanquake
fccfdb25b2c337bbd8b283c27493f10d5e02b5d4 doc: Update OpenBSD build docs to 7.4 (Jesse Barton) Pull request description: Updated OpenBSD Build doc for 7.4 after testing all build options. No issues on my end. Also added a note about referring to depends/README.md for detailed instructions on required dependencies. This was added in reference to a conversation in #29443 ACKs for top commit: fanquake: ACK fccfdb25b2c337bbd8b283c27493f10d5e02b5d4 theStack: lgtm ACK fccfdb25b2c337bbd8b283c27493f10d5e02b5d4 Tree-SHA512: be6d22b605140b37a71e11c5bbed54f60655832d78cd3cb221eddc77c7621a65c0d71baf436f90819be536d9b5dbf1a0b2c82b6b23d62356addc495403f2ba35
2024-02-27Merge bitcoin/bitcoin#29358: test: use v2 everywhere for P2PConnection if ↵fanquake
--v2transport is enabled bf5662c678455fb47c402f8520215726ddfe7a94 test: enable v2 for python p2p depending on global --v2transport flag (Martin Zumsande) 6e9e39da434f8dafacee4cba068daf499bdb4cc2 test: Don't use v2transport when it's too slow. (Martin Zumsande) 87549c8f89fe8c9f404b74c5a40b5ee54c5a966d test: enable p2p_invalid_messages.py with v2transport (Martin Zumsande) 5fc9db504b9ac784019e7e8c215c31abfccb62b6 test: enable p2p_sendtxrcncl.py with v2transport (Martin Zumsande) Pull request description: #24748 added v2 transport to the python `P2PConnection`, but so far each test that wants to make use of it needs to enable it on an individual basis. This PR changes it so that if the test suite is run with `--v2transport` option, v2 is used in each test by default, not only for connections between two bitcoind instances as before, but also wherever `P2PConnection` is used. Individual tests can override this global option. To do that, a few tests need to be adjusted. In addition, I added a commit to always use v1 in a few select subtests that send a large number of large messages (e.g. large reorgs). These tests don't have a fundamental problem with v2 but become very slow due to the unoptimised python ChaCha20 implementation (~30 minutes on my computer, so probably not suitable to be run in the CI). As a result, `python3 test_runner.py --v2transport` should succeed and use `v2` everywhere (unless v1 is chosen explicitly). [Edit]: To make the "test each commit" CI pass, several test fixes were squashed into the last commit, which actually enables v2 p2p for `P2PConnection`. I have an unsquashed version at https://github.com/mzumsande/bitcoin/tree/202401_bip324_alltests_unsquashed, in case that helps with review. ACKs for top commit: fjahr: tACK bf5662c678455fb47c402f8520215726ddfe7a94 vasild: ACK bf5662c678455fb47c402f8520215726ddfe7a94 stratospher: reACK bf5662c6. theStack: Tested ACK bf5662c678455fb47c402f8520215726ddfe7a94 Tree-SHA512: 4f5a08248ba8a755f7d0f48deb2b79bef03292345cacb7deef01be955481093800e4e56ff218ea56734eef5de1fb3ab0f04657447ea27d393bb536539d7b289d
2024-02-27Merge bitcoin/bitcoin#28178: fuzz: Generate with random libFuzzer settingsfanquake
fa3a4102ef0ae06d8930d7a7b567759e2a5b5fde fuzz: Set -rss_limit_mb=8000 for generate as well (MarcoFalke) fa4e396e1da8e5b04a5f906b95017b969ea37bae fuzz: Generate with random libFuzzer settings (MarcoFalke) Pull request description: Sometimes a libFuzzer setting like `-use_value_profile=1` helps [0], sometimes it hurts [1]. [0] https://github.com/bitcoin/bitcoin/pull/20789#issuecomment-752961937 [1] https://github.com/bitcoin/bitcoin/pull/27888#issuecomment-1645976254 By picking a random value, it is ensured that at least some of the runs will have the beneficial configuration set. Also, set `-max_total_time` to prevent slow fuzz targets from getting a larger time share, or possibly peg to a single core for a long time and block the python script from exiting for a long time. This can be improved in the future. For example, the python script can exit after some time (https://github.com/bitcoin/bitcoin/pull/20752#discussion_r549248791). Alternatively, it can measure if coverage progress was made and run for less time if no progress has been made recently anyway, so that more time can be spent on targets that are new or still make progress. ACKs for top commit: murchandamus: utACK fa3a4102ef0ae06d8930d7a7b567759e2a5b5fde dergoegge: utACK fa3a4102ef0ae06d8930d7a7b567759e2a5b5fde brunoerg: light ACK fa3a4102ef0ae06d8930d7a7b567759e2a5b5fde Tree-SHA512: bfd04a76ca09aec612397bae5f3f263a608faa7087697169bd4c506c8195c4d2dd84ddc7fcd3ebbc75771eab618fad840af819114968ca3668fc730092376768
2024-02-26Merge bitcoin/bitcoin#29357: test: Drop `x` modifier in `fsbridge::fopen` ↵fanquake
call for MinGW builds d2fe90571e98e02617682561ea82acb1e2647827 test: Drop `x` modifier in `fsbridge::fopen` call for mingw builds (Hennadii Stepanov) Pull request description: The MinGW-w64 toolchain links executables to the old msvcrt C Runtime Library that does not support the `x` modifier for the [`_wfopen()`](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen?view=msvc-170) function. Fixes https://github.com/bitcoin/bitcoin/issues/29014. ACKs for top commit: maflcko: ACK d2fe90571e98e02617682561ea82acb1e2647827 fanquake: ACK d2fe90571e98e02617682561ea82acb1e2647827 - the plan here should still be to migrate to the newer windows runtime. Tree-SHA512: 0269b66531e58c093ecda3a3e355a20ee8274e165d7e010f8f125881b3c8d4cfe801abdca4605d81efd3b2dbe9a81896968971f6f53da7f6c6093b76b47c5bc9
2024-02-26doc: Update OpenBSD build docs to 7.4Jesse Barton
Tested and used all build options on OpenBSD 7.4 with no issues. Added a note about referring to depends/README.md for detailed instructions on required dependencies. This was added in reference to a conversation in #29443
2024-02-26test: Drop `x` modifier in `fsbridge::fopen` call for mingw buildsHennadii Stepanov
The MinGW-w64 toolchain links executables to the old msvcrt C Runtime Library that does not support the `x` modifier for the _wfopen() function.
2024-02-26Merge bitcoin/bitcoin#29467: test: Fix intermittent issue in interface_rest.pyfanquake
faeed91c0be6e5dda4790522d0dc999afd869d11 test: Fix intermittent issue in interface_rest.py (MarcoFalke) Pull request description: Fixes: ``` test 2024-02-22T16:15:37.465000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 131, in main self.run_test() File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/interface_rest.py", line 340, in run_test assert_equal(json_obj, mempool_info) File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/util.py", line 57, in assert_equal raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args)) AssertionError: not({'loaded': True, 'size': 3, 'bytes': 312, 'usage': 3600, 'total_fee': Decimal('0.00093600'), 'maxmempool': 300000000, 'mempoolminfee': Decimal('0.00001000'), 'minrelaytxfee': Decimal('0.00001000'), 'incrementalrelayfee': Decimal('0.00001000'), 'unbroadcastcount': 1, 'fullrbf': False} == {'loaded': True, 'size': 3, 'bytes': 312, 'usage': 3600, 'total_fee': Decimal('0.00093600'), 'maxmempool': 300000000, 'mempoolminfee': Decimal('0.00001000'), 'minrelaytxfee': Decimal('0.00001000'), 'incrementalrelayfee': Decimal('0.00001000'), 'unbroadcastcount': 0, 'fullrbf': False}) ``` https://cirrus-ci.com/task/4852944378527744?logs=ci#L4436 ACKs for top commit: m3dwards: ACK https://github.com/bitcoin/bitcoin/pull/29467/commits/faeed91c0be6e5dda4790522d0dc999afd869d11 mzumsande: ACK faeed91c0be6e5dda4790522d0dc999afd869d11 Tree-SHA512: 513422229db45d2586c554b9a466e86848bfcf5280b0f000718cbfc44d93dd1af69e19a56f6ac578f5d7aada74ab0c90d4a9e09a324062b6f9ed239e5e34f540
2024-02-26Merge bitcoin/bitcoin#29443: depends: fix BDB compilation on OpenBSDfanquake
0fbf051fec723f86f49ab14ea15c91bb1435c656 depends: fix BDB compilation on OpenBSD (Sebastian Falbesoner) Pull request description: Compiling C++ code with `-D_XOPEN_SOURCE=600` causes problems on OpenBSD. If that define is set, the C++ standard header detection routine in BDB's configure script fails due to a missing type name for `locale_t` (see https://gist.github.com/theStack/b41884e31ebc5cdca3220bcaa674cb70 for the relevant config.log part). This results in `HAVE_CXX_STDHEADERS` not being defined, which then it turn leads to the inclusion of `<iostream.h>` (rather than `<iostream>`), which doesn't exist, as described in #28963. According to a mailing list post discussing a similar problem [1], "OpenBSD provides the POSIX APIs by default", so we don't need this define anyway and can remove it. This fixes the BDB build problem as described in issue #28963. See also https://github.com/google/flatbuffers/pull/6205/commits/f87e75ae71a2301daf2ad59b180977fc30c6abe4 for a similar fix for google's flatbuffer project. Tested on OpenBSD 7.4 with clang 13.0.0. Fixes #28963. [1] https://www.mail-archive.com/tech@openbsd.org/msg63386.html ACKs for top commit: fanquake: ACK 0fbf051fec723f86f49ab14ea15c91bb1435c656 Tree-SHA512: 02139e9081ed855e067bfba8c81b54c657417576e553cc1035a916ada9be049358f5e14d756d5f234c5226bd7e943f61c6ae8990c1b152f9125681b7b777c9b3
2024-02-26Merge bitcoin/bitcoin#29471: doc: Fix CI-detected codespell warningsfanquake
b03b20685a3a85c9664a7c1b4d37a49d27b056de Fix CI-detected codespell warnings (Lőrinc) Pull request description: Split out the typo fixes encountered in https://github.com/bitcoin/bitcoin/pull/29458 to a separate PR. ACKs for top commit: maflcko: ACK b03b20685a3a85c9664a7c1b4d37a49d27b056de Tree-SHA512: 99b6fac01ba2ae6e6de9c50d2b481387899844a4b3a77d544c7b8afe7cfd25251a982329688d4739cde8b98ad35afcfd49be7c7cc3dad9bdff1d5915861a206d
2024-02-26Merge bitcoin/bitcoin#29345: rpc: Do not wait for headers inside loadtxoutsetfanquake
faa30a4c566c5b720c7994c55f276352a119129f rpc: Do not wait for headers inside loadtxoutset (MarcoFalke) Pull request description: While the `loadtxoutset` default 10 minute timeout is convenient when it is sufficient, it may cause hassle where it is not. For example: * When P2P connections are missing, it seems better to abort early than wait for the timeout. * When the 10 minute timeout is not sufficient, the RPC will have to be called again, so a check or loop is needed outside the RPC either way. So might as well remove the loop inside the RPC. ACKs for top commit: fjahr: ACK faa30a4c56 theStack: Code-review ACK faa30a4c566c5b720c7994c55f276352a119129f pablomartin4btc: tACK faa30a4c566c5b720c7994c55f276352a119129f TheCharlatan: ACK faa30a4c566c5b720c7994c55f276352a119129f Tree-SHA512: 9167c7d8b2889bb3fd369de4acd2cc4d24a2fe225018d82bd9568ecd737093f6e19be7cc62815b574137b61076a6f773c29bff75398991b5cd702423aab2322b
2024-02-26Merge bitcoin/bitcoin#29469: doc: document preference for list-initializationfanquake
eb5d78c649c9ad55b3809473b0d5ec4b88ed923d doc: document preference for list-initialization (Andrew Toth) Pull request description: Variable initialization is very complex in C++. There seems to be some consensus that when in doubt, use list-initialization. https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list https://www.learncpp.com/cpp-tutorial/variable-assignment-and-initialization/ ACKs for top commit: maflcko: ACK eb5d78c649c9ad55b3809473b0d5ec4b88ed923d Tree-SHA512: 80d52b062d9e3a0115242779b11385ab583b4c71b27725f63b0a8f82174c04718a57f55a7c1a6df76b405102b175c66abb479589caf363e5d12784e78ad04a93
2024-02-26Merge bitcoin/bitcoin#29470: test: Add option to skip python unit testsfanquake
5f240ab2e89fb20286fbaf9a1f00346bb1cad5a1 test: Add option to skip unit tests for the test runner (Martin Zumsande) Pull request description: In the python `test_runner`, it's possible to disable specific functional tests (or just enable a few specific ones), but the unit tests for the python test framework cannot be skipped. Add this option (`--skipunit` or `-u`), it would save some time for devs not interested in running those every time. ACKs for top commit: fjahr: re-ACK 5f240ab2e89fb20286fbaf9a1f00346bb1cad5a1 tdb3: Code review and tested ACK 5f240ab2e89fb20286fbaf9a1f00346bb1cad5a1 stratospher: tested ACK 5f240ab. Tree-SHA512: f7c9cfefc18a6510e24ca4601309b40fdf4180a4c5fe592be9cf7607be6541784b283c46c8d6e60740ff3eba83025dd5d0db36e55bf8bad1404b38120859e113
2024-02-26Merge bitcoin/bitcoin#29408: lint: Check for missing bitcoin-config.h includesfanquake
fa58ae74ea67485495dbc2d003adfbca68d6869b refactor: Add missing include for USE_BDB, USE_SQLITE to bench/wallet_ismine.cpp (MarcoFalke) fa31908ea848488ff842f1b9fce6235bb8855ec7 lint: Check for missing or redundant bitcoin-config.h includes (MarcoFalke) fa63b0e351dee4782ee19ad46603957ef8d020eb lint: Make lint error easier to spot in output (MarcoFalke) fa770fd368e32950dd727e111a5d66e1dbb93716 doc: Add missing RUST_BACKTRACE=1 (MarcoFalke) fa100512677587b4e84a8be2235cf6d49b6a0134 lint: Add get_subtrees() helper (MarcoFalke) Pull request description: Missing `bitcoin-config.h` includes are problematic, because the build could silently pass, but produce an unintended result. For example, a slower fallback algorithm could be picked, even though `bitcoin-config.h` indicates that a faster feature is available and should be used. As the build succeeds silently, this problem is not possible to detect with iwyu. Thus, fix this by using a linter based on grepping the source code. ACKs for top commit: theuni: Weak ACK fa58ae74ea67485495dbc2d003adfbca68d6869b. TheCharlatan: ACK fa58ae74ea67485495dbc2d003adfbca68d6869b hebasto: ACK fa58ae74ea67485495dbc2d003adfbca68d6869b, tested on Ubuntu 23.10 -- it catches bugs properly. I didn't review rust code changes. Tree-SHA512: cf4346f81ea5b8c215da6004cb2403d1aaf569589613c305d8ba00329b82b3841da94fe1a69815ce15f2edecbef9b031758ec9b6433564976190e3cf91ec8181
2024-02-26Merge bitcoin/bitcoin#29461: ci: avoid running git diff after patchingfanquake
84388c942cb035fed546eda360ae6b40c6cfac09 ci: avoid running git diff after patching (Ryan Ofsky) Pull request description: Drop `git diff` command so it is easier to run CI locally if git checkout is a worktree. Currently it fails because the directory is not recognized as a git repository. The `git diff` command was added recently in #28359 commit fa07ac48d804beac38a98d23be2167f78cadefae and can be avoided just by teeing the patch to stdout ACKs for top commit: maflcko: lgtm ACK 84388c942cb035fed546eda360ae6b40c6cfac09 TheCharlatan: ACK 84388c942cb035fed546eda360ae6b40c6cfac09 Tree-SHA512: 089c8ff62f9c56a1df06686e72420a9a54a079d2ef9eaf7c9cfcd97cb5cce50c8c169890e599ef875aaf1ee426f590851b1f19d6c9e386671460ee6507d8d872
2024-02-23test: Add option to skip unit tests for the test runnerMartin Zumsande
2024-02-23Fix CI-detected codespell warningsLőrinc
2024-02-23doc: document preference for list-initializationAndrew Toth
2024-02-22test: Fix intermittent issue in interface_rest.pyMarcoFalke
2024-02-22Merge bitcoin/bitcoin#29462: [fuzz] Avoid partial negative resultAva Chow
9dae3b970a7a82e8d9f3f755048d427da78c49da [fuzz] Avoid partial negative result (Murch) Pull request description: May address the problem reported by maflcko in https://github.com/bitcoin/bitcoin/pull/27877#pullrequestreview-1890304914. For some values, `MAX_MONEY - max_spendable - max_output_groups` could result in a partial negative value. By putting the addition of `group_pos.size()` first, all partial results in this line will be strictly positive. I opened this as a draft, since I was unable to reproduce the issue, so I’m waiting for confirmation whether this in fact mitigates the problem. ACKs for top commit: maflcko: ACK 9dae3b970a7a82e8d9f3f755048d427da78c49da sipa: utACK 9dae3b970a7a82e8d9f3f755048d427da78c49da achow101: ACK 9dae3b970a7a82e8d9f3f755048d427da78c49da brunoerg: crACK 9dae3b970a7a82e8d9f3f755048d427da78c49da Tree-SHA512: 744b4706268d8dfd77538b99492ecf3cf77d229095f9bcd416a412131336830e2f134f2b2846c79abd3d193426f97c1f71eeaf68b16ab00e76318d57ee3673c7
2024-02-21[fuzz] Avoid partial negative resultMurch
2024-02-21Merge bitcoin/bitcoin#29400: test: Fix SegwitV0SignatureMsg nLockTime signednessAva Chow
fab15723b0518acbb1015e64df47dcac0187e92f test: Fix SegwitV0SignatureMsg nLockTime signedness (MarcoFalke) Pull request description: It is unsigned in Bitcoin Core, so the tests should match it: https://github.com/bitcoin/bitcoin/blob/5b8990a1f3c49b0b02b7383c69e95320acbda13e/src/script/interpreter.cpp#L1611 The bug was introduced when the code was written in 330b0f31ee5719d94f9e52dfc83c5d82168241f9. (Lowercase `i` means signed, see https://docs.python.org/3/library/struct.html#format-characters) ACKs for top commit: epiccurious: Tested ACK fab15723b0518acbb1015e64df47dcac0187e92f. Eunovo: Tested ACK https://github.com/bitcoin/bitcoin/pull/29400/commits/fab15723b0518acbb1015e64df47dcac0187e92f achow101: ACK fab15723b0518acbb1015e64df47dcac0187e92f Tree-SHA512: 68cb8582f6af22e6abb2fc9d6770277501baa0f9873e2e8d47699e87096fc5d4b9de45fa07199757b6e945c99d4c4ea95f01478322f2c093ef95cf5e0c78522b
2024-02-21ci: avoid running git diff after patchingRyan Ofsky
Drop `git diff` command so it is easier to run CI locally if git checkout is a worktree. Currently it fails because the directory is not recognized as a git repository. The `git diff` command was added recently in #28359 commit fa07ac48d804beac38a98d23be2167f78cadefae and can be avoided just by teeing the patch to stdout
2024-02-21Merge bitcoin/bitcoin#29460: test: assert rpc error for addnode v2transport ↵fanquake
not enabled 345169a7523f00209985da88e0171e8687589c25 test: assert rpc error for addnode v2transport not enabled (kevkevin) Pull request description: Added coverage for the `addnode` rpc when v2transport is not enabled, but is set as true when calling `addnode` rpc. I ran the following to check if this rpc error message was covered in the functional tests. `grep -nr "v2transport requested but not enabled" ./test/functional --binary-files=without-match` Adds test coverage to this line. https://github.com/bitcoin/bitcoin/blob/master/src/rpc/net.cpp#L339 ACKs for top commit: maflcko: lgtm ACK 345169a7523f00209985da88e0171e8687589c25 brunoerg: utACK 345169a7523f00209985da88e0171e8687589c25 BrandonOdiwuor: Code Review ACK 345169a7523f00209985da88e0171e8687589c25 theStack: Code-review ACK 345169a7523f00209985da88e0171e8687589c25 Tree-SHA512: fb82409485efe25a1193b1dafca8ae694b397a301bb8bcb33c7572d21ff244ee45fbbd4364141e9421733873b343554a34614a59b1450ce0cac5c420203c3d35
2024-02-21Merge bitcoin/bitcoin#29456: docs: ci multi-arch requires qemufanquake
540282905dc6137a307273188d6d9291809f0ee9 docs: ci multi-arch requires qemu (Max Edwards) Pull request description: On a fresh Debian system qemu isn't installed and therefore the multi-architecture CI system doesn't run. This documentation notes that qemu is required and how to install it. ACKs for top commit: maflcko: lgtm ACK 540282905dc6137a307273188d6d9291809f0ee9 willcl-ark: utACK 540282905dc6137a307273188d6d9291809f0ee9 Tree-SHA512: 903c12cf7b16f2146b99a952577c5550d60faf65f9e72b9f4d9479b52228118ab46349e5130de5281b39da05d3bc0b4ae8a8165601e62ce145647a98ef197131
2024-02-20test: assert rpc error for addnode v2transport not enabledkevkevin
Added coverage for the addnode rpc when v2transport is not enabled but is set as true when calling addnode rpc
2024-02-20refactor: Add missing include for USE_BDB, USE_SQLITE to bench/wallet_ismine.cppMarcoFalke
It was included indirectly via src/wallet/test/util.h, however it is better to include what you use.
2024-02-20lint: Check for missing or redundant bitcoin-config.h includesMarcoFalke
2024-02-20lint: Make lint error easier to spot in outputMarcoFalke
2024-02-20doc: Add missing RUST_BACKTRACE=1MarcoFalke
This will print a backtrace when an internal code error happened.
2024-02-20lint: Add get_subtrees() helperMarcoFalke
This is needed for a future change.
2024-02-20Merge bitcoin/bitcoin#29404: refactor: bitcoin-config.h includes cleanupfanquake
9d1dbbd4ceb8c04340927f5127195dc306adf3fc scripted-diff: Fix bitcoin_config_h includes (TheCharlatan) Pull request description: As mentioned in https://github.com/bitcoin/bitcoin/pull/26924#issuecomment-1403449932 and https://github.com/bitcoin/bitcoin/pull/29263#issuecomment-1922334399, it is currently not safe to remove `bitcoin-config.h` includes from headers because some unrelated file might be depending on it. See also #26972 for discussion. Solve this by including the file directly everywhere it's required, regardless of whether or not it's already included by another header. There should be no functional change here, but it will allow us to safely remove includes from headers in the future. ~I'm afraid it's a bit tedious to reproduce these commits, but it's reasonably straightforward:~ Edit: See note below ```bash # All commands executed from the src/ subdir. # Collect all tokens from bitcoin-config.h.in # Isolate the tokens and remove blank lines # Replace newlines with | and remove the last trailing one # Collect all files which use these tokens # Filter out subprojects (proper forwarding can be verified from Makefiles) # Filter out .rc files # Save to a text file git grep -E -l `grep undef config/bitcoin-config.h.in | cut -d" " -f2 | grep -v '^$' | tr '\n' '|' | sed 's/|$//'` | grep -v -e "^leveldb/" -e "^secp256k1/" -e "^crc32c/" -e "^minisketch/" -e "^Makefile" -e "\.rc$" > files-with-config-include.txt # Find all files from the above list which don't include bitcoin-config.h git grep -L -E "config/bitcoin-config.h" -- `cat files-with-config-include.txt` # Include them manually with the exception of some files in crypto: # crypto/sha256_arm_shani.cpp crypto/sha256_avx2.cpp crypto/sha256_sse41.cpp crypto/sha256_x86_shani.cpp # These are exceptions which don't use bitcoin-config.h, rather the Makefile.am adds these cppflags manually. # Commit changes. This should match the first commit of this PR. # Use the same search as above to find all files which DON'T use any config tokens git grep -E -L `grep undef config/bitcoin-config.h.in | cut -d" " -f2 | grep -v '^$' | tr '\n' '|' | sed 's/|$//'` | grep -v -e "^leveldb/" -e "^secp256k1/" -e "^crc32c/" -e "^minisketch/" -e "^Makefile" -e "\.rc$" > files-without-config-include.txt # Manually remove the includes and commit changes. This should match the second commit of this PR. ``` Edit: I'll keep this old description for posterity, but the manual approach has been replaced with a scripted diff from TheCharlatan ACKs for top commit: maflcko: ACK 9d1dbbd4ceb8c04340927f5127195dc306adf3f 🚪 TheCharlatan: ACK 9d1dbbd4ceb8c04340927f5127195dc306adf3fc hebasto: ACK 9d1dbbd4ceb8c04340927f5127195dc306adf3fc, I have reviewed the code and it looks OK. fanquake: ACK 9d1dbbd4ceb8c04340927f5127195dc306adf3fc Tree-SHA512: f11ddc4ae6a887f96b954a6b77f310558ddb271088a3fda3edc833669c4251b7f392515224bbb8e5f67eb2c799b4ffed3b07d96454e82ec635c686d0df545872
2024-02-20Merge bitcoin-core/gui#797: test: Recognize dialog object by nameHennadii Stepanov
4c9db9b5874acb5db2fb9bb1eb5d549aa17f9aa8 qt, test: Recognize dialog object by name (Hennadii Stepanov) Pull request description: Fixes https://github.com/bitcoin-core/gui/issues/796. ACKs for top commit: furszy: Code ACK 4c9db9b587 BrandonOdiwuor: ACK 4c9db9b5874acb5db2fb9bb1eb5d549aa17f9aa8 Tree-SHA512: bd54a95d3ef77bce189c2ce279c6b3b4045bdc749e115045bfd7beda73be5a553e145eb331f454cb50374c5a9e98e73794d72d43aa1887dc42bcc585ca17d10c
2024-02-20docs: ci multi-arch requires qemuMax Edwards
2024-02-20Merge bitcoin/bitcoin#29441: ci: Avoid CI failures from temp env file reusefanquake
fa91bf2559d2e839592bf1dc1d423d5fb1c3573e ci: Skip git install if it is already installed (MarcoFalke) c65fde483133a04964cc8757c96005b78d9e8ca8 ci: vary /tmp/env (Sjors Provoost) Pull request description: * Currently, running separate CI tasks at the same time may intermittently fail, because they race to read/write `/tmp/env`. Fix this by adding `$CONTAINER_NAME` to the file name. * Also, add `$USER`, while touching the line, to allow different users to run the same CI task at the same time. * Also, skip the git install if there is no need. Ref: https://github.com/bitcoin/bitcoin/pull/29274 ACKs for top commit: Sjors: ACK fa91bf2559d2e839592bf1dc1d423d5fb1c3573e BrandonOdiwuor: ACK fa91bf2559d2e839592bf1dc1d423d5fb1c3573e hebasto: ACK fa91bf2559d2e839592bf1dc1d423d5fb1c3573e. Tree-SHA512: 9a8479255a2afb6618f9d0796488d9430ba95266b90ce39536a9817c1974ca4049beeaab5355a38b25171f76fc386dbec06b1919aaa079f08a5a0c0a146232c8
2024-02-20Merge bitcoin/bitcoin#26008: wallet: cache IsMine scriptPubKeys to improve ↵fanquake
performance of descriptor wallets e041ed9b755468d205ed48b29f6c4b9e9df8bc9f wallet: Retrieve ID from loaded DescSPKM directly (Ava Chow) 39640dd34e980e69d13664ddbc2a7612a1888ab4 wallet: Use scriptPubKeyCache in GetSolvingProvider (Ava Chow) b410f68791143800968f4c628beda1c9f898b4f6 wallet: Use scriptPubKey cache in GetScriptPubKeyMans (Ava Chow) edf4e73a163739a64eb9a54cd95413583a0e5c1f wallet: Use scriptPubKey cache in IsMine (Ava Chow) 37232332bd7253422ea92a8c9eeb36b12fc84b56 wallet: Cache scriptPubKeys for all DescriptorSPKMs (Ava Chow) 99a0cddbc04e8bfea3748a6cb4c0107392fab94f wallet: Introduce a callback called after TopUp completes (Ava Chow) b27682593266c99507c720855cb34f5f7d363dd2 bench: Add a benchmark for ismine (Ava Chow) Pull request description: Wallets that have a ton of non-ranged descriptors (such as a migrated non-HD wallet) perform fairly poorly due to looping through all of the wallet's `ScriptPubKeyMan`s. This is done in various places, such as `IsMine`, and helper functions for fetching a `ScriptPubKeyMan` and a `SolvingProvider`. This also has a bit of a performance impact on standard descriptor wallets, although less noticeable due to the small number of SPKMs. As these functions are based on doing `IsMine` for each `ScriptPubKeyMan`, we can improve this performance by caching `IsMine` scriptPubKeys for all descriptors and use that to determine which `ScriptPubKeyMan` to actually use for those things. This cache is used exclusively and we no longer iterate the SPKMs. Also added a benchmark for `IsMine`. ACKs for top commit: ryanofsky: Code review ACK e041ed9b755468d205ed48b29f6c4b9e9df8bc9f. Just suggested changes since last review josibake: ACK https://github.com/bitcoin/bitcoin/pull/26008/commits/e041ed9b755468d205ed48b29f6c4b9e9df8bc9f furszy: Code review ACK e041ed9b Tree-SHA512: 8e7081991a025e682e9dea838b4543b0d179832d1c47397fb9fe7a97fa01eb699c15a5d5a785634926844fc83a46e6ac07ef753119f39d84423220ef8a548894
2024-02-19Merge bitcoin/bitcoin#29434: rpc: Fixed signed integer overflow for large ↵Ava Chow
feerates dddd7be9bf038c25f3e53c5bd708fb9cf73d4493 doc: Clarify maxfeerate help (MarcoFalke) fa2a4fdef779b01e847def5985deafedc6dd3da8 rpc: Fixed signed integer overflow for large feerates (MarcoFalke) fade94d11a5b93113975c4b2f62a357a70d03191 rpc: Add ParseFeeRate helper (MarcoFalke) fa0ff6610944fdda716fb0134b78cb85a4c9c26d rpc: Implement RPCHelpMan::ArgValue<> for UniValue (MarcoFalke) Pull request description: Passing large BTC/kvB feerates to RPCs is problematic, because: * They are likely a typo. 1BTC/kvB (or larger) seems absurd. * They may cause signed integer overflow. * Anyone really wanting to pick such a large value can set `0` to disable the check. Fix all issues by rejecting anything more than 1BTC/kvB during parsing. ACKs for top commit: brunoerg: crACK dddd7be9bf038c25f3e53c5bd708fb9cf73d4493 achow101: ACK dddd7be9bf038c25f3e53c5bd708fb9cf73d4493 vasild: ACK dddd7be9bf038c25f3e53c5bd708fb9cf73d4493 tdb3: Code review ACK and basic test ACK for dddd7be9bf038c25f3e53c5bd708fb9cf73d4493. fjahr: utACK dddd7be9bf038c25f3e53c5bd708fb9cf73d4493 Tree-SHA512: 5dcce1f0abe059dc6b2ff56787e11081d73a45b4ddd6dcc2c1ea13709ebc13af5e7265e84fffb97ef32027b56b81955672a67ed7702e8fa30c2e849d67727bac
2024-02-19Merge bitcoin/bitcoin#29452: doc: document that BIP324 on by default for v27.0glozow
0d3e18bcd6639d0752a15078d2ba76fbaaa94417 doc: document that BIP324 on by default for v27.0 (fanquake) Pull request description: Addresses: https://github.com/bitcoin/bitcoin/pull/29347#issuecomment-1952335331. ACKs for top commit: maflcko: lgtm ACK 0d3e18bcd6639d0752a15078d2ba76fbaaa94417 sipa: ACK 0d3e18bcd6639d0752a15078d2ba76fbaaa94417 theStack: ACK 0d3e18bcd6639d0752a15078d2ba76fbaaa94417 Tree-SHA512: a2af6dbba2740e5cf9c51660059d39577f3744e2adf554222bbc2eac454a161c2e68111797a7cbe34943fe2a424f5fadbeeffcd6f7ae42e3333878875ac43424
2024-02-19doc: document that BIP324 on by default for v27.0fanquake
2024-02-19qt, test: Recognize dialog object by nameHennadii Stepanov
2024-02-18depends: fix BDB compilation on OpenBSDSebastian Falbesoner
Compiling C++ code with `-D_XOPEN_SOURCE=600` causes problems on OpenBSD. If that define is set, the C++ standard header detection routine in BDB's configure script fails. This results in `HAVE_CXX_STDHEADERS` not being defined, which then it turn leads to the inclusion of `<iostream.h>` (rather than `<iostream>`), which doesn't exist. According to a mailing list post discussing a similar problem [1], "OpenBSD provides the POSIX APIs by default", so we don't need this define anyway and can remove it. This fixes the BDB build problem as described in issue #28963. Tested on OpenBSD 7.4 with clang 13.0.0. [1] https://www.mail-archive.com/tech@openbsd.org/msg63386.html
2024-02-16wallet: Retrieve ID from loaded DescSPKM directlyAva Chow
Instead of iterating m_spk_managers a DescriptorSPKM has been loaded in order to get it's ID to compare, have LoadDescriptorSPKM return a reference to the loaded DescriptorSPKM so it can be queried directly.
2024-02-16wallet: Use scriptPubKeyCache in GetSolvingProviderAva Chow
2024-02-16wallet: Use scriptPubKey cache in GetScriptPubKeyMansAva Chow
2024-02-16wallet: Use scriptPubKey cache in IsMineAva Chow
2024-02-16wallet: Cache scriptPubKeys for all DescriptorSPKMsAva Chow
Have CWallet maintain a cache of all known scriptPubKeys for its DescriptorSPKMs in order to improve performance of the functions that require searching for scriptPubKeys.
2024-02-16wallet: Introduce a callback called after TopUp completesAva Chow
After TopUp completes, the wallet containing each SPKM will want to know what new scriptPubKeys were generated. In order for all TopUp calls (including ones internal the the SPKM), we use a callback function in the WalletStorage interface.