Age | Commit message (Collapse) | Author |
|
We add an RPC to fetch the mempool transactions spending given outpoints.
Without this RPC, application developers would need to first call
`getrawmempool` which returns a long list of `txid`, then fetch each of
these txs individually to check whether they spend the given outpoint(s).
This RPC can later be enriched to also find confirmed transactions instead
of being restricted to mempool transactions.
|
|
variable in `config.site`
efa3a807a677659b0b74cdeda944e7c8ce0157fb build: No longer need to hack the `PATH` variable in `config.site` (Hennadii Stepanov)
f3af4f7a182f81269c193d5d1fd0effb9161f7c6 build: Let the depends build system define a path to `dsymutil` tool (Hennadii Stepanov)
b0a8ddabe531b5d848ad798ccbccdf8f46671223 build: Pass missed darwin-specific tools via `config.site` (Hennadii Stepanov)
f87594da14dfc61a5c6163f8e91b8395a28f690e build: No need to provide defaults for darwin-specific tools (Hennadii Stepanov)
80cd99322f1369ee694d0dd125989d5a1b123ba9 scripted-diff: Rename INSTALLNAMETOOL -> INSTALL_NAME_TOOL (Hennadii Stepanov)
a4fd440741a507d3e9be0e55e84d566ade69f798 build: Pass missed `strip` tool via `config.site` (Hennadii Stepanov)
Pull request description:
This PR adds lacking definitions of absolute paths to some tools in the depends build system.
This improvement makes possible to keep the `PATH` variable untouched during configuration.
Also see https://github.com/bitcoin/bitcoin/pull/24566#discussion_r851125442.
#### Guix builds on `x86_64`:
```
$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
93fa58bf2a1f5c15c5a547c014036ac79761e5c9622bd5099408ce570b39f02f guix-build-efa3a807a677/output/aarch64-linux-gnu/SHA256SUMS.part
ef5f53348404ba973dceaf088a4d47dfd0f1fa3d3bf75bdd723b043431de005d guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu-debug.tar.gz
6688b2295d564b32ea676c0540c43cdc5211322eddc87e0967b764284e847368 guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu.tar.gz
4abb3428be477aa7360611689fd28950f30dbbac6a95c454095367d8df11ad72 guix-build-efa3a807a677/output/arm-linux-gnueabihf/SHA256SUMS.part
8dd33389170e83812821d5dd68741db96af1376035ba40af0215a7ae95dcf7fc guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf-debug.tar.gz
544e97eb88b2a44c8ceb9660399eb5d49d75e07ff59fc03a701a595bacea0491 guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf.tar.gz
219faf1131bdcffffd5979eafd2beabc4a300081f8b1df184852b7183dfbc0e8 guix-build-efa3a807a677/output/arm64-apple-darwin/SHA256SUMS.part
602a417bfa7971fb26d0fe9921d2348fd0d01a5bcf0af93f8a9d50112076e0eb guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.dmg
0dcb197420844da8da3f528a1d986628f7b63adb1e83353d63e8a84da59abc42 guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.tar.gz
10efdd33418234a8288c27a614f50e9ff45efbd681fa1c0e173142b6d267cdb8 guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin.tar.gz
e5ef02adeb9bcb4675972b0dc233a904006b0940d721049eeb94b14cda34872e guix-build-efa3a807a677/output/dist-archive/bitcoin-efa3a807a677.tar.gz
a75d2a49b7a8ab1c849e1badff5049a417519f0154b65335a8717d01b8b6ed62 guix-build-efa3a807a677/output/powerpc64-linux-gnu/SHA256SUMS.part
aef63d196487dd0bc597fd53633ac889149f1a126c651ea55f3bec11a092c460 guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu-debug.tar.gz
ddc7913eed26270be271a8712bf351d562d57c746810ea3b7b4101aea8cb6d89 guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu.tar.gz
83bbf4b1af07a2cf7d6014de7c885f0998dd38afacdb5242f5f56505ee704f17 guix-build-efa3a807a677/output/powerpc64le-linux-gnu/SHA256SUMS.part
c9d5d95de98ed987b63a78d4f6e082cb36d5ec3ba71d130601e03d3ebfbd208d guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu-debug.tar.gz
88ed6ec82dd4c1c656fe80b4c49f91a4c15c2ab798dbbe16a3d57393f17d6f3a guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu.tar.gz
7b8e7b3b1e68a2ea0e37c058b284da11e9721ef4d1bc2761ed003b2061358d5f guix-build-efa3a807a677/output/riscv64-linux-gnu/SHA256SUMS.part
a5de4bedf2b4bc5ab25db21b942076897cabe8a40ce9b0637488af6b4d90693a guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu-debug.tar.gz
53023994202887778a001ce00daf7cdc135b9e6c3be034f31645ab4ba5f078c6 guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu.tar.gz
c6664a61b81dfa080c466d2252a6db70165acbea6cfad51ada16970e9c08bb6f guix-build-efa3a807a677/output/x86_64-apple-darwin/SHA256SUMS.part
a528569ae4bf5e19401311649086a2d8e3fa5251b44550e623722968dfb111ea guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.dmg
9b0384cce7605b546ed581074955f2b9c33cf0817453842036e6224b423b814b guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.tar.gz
ebdbd2f3a6406233f27ee48be0ab014991fedba3c0831f79f4a4873f7abf3d7a guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin.tar.gz
05a8f71fe67f7193e71ea8bbe6f8df2e651b8ac7da3075ba25aacdd3515f7757 guix-build-efa3a807a677/output/x86_64-linux-gnu/SHA256SUMS.part
30a17a1e3d795ea390cd1e0f3ef74c989b5768ae7415740fcca46befe4cb7206 guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu-debug.tar.gz
66db846f3fd739089afa5c339659dbf5efb50572f2d29f8288bf24be9e8f1dd0 guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu.tar.gz
bd3c44890823badcf6d296fa674de14275684be7593f4ab21c0316873ddd8652 guix-build-efa3a807a677/output/x86_64-w64-mingw32/SHA256SUMS.part
6ce3ee21212ff2a95e085073a48194476ade2d5ff94cc1c8ec58a8ae7db8f1fa guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-debug.zip
5e697c05537cfb2ce2ed95fef25e261e2cfa83a31fd548a98118580c4bbff2e4 guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-setup-unsigned.exe
4cc2bcff98845c792c0ed12a2ea407b25fb85b2d4250d88dca94ed68f42e714d guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-unsigned.tar.gz
9d5d72271dc6b820e63b30c5c3f9015309777793100b4e2b6ab0c8ea0f7b4aed guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64.zip
```
ACKs for top commit:
laanwj:
Tested ACK efa3a807a677659b0b74cdeda944e7c8ce0157fb. I get the same build output as in OP:
vincenzopalazzo:
Re ACK https://github.com/bitcoin/bitcoin/commit/efa3a807a677659b0b74cdeda944e7c8ce0157fb
Tree-SHA512: 6d35c11fc307221d61ad250bbdcdc09dbc49adbe43f7a94acb56190ae9f005d23fc22941ea59e3eb62811f8974e39d3617e0c47071232d4b1b0bc2e2e2782e88
|
|
and src/rpc/net.cpp
e71c51b27d420fbd6cc0a36f62e63e190e13473a refactor: rename command -> message type in comments in the src/net* files (Shashwat)
2b09593bddb0a93aebf84e5f43cdb4d5282c7984 scripted-diff: Rename message command to message type (Shashwat)
Pull request description:
This PR is a follow-up to #24078.
> a message is not a command, but simply a message of some type
The first commit covers the message_command variable name and comments not addressed in the original PR in `src/net*` files.
The second commit goes beyond the original `src/net*` limit of #24078 and does similar changes in the `src/rpc/net.cpp` file.
ACKs for top commit:
MarcoFalke:
review ACK e71c51b27d420fbd6cc0a36f62e63e190e13473a π₯
Tree-SHA512: 24015d132c00f15239e5d3dc7aedae904ae3103a90920bb09e984ff57723402763f697d886322f78e42a0cb46808cb6bc9d4905561dc6ddee9961168f8324b05
|
|
b42643c2537ffbe99d6d94fb1fb3b7f9d5234f93 doc: update init.cpp -conf help text (josibake)
970b9987ad5bcb72e581c40a7cdd408d94a48c81 doc: update devtools, release-process readmes (josibake)
50635d27b45d125b6264ac2abfbd6a1129c7228f build: include bitcoin.conf in build outputs (josibake)
6aac946f49aea243de1dc50631bb72f0186bbf58 doc: update bitcoin-conf.md (Josiah Baker)
1c7e820ded0846ef6ab4be9616b0de452336ef64 script: add script to generate example bitcoin.conf (josibake)
b483084d866c16d97a34251ae652bac94f85f61d doc: replace bitcoin.conf with placeholder file (josibake)
Pull request description:
create a script for parsing the output from `bitcoind --help` to create an example conf file for new users
## problem
per #10746 , `bitcoin.conf` not being put into the data directory during installation causes some confusion for users when running bitcoin. in the discussion on the issue, one proposed solution was to have an example config file and instruct users to `cp` it into their data directory after startup. in addition to #10746 , there have been other requests for a "skeleton config file" (https://github.com/bitcoin/bitcoin/issues/19641) to help users get started with configuring bitcoind.
the main issue with an example config file is that it creates a second source of truth regarding what options are available for configuring bitcoind. this means any changes to the options (including the addition or removal of options) would have to be updated for the command line and also updated in the example file.
this PR addresses this issue by providing a script to generate an example file directly from the `bitcoind --help` on-demand by running `contrib/devtools/gen-bitcoin-conf.sh`. this solution was originally proposed on #10746 and would also solve #19641 . this guarantees any changes made to the command-line options or the command-line options help would also be reflected in the example file after compiling and running the script.
the main purpose of this script is to generate a config file to be included with releases, same as `gen-manpages.sh`. this ensures every release also includes an up-to-date, full example config file for users to edit. the script is also available for users who compile from source for generating an example config for their compiled binary.
## special considerations
this removes the `bitcoin.conf` example file from the repo as it is now generated by this script. the original example file did contain extra text related to how to use certain options but going forward all option help docs should be moved into `init.cpp`
this also edits `init.cpp` to have the option help indicate that `-conf` is not usable from the config file. this is similar to how `-includeconf` 's help indicates it cannot be used from the command line
ACKs for top commit:
laanwj:
Tested and code review ACK b42643c2537ffbe99d6d94fb1fb3b7f9d5234f93
Tree-SHA512: 4546e0cef92aa1398da553294ce4712d02e616dd72dcbe0b921af474e54f24750464ec813661f1283802472d1e8774e634dd1cc26fbf1f13286d3e0406c02c09
|
|
e3a06a3c6cbb288ac89a2725cf71ae8adaebf35c test: Add `strerror` to locale-dependence linter (laanwj)
f00fb1265a8bc26e1612c771173325dbe49b3612 util: Increase buffer size to 1024 in SysErrorString (laanwj)
718da302c7b11b375042c3000d421fd93348c199 util: Refactor SysErrorString logic (laanwj)
e7f2f77756d33c6be9c8998a575b263ff2d39270 util: Use strerror_s for SysErrorString on Windows (laanwj)
46971c6dbfbc39ebbc74ab1ed8c00edc12859373 util: Replace non-threadsafe strerror (laanwj)
Pull request description:
Some uses of non-threadsafe `strerror` have snuck into the code since they were removed in #4152. Add a wrapper `SysErrorString` for thread-safe strerror alternatives (with code from `NetworkErrorString`) and replace all uses of `strerror` with this.
Edit: I've also added a commit that refactors the code so that buf[] is never read at all if the function fails, making some fragile-looking code unnecessary.
Edit2: from the linux manpage:
```
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
βββββββββββββββββββββ¬ββββββββββββββββ¬ββββββββββββββββββββββββββ
βInterface β Attribute β Value β
βββββββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββββββββ€
βstrerror() β Thread safety β MT-Unsafe race:strerror β
βββββββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββββββββ€
β¦
βββββββββββββββββββββΌββββββββββββββββΌββββββββββββββββββββββββββ€
βstrerror_r(), β Thread safety β MT-Safe β
βstrerror_l() β β β
βββββββββββββββββββββ΄ββββββββββββββββ΄ββββββββββββββββββββββββββ
```
As the function can be called from any thread at any time, using a non-thread-safe function is unacceptable.
ACKs for top commit:
jonatack:
ACK e3a06a3c6cbb288ac89a2725cf71ae8adaebf35c
Tree-SHA512: 20e71ebb9e979d4e1d8cafbb2e32e20c2a63f09115fe72cdde67c8f80ae98c531d286f935fd8a6e92a18b72607d7bd3e846b2d871d9691a6036b0676de8aaf25
|
|
update help to reflect this option cannot be used from the config file
|
|
include running `gen-bitcoin-conf.sh` as part of the release process.
|
|
copy over bitcoin.conf during the build process.
this means `contrib/devtools/gen-bitcoin-conf.sh` will need
to be run and the generated file committed during the release process.
this is the same process used for generating man pages for each release.
|
|
5e61532e72c1021fda9c7b213bd9cf397cb3a802 util: optimizes HexStr (Martin Leitner-Ankerl)
4e2b99f72a90b956f3050095abed4949aff9b516 bench: Adds a benchmark for HexStr (Martin Leitner-Ankerl)
67c8411c37b483caa2fe3f7f4f40b68ed2a9bcf7 test: Adds a test for HexStr that checks all 256 bytes (Martin Leitner-Ankerl)
Pull request description:
In my benchmark, this rewrite improves runtime 27% (g++) to 46% (clang++) for the benchmark `HexStrBench`:
g++ 11.2.0
| ns/byte | byte/s | err% | ins/byte | cyc/byte | IPC | bra/byte | miss% | total | benchmark
|--------------------:|--------------------:|--------:|----------------:|----------------:|-------:|---------------:|--------:|----------:|:----------
| 0.94 | 1,061,381,310.36 | 0.7% | 12.00 | 3.01 | 3.990 | 1.00 | 0.0% | 0.01 | `HexStrBench` master
| 0.68 | 1,465,366,544.25 | 1.7% | 6.00 | 2.16 | 2.778 | 1.00 | 0.0% | 0.01 | `HexStrBench` branch
clang++ 13.0.1
| ns/byte | byte/s | err% | ins/byte | cyc/byte | IPC | bra/byte | miss% | total | benchmark
|--------------------:|--------------------:|--------:|----------------:|----------------:|-------:|---------------:|--------:|----------:|:----------
| 0.80 | 1,244,713,415.92 | 0.9% | 10.00 | 2.56 | 3.913 | 0.50 | 0.0% | 0.01 | `HexStrBench` master
| 0.43 | 2,324,188,940.72 | 0.2% | 4.00 | 1.37 | 2.914 | 0.25 | 0.0% | 0.01 | `HexStrBench` branch
Note that the idea for this change comes from denis2342 in #23364. This is a rewrite so no unaligned accesses occur.
Also, the lookup table is now calculated at compile time, which hopefully makes the code a bit easier to review.
ACKs for top commit:
laanwj:
Code review ACK 5e61532e72c1021fda9c7b213bd9cf397cb3a802
aureleoules:
tACK 5e61532e72c1021fda9c7b213bd9cf397cb3a802.
theStack:
ACK 5e61532e72c1021fda9c7b213bd9cf397cb3a802 π€
Tree-SHA512: 40b53d5908332473ef24918d3a80ad1292b60566c02585fa548eb4c3189754971be5a70325f4968fce6d714df898b52d9357aba14d4753a8c70e6ffd273a2319
|
|
e5d183151709ab59d2fa6fe9e0243000e8d6abbe [netgroup] Use nStartByte as offset for the last byte of the group (dergoegge)
Pull request description:
This addresses my review [comments](https://github.com/bitcoin/bitcoin/pull/22910#discussion_r856095896) I left on #22910.
This has no effect on the current logic as `nStartByte` is only used for internal addresses which only ever add 10 whole bytes to the returned group. However to avoid future bugs, I think we should use `nStartByte` as offset for the last byte as well, in case we ever add a new address type that makes makes use of `nStartByte` and adds fractional bytes to the group.
ACKs for top commit:
jnewbery:
Code review ACK e5d183151709ab59d2fa6fe9e0243000e8d6abbe
theStack:
Concept and code-review ACK e5d183151709ab59d2fa6fe9e0243000e8d6abbe
Tree-SHA512: 4c08c7d6cb38b553e998798b3e3b790177aaa2141a48e277dfd538e01a7fccadf644329e93c5b0fb5e7e4037494c8dfe061b94eb52c6b31dc21bdf99eb0e311a
|
|
opening a file
027aab663aaca32818051d456c3900326377281c test, contrib, refactor: use `with` when opening a file (brunoerg)
Pull request description:
When manipulating a file in Python without using `with()`, you have to close the file manually, so this PR does it in `get_block_hashes` (`contrib/linearize/linearize-data.py`).
Edit: this PR does it for all occurances that previously weren't using `with`.
ACKs for top commit:
laanwj:
Code review ACK 027aab663aaca32818051d456c3900326377281c
Tree-SHA512: 879400968e0013e8678ec16f1fe5d0963a73c1e0d442ca34802d885214f0783d2e9a9b500fc6be7c3b93560a367b6a3d685eee24d2f9ce53fddf064ea6feecf8
|
|
SplitString
f849e63bad963b8717d4bc45efdad9b08567a36e fuzz: SplitString with multiple separators (Martin Leitner-Ankerl)
d1a9850102fe572b8a1e00b80c757dd82bf39f9d http: replace boost::split with SplitString (Martin Leitner-Ankerl)
0d7efcdf75607e19fac77bcd146773a03af14492 core_read: Replace boost::split with SplitString (Martin Leitner-Ankerl)
b7ab9db545492927b774912e53aeb834a590621f Extend Split to work with multiple separators (Martin Leitner-Ankerl)
Pull request description:
As a followup of #22953, this removes the remaining occurrences of `boost::split` and replaces them with our own `SplitString`. To be able to do so, this extends the function `spanparsing::Split` to work with multiple separators. Finally this removes 3 more files from `lint-includes.py`.
ACKs for top commit:
theStack:
Code-review ACK f849e63bad963b8717d4bc45efdad9b08567a36e
Tree-SHA512: f37d4dbe11cab2046e646045b0f018a75f978d521443a2c5001512737a1370e22b09247d5db0e5c9e4153229a4e2d66731903c1bba3713711c4cae8cedcc775d
|
|
Linux hosts
c0f5cc14ef9fae2b2de4222ee061729629ebb6b4 build: Fix `libmultiprocess` cross-compiling to Linux hosts (Hennadii Stepanov)
Pull request description:
To successfully call the [`capnp_generate_cpp()`](https://github.com/chaincodelabs/libmultiprocess/blob/d576d975debdc9090bd2582f83f49c76c0061698/CMakeLists.txt#L45) function, the `libmultiprocess` build system must be provided with paths to the native `capnp` and `capnpc-c++` tools.
This [comment](https://github.com/bitcoin/bitcoin/issues/24387#issuecomment-1054776195) points the same:
> I think `packages/libmultiprocess.mk` probably needs to be passing a `-DCAPNP_EXECUTABLE=.../depends/arm-linux-gnueabihf/native/bin/capnp` argument to cmake. Also the package should have dependencies on both `capnp` and `native_capnp`.
Fixes bitcoin/bitcoin#24387.
ACKs for top commit:
ryanofsky:
Code review ACK c0f5cc14ef9fae2b2de4222ee061729629ebb6b4
Tree-SHA512: 2986d8bf98d2761eceba21b1897145c5185a0922d4c2084e8812d4d07dc94237e5c2809036641c4f7c491a3414727fff328cba91ce138b89e37ec5cba61d8f61
|
|
GetFirstStoredBlock()::start_time
4cb9d214345550cb0299139b2badb73ba1e53532 blockstorage: add LIFETIMEBOUND to GetFirstStoredBlock()::start_time (Jon Atack)
Pull request description:
Suggested in https://github.com/bitcoin/bitcoin/pull/25016#discussion_r862330288, the lifetimebound attribute here indicates that a resource owned by the `start_block` param of `CBlockIndex* BlockManager::GetFirstStoredBlock()` can be retained by the method's return value, which enables detecting the use of out-of-scope stack memory (ASan `stack-use-after-scope`) at compile time.
See https://releases.llvm.org/12.0.0/tools/clang/docs/AttributeReference.html#lifetimebound and #22278 for related discussion, and #25040 for a similar example.
ACKs for top commit:
MarcoFalke:
review ACK 4cb9d214345550cb0299139b2badb73ba1e53532
Tree-SHA512: a3f5ef83ebb6f08555d7c89f2437a682071b4ad77a7aa3326b6d2282c909bf9fcf4dac6bf05ee1d9931f2102cad4a02df5468bde1cf377d7126e84e8541604dc
|
|
rename misc.cpp
fa758f9bc5e3a9a4653d7779a6a17adb8e51e92c scripted-diff: Rename rpc/misc.cpp to rpc/node.cpp (MacroFake)
fa87eb8ce184a2f0d0ae2d19751b4f6b47af2349 rpc: Move output script RPCs to separate file (MacroFake)
Pull request description:
RPCs handling output scripts (addresses, scriptPubKeys, and output script descriptors) should not be placed in a file called `misc.cpp`, so move them out, then rename `misc.cpp`.
ACKs for top commit:
pk-b2:
ACK https://github.com/bitcoin/bitcoin/pull/25058/commits/fa758f9bc5e3a9a4653d7779a6a17adb8e51e92c
vincenzopalazzo:
ACK https://github.com/bitcoin/bitcoin/pull/25058/commits/fa758f9bc5e3a9a4653d7779a6a17adb8e51e92c
Tree-SHA512: 0cf8b5b8456361015513e93d3e604ea07d998dd578415b1d0e2918fb401fc44547fc1bb80b7c33c2086f6268e7b8f59837d2955f57434f646ea7921f0158b32d
|
|
SingleThreadedSchedulerClient
fa4652ce5995ace831b6a4d3125bfcac9563ff6f Pass lifetimebound reference to SingleThreadedSchedulerClient (MacroFake)
Pull request description:
Currently a pointer is passed, which is confusing and requires run-time asserts to avoid nullptr dereference.
All call sites can pass a reference, so do that. Also mark it LIFETIMEBOUND to avoid call sites passing a temporary. Also, unrelated cleanup in touched lines.
ACKs for top commit:
pk-b2:
ACK https://github.com/bitcoin/bitcoin/pull/25040/commits/fa4652ce5995ace831b6a4d3125bfcac9563ff6f
jonatack:
Code review ACK fa4652ce5995ace831b6a4d3125bfcac9563ff6f rebased to master, debug build, unit tests
vincenzopalazzo:
ACK https://github.com/bitcoin/bitcoin/pull/25040/commits/fa4652ce5995ace831b6a4d3125bfcac9563ff6f
Tree-SHA512: cd7ec77347e195d659b8892d34c1e9644d4f88552a4d5fa310dc1756eb27050a99d3098b0b0d27f8474230f82c178fd9e22e7018d8248d5e47a7f4caad395e25
|
|
`blockfilterheaders` (REST)
d1bfe5ebdb3d40dd45f97c751c49ebe2c549c1bc test: add coverage for invalid requests for `blockfilterheaders` (brunoerg)
Pull request description:
This PR adds test coverage for invalid requests (`Invalid hash` and `Unknown filtertype`) for `/blockfilterheaders` in REST functional test.
ACKs for top commit:
jonatack:
ACK d1bfe5ebdb3d40dd45f97c751c49ebe2c549c1bc
vincenzopalazzo:
ACK https://github.com/bitcoin/bitcoin/pull/25045/commits/d1bfe5ebdb3d40dd45f97c751c49ebe2c549c1bc
Tree-SHA512: 9ab7efe7131296577c60642f95921799cf1dbae9c2aaea6752d2ac9f35a1bcc72b9d742a146c314f82fe1848190a80c88836ab78fc28773ed12e97fa327828e7
|
|
c2b295881f852a9096c834334d6b84c988f579f5 tidy: add readability-redundant-declaration (fanquake)
Pull request description:
ACKs for top commit:
vincenzopalazzo:
ACK https://github.com/bitcoin/bitcoin/pull/25047/commits/c2b295881f852a9096c834334d6b84c988f579f5
jonatack:
Review-only ACK c2b295881f852a9096c834334d6b84c988f579f5
Tree-SHA512: 992dd81f9d0c511efcd8d9d1a8c05fc1401b854272f28f7f31ca0922164ddd7d7c01bfcf5ca268472b5d68969137110f5c0844a52938d294750584e1a948a874
|
|
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
|
|
Also removes boost/algorithm/string.hpp from expected includes
|
|
Note that `SplitString` doesn't support token compression, but in this case
it does not matter as empty strings are already skipped anyways.
Also removes split.hpp and classification.hpp from expected includes
|
|
|
|
See PR 22278 for discussion.
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
|
|
|
|
allowed by path append operators
f64aa9c411ad78259756a28756ec1eb8069b5ab4 Disallow more unsafe string->path conversions allowed by path append operators (Ryan Ofsky)
Pull request description:
Add more `fs::path` `operator/` and `operator+` overloads to prevent unsafe string->path conversions on Windows that would cause strings to be decoded according to the current Windows locale & code page instead of the correct string encoding.
Update application code to deal with loss of implicit string->path conversions by calling `fs::u8path` or `fs::PathFromString` explicitly, or by just changing variable types from `std::string` to `fs::path` to avoid conversions altogether, or make them happen earlier.
In all cases, there's no change in behavior either (1) because strings only contained ASCII characters and would be decoded the same regardless of what encoding was used, or (2) because of the 1:1 mapping between paths and strings using the `PathToString` and `PathFromString` functions.
Motivation for this PR was just that I was experimenting with #24469 and noticed that operations like `fs::path / std::string` were allowed, and I thought it would be better not to allow them.
ACKs for top commit:
hebasto:
ACK f64aa9c411ad78259756a28756ec1eb8069b5ab4
Tree-SHA512: 944cce49ed51537ee7a35ea4ea7f5feaf0c8fff2fa67ee81ec5adebfd3dcbaf41b73eb35e49973d5f852620367f13506fd12a7a9b5ae3a7a0007414d5c9df50f
|
|
88044a14d9b2c6c70a3330ee1545a9eb39d14d89 Guard `#include <config/bitcoin-config.h>` (Hennadii Stepanov)
Pull request description:
A fix for builds when the `HAVE_CONFIG_H` macro is not defined.
ACKs for top commit:
Empact:
Code Review ACK https://github.com/bitcoin/bitcoin/pull/25053/commits/88044a14d9b2c6c70a3330ee1545a9eb39d14d89
Tree-SHA512: f2bf1693c7671d7113dccaf66ae34a84719d86cb3271fa18b36611deab93a48d787b3ccfbd735d3b763017d709971cb1151d8d7f30390720009e6e2a6275b5b0
|
|
checks (feature_fee_estimation.py performance fix)
a498acce4514d83d8dafcebaad522a89b6dc70fa test: MiniWallet: skip mempool check if `mempool_valid=False` (Sebastian Falbesoner)
01552e8f677b710944a0c41406253bc3102db332 test: MiniWallet: always rehash after signing (P2PK mode) (Sebastian Falbesoner)
Pull request description:
MiniWallet's core method for creating txs (`create_self_transfer`) right now always executes the `testmempoolaccept` RPC to check for mempool validity or invalidity. In some test cases where we use MiniWallet to create a huge number of transactions this can lead to performance issues, in particular feature_fee_estimation.py where the execution time after MiniWallet usage (PR #24817) doubled, see https://github.com/bitcoin/bitcoin/issues/24828#issuecomment-1100058100, https://github.com/bitcoin/bitcoin/issues/24828#issuecomment-1100301980. This PR mitigates this by skipping the mempool check if the parameter `mempool_valid` is set to `False`.
As a preparatory commit, the test feature_csv_activation.py has to be adapted w.r.t. to rehashing of transactions, as we now hash all transactions immediately in `create_self_transfer` in order to get the txid (before we relied on the result of `testmempoolaccept`).
On my machine, this decreases the execution time quite noticably:
master branch:
```
$ time ./test/functional/feature_fee_estimation.py
real 3m20.771s
user 2m52.360s
sys 0m39.340s
```
PR branch:
```
$ time ./test/functional/feature_fee_estimation.py
real 2m1.386s
user 1m42.510s
sys 0m22.980s
```
Partly fixes #24828 (hopefully).
ACKs for top commit:
danielabrozzoni:
tACK a498acce4514d83d8dafcebaad522a89b6dc70fa
Tree-SHA512: f20c358ba42b2ded86175f46ff3ff9eaefb84175cbd1c2624f44904c8d8888e67ce64d6dcbb26aabbf07906e6f5bdea40353eba9ae668618cadcfc517ef7201b
|
|
-BEGIN VERIFY SCRIPT-
git mv src/rpc/misc.cpp src/rpc/node.cpp
sed -i 's@rpc/misc.cpp@rpc/node.cpp@g' $(git grep -l misc.cpp)
sed -i 's,RegisterMiscRPCCommands,RegisterNodeRPCCommands,g' $(git grep -l RegisterMiscRPCCommands)
-END VERIFY SCRIPT-
|
|
Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
|
|
fa753abd7cffa05548ad5f21f2e8f9f6b06a7b04 rpc: Move fee estimation RPCs to separate file (MacroFake)
Pull request description:
Fee estimation is generally used by wallets when creating txs. It doesn't have anything to do with creating or submitting blocks.
ACKs for top commit:
pk-b2:
ACK https://github.com/bitcoin/bitcoin/pull/25029/commits/fa753abd7cffa05548ad5f21f2e8f9f6b06a7b04
brunoerg:
crACK fa753abd7cffa05548ad5f21f2e8f9f6b06a7b04
Tree-SHA512: 81e0edc936198a0baf0f5bfa8cfedc12db51759c7873bb0082dfc5f0040d7f275b35f639c6f5b86fa1ea03397b0d5e757c2ce1b6b16f1029880a39b9c3aaceda
|
|
|
|
fad0abf539dc2141a3937f040e16703e38654fe3 lint: Fix lint-circular-dependencies.py file list (MacroFake)
Pull request description:
currently in-tree files like `wallet/test/fuzz/coinselection.cpp` are missed. Also out-of-tree files like `test/data/bip341_wallet_vectors.json.h` or `qt/moc_qvaluecombobox.cpp` are included.
Change the script to only use in-tree files.
Also, change `'python3'` to `sys.executable`.
ACKs for top commit:
laanwj:
Code review ACK fad0abf539dc2141a3937f040e16703e38654fe3
Tree-SHA512: baf150fbae6a7120b2692f2eaef6a7773f2681e1610f8776f8d2ae6736c74736502a505df080b2182880f753b90f94e76a1e365fb45185f46f0e4d5521ca8e86
|
|
include instructions on how to run the script
|
|
this ensures bitcoind option help is the source of truth and also
gives an example conf file for users to customize and copy to their
data directory.
closes #10746
|
|
|
|
swap members noexcept
e5485e8e4be7f2ee0671f58c3dcce35c68ba0ee0 test, bench: make prevector and checkqueue swap member functions noexcept (Jon Atack)
abc1ee509025d92db5311c3f5df3b61c09cad24f validation: make CScriptCheck and prevector swap member functions noexcept (Jon Atack)
Pull request description:
along with those seen elsewhere in the codebase (prevector and checkqueue units/fuzz/bench).
A swap must not fail; when a class has a swap member function, it should be declared noexcept.
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c84-a-swap-function-must-not-fail
ACKs for top commit:
pk-b2:
ACK https://github.com/bitcoin/bitcoin/pull/25017/commits/e5485e8e4be7f2ee0671f58c3dcce35c68ba0ee0
w0xlt:
ACK https://github.com/bitcoin/bitcoin/pull/25017/commits/e5485e8e4be7f2ee0671f58c3dcce35c68ba0ee0
Tree-SHA512: c82359d5e13f9262ce45efdae9baf71e41ed26568e0aff620e2bfb0ab37a62b6d56ae9340a28a0332c902cc1fa87da3fb72d6f6d6f53a8b7e695a5011f71f7f1
|
|
fa12706fc6dbaf82eca37f30afa07c37fcd44932 Reject invalid rpcauth formats (MacroFake)
Pull request description:
This was added in commit 438ee59839ad49bf629452279478462c987b7137, but I couldn't determine if it was intentional.
One reason to accept `foo:bar:baz` over `foo:bar$baz` is that `$` may be eaten by the shell. Though, I don't think many users pass `rpcauth` via the shell. Also it should be easy to avoid by passing `'-rpcauth=foo:bar$baz'` or `"-rpcauth=foo:bar\$baz"`.
Can be tested with the added test.
ACKs for top commit:
pk-b2:
ACK fa12706fc6dbaf82eca37f30afa07c37fcd44932
Tree-SHA512: 9998cbb295c79f7b0342bf86e1d3e5b5ab90851c627662ad6495b699a65a9035998173cf1debfd94325387faba184de683407b609fe86acdd8f6749157644441
|
|
|
|
To successfully call the `capnp_generate_cpp()` function, the
`libmultiprocess` build system must be provided with paths to the native
`capnp` and `capnpc-c++` tools.
|
|
|
|
PeerManagerImpl
778343a379026ef233dffea67f5226565f6d5720 scripted-diff: Rename PeerManagerImpl members (dergoegge)
91c339243e11ec42eeeaca8fe015fc1c3e6338e1 [net processing] Move nHighestFastAnnounce into PeerManagerImpl (dergoegge)
10b83e2aa3393ef2c942fde7ac86e8cf3ea224c1 [net processing] Move block cache state into PeerManagerImpl (dergoegge)
a4c55a93ef9277e1043c286120e2417652ee8bbb [net processing] Inline and simplify UpdatePreferredDownload (dergoegge)
490c08f96a34ed436c3d2cf7b9a3ed72694b6147 [net processing] Move nPreferredDownload into PeerManagerImpl (dergoegge)
a292df283a596efe7e1d40c33a6d614d70ed564d [net processing] Move mapNodeState into PeerManagerImpl (dergoegge)
37ecaf3e7a028486a0a1c9b717e8eb4214215805 [net processing] Move CNodeState declaration above PeerManagerImpl (dergoegge)
Pull request description:
This PR moves the remaining net processing globals into `PeerManagerImpl`. This will make testing the peer manager in isolation easier and also acts as a code clean up.
ACKs for top commit:
jnewbery:
Code review ACK 778343a379026ef233dffea67f5226565f6d5720
MarcoFalke:
ACK 778343a379026ef233dffea67f5226565f6d5720 π
Tree-SHA512: 4f22105d1de37b94c3ef349f38784a30cf8d450d394a6a7849e5bd78940a71e3edbffa3d25e8efb35d7f698fd255f199de7bd4c33e23af5621a6e4e67ed43cb5
|
|
|
|
fafa7276126d21d7e2f723673b64382e16a902d9 test: Remove boost::split from getarg_tests.cpp (MacroFake)
Pull request description:
Only single spaces are used, so no need for boost.
Can be tested with:
```diff
diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp
index c877105fe7..a834830490 100644
--- a/src/test/getarg_tests.cpp
+++ b/src/test/getarg_tests.cpp
@@ -21,8 +21,11 @@ BOOST_FIXTURE_TEST_SUITE(getarg_tests, BasicTestingSetup)
void ResetArgs(ArgsManager& local_args, const std::string& strArg)
{
std::vector<std::string> vecArg;
- if (strArg.size())
+ if (strArg.size()) {
boost::split(vecArg, strArg, IsSpace, boost::token_compress_on);
+ auto vecArg2{SplitString(strArg, ' ')};
+ assert(vecArg2 == vecArg);
+ }
// Insert dummy executable name:
vecArg.insert(vecArg.begin(), "testbitcoin");
ACKs for top commit:
fanquake:
utACK fafa7276126d21d7e2f723673b64382e16a902d9 - After this, the last usage of `<boost/algorithm/string.hpp>` is in `httprpc.cpp`.
Tree-SHA512: 038af095cfb5240216305919cdeeb12d8e3ff0424520b99785bff5353a47dfcacdc049b927d7316b13e17a3c19b5f7549c9db7c4b5f2fa78ff1816515ca28d9d
|
|
fa847ed2f698a8a999352aeed63baf60b094e662 ci: Clone iwyu only if missing (MacroFake)
Pull request description:
This doesn't change anything for Cirrus CI, but makes it easier to play locally.
For reference, the same check is done when cloning `DIR_FUZZ_IN`.
ACKs for top commit:
fanquake:
ACK fa847ed2f698a8a999352aeed63baf60b094e662
Tree-SHA512: 3d9689ea85b2380dcf83d26997c89c63f163aebfae9530180cb2420872a9f30d7b3dc59722e2e49684fdb3e30859b1e08e1272f6d083c07f213e9f5a190ca21f
|
|
feature_coinstatsindex and feature_prune
a3cd7dbfd8200c580aae9ea0f5473d58107dd582 test: stop node before calling assert_start_raises_init_error (Martin Zumsande)
Pull request description:
In #24789, I forgot to stop the node before usingΒ `assert_start_raises_init_error` in `feature_coinstatsindex`. This resulted in a bitcoind process that is not being terminated after the test finishes.
`feature_prune` has the same problem and also creates a zombie bitcoind process.
Also adds an assert to `assert_start_raises_init_error` to make sure the node isn't already running to prevent this sort of mistake in the future.
Top commit has no ACKs.
Tree-SHA512: 902f683ebe7b19ca32ab83ca40d9698e9d91509b1d003f21a7221f79b647e05b6ef5c0c888fbb772cbca5e641d5c9437d522b6671f446c3ab321d79f7c6d0284
|
|
|
|
|
|
...in feature_coinstatsindex and feature_pruning.
Also add an assert to assert_start_raises_init_error that the node is
not already running.
|
|
Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
|
|
|