faf5bb87da doc: Move -permitbaremultisig to the relay help category (MacroFake)
Pull request description:
This transaction relay setting doesn't have anything to do with establishing p2p connections.
ACKs for top commit:
glozow:
concept ACK faf5bb87da
luke-jr:
utACK faf5bb87da, but (nit) prefer to keep it on a single line
Tree-SHA512: 436fcff5191c346fe16b3208411886e3239fb5819322673a45cf0c0f9a3070563d312da8bb5d5f6060b36d305e59e5b58928526d5042cb3dac29ce7740d17c1c
0567b5650e build: Bump version to 24.99 (fanquake)
Pull request description:
24.x has been branched off: https://github.com/bitcoin/bitcoin/tree/24.x.
On the master branch, bump to 24.99 (pre-25.0).
ACKs for top commit:
theStack:
ACK 0567b5650e
Tree-SHA512: 5207363c707d9fe2b392cafc823fd31b99f06f87b0ad0a20841c78fd6e3ad6f030d9ebf995b1ab3b3843a1dca7f86e65889120ee0f490cb80d175de666f5ff75
c3e536555a Bugfix: Wallet: Return util::Error rather than non-error nullptr when CreateWallet/LoadWallet/RestoreWallet fail (Luke Dashjr)
335ff98c8a Bugfix: Wallet: Wrap RestoreWallet content in a try block to ensure exceptions become returned errors and incomplete wallet directory is removed (Luke Dashjr)
Pull request description:
Bug 1: `copy_file` can throw exceptions, but `RestoreWallet` is expected to return a nullptr with a populated `errors` parameter. This is fixed by wrapping `copy_file` and `LoadWallet` (for good measure) in a `try` block, and converting any exceptions to the intended return style.
Bug 2: `util::Result` turns what would have been a `false` unique_ptr into a `true` nullptr result, which leads to nullptr dereferences in at least the 3 cases of wallet creation/loading/restoring. This is fixed by keeping the pointer as a plain `std::unique_ptr` until actually returning it (ie, after the nullptr check).
Fixes https://github.com/bitcoin-core/gui/issues/661
ACKs for top commit:
achow101:
ACK c3e536555a
Tree-SHA512: 4291b3dbbb147acea2e63a704324c9371bc16ecb4237f8753729b0b0a6e55c9758ad61bfe8bd432fd7b0bae95d8b63a9831e61ac8b8d5c0197b550a2e0f4a105
e8cc2e4afc Make miniscript string parsing account for exact script size as bound (Pieter Wuille)
4cb8f9a92c Permit delaying duplicate key check in miniscript::Node construction (Pieter Wuille)
Pull request description:
As reported in https://github.com/bitcoin/bitcoin/pull/24860#discussion_r893109311, the current code to construct a `miniscript::Node` could cause a blowup on large fuzzer inputs. This is because:
1. The duplicate key check is redundantly done at parsing time, since we will recursively create miniscript nodes and the constructor will unconditionally look for duplicate across this node's keys and all its sub-nodes'.
2. We don't put an upper bound on the size of the inputs to consider for parsing.
To avoid wasteful computation, and prevent the blowup on some fuzzer inputs, limit the size of reasonable inputs and only perform the check for duplicate keys once when parsing.
Regarding the duplicate key check bypass in the constructor we iterated on different approaches, and eventually settled on passing a dummy argument. Albeit less elegant, all other approaches required getting rid of `std::make_shared` and adding an allocation *per node created*.
This PR contains code from Pieter Wuille (see commits).
Fixes https://github.com/bitcoin/bitcoin/pull/25824.
ACKs for top commit:
darosior:
ACK e8cc2e4afc -- it's my own PR but most of the code here was written by sipa. I've reviewed and tested it.
sipa:
ACK e8cc2e4afc (for the few parts of the code that aren't mine)
Tree-SHA512: c21de39b3eeb484393758629882fcf8694a9bd1b8f15ae22efcec1582efc9c2309c5a0c2d90f361dd8e233d704a07dcd5fb982f4a48a002c4d8789e1d78bb526
a10df7cf35 build: prune BOOST_CPPFLAGS from libbitcoin_zmq (fanquake)
Pull request description:
Rather than including `validation.h`, which ultimately means needing boost via `txmempool.h`, include `primitives/block.h` for `CBlock`, and remove `validation.h`, as we can get `cs_main` from `node/blockstorage.h`.
ACKs for top commit:
theuni:
Nice. ACK a10df7cf35.
hebasto:
ACK a10df7cf35, tested on Linux x86_64 using theuni's [patch](e131d8f1e3) with depends.
Tree-SHA512: 792b6f9e7e7788d10333b4943609efbc798f3b187c324a0f2d5acbb2d44e3c67705dc54d698eb04c23e5af7b8b73a47f8e7974e819eac12f12ae62f28c807476
667401a855 [test] only run feature_rbf.py once (glozow)
Pull request description:
There is no need to run this test twice with --descriptors and --legacy-wallet, as it doesn't use the wallet.
ACKs for top commit:
aureleoules:
ACK 667401a855.
theStack:
ACK 667401a855
brunoerg:
ACK 667401a855
Tree-SHA512: 339213159fac29ebc5678461fae41645aed57877d5525e8ca4755890b869a17ae0bea3f590114769c84b71a7df20c59c9530ab8b327912151c82ec58022f7e71
f839697d9b build: remove BOOST_CPPFLAGS usage from bitcoin-tx (fanquake)
Pull request description:
The only reason `BOOST_CPPFLAGS` was needed here, is because of the `policy/rbf.h` include, which ultimately includes boost multi_index via `txmempool.h`. However this include is unused.
ACKs for top commit:
theuni:
Nice. ACK f839697d9b.
hebasto:
ACK f839697d9b, tested on Linux x86_64 using theuni's [patch](e131d8f1e3) with depends.
Tree-SHA512: ec93f4045d927789d70e2a96a6869c0df63891483bb61361327bfefafaabc2925f63382aa3d9302963df2306bc035edad4cabd5eeb315db6603266e677be7cd3
26cf9ea8e4 scripted-diff: rename pszThread to thread_name (stickies-v)
200d84d568 refactor: use std::string for index names (stickies-v)
97f5b20c12 refactor: use std::string for thread names (stickies-v)
Pull request description:
As a follow-up to https://github.com/bitcoin/bitcoin/pull/25967#discussion_r959637189, this PR changes the return type of [`BaseIndex::GetName()`](fa5c224d44/src/index/base.h (L120)) to `const std::string&` instead of `const char*`. The first commit is not essential for this change, but since the code is touched and index names are commonly used to specify thread names, I've made the same update there.
No behaviour change, just refactoring to further phase out C-style strings.
Note: `util::ThreadRename()` used to take an rvalue ref, but since it then passes this to `SetInternalName()` by value, I don't think there's any benefit to having both an rvalue and lvalue ref function so I just changed it into lvalue ref. Not 100% sure I'm missing something?
ACKs for top commit:
MarcoFalke:
review ACK 26cf9ea8e4 only change is new scripted-diff 😀
hebasto:
ACK 26cf9ea8e4, I have reviewed the code and it looks OK.
w0xlt:
reACK 26cf9ea8e4
Tree-SHA512: 44a03ebf2bb86ca1411a36222a575217cdba8ee3a3c985e74d74c934516f002b27336147fa22f59eda7dac21204a93951563317005d475da95b23c427014d77b
fa521c9603 Use steady clock for all millis bench logging (MacroFake)
Pull request description:
Currently `GetTimeMillis` is used for bench logging in milliseconds integral precision. Replace it to use a steady clock that is type-safe and steady.
Microsecond or float precision can be done in a follow-up.
ACKs for top commit:
fanquake:
ACK fa521c9603 - started making the same change.
Tree-SHA512: 86a810e496fc663f815acb8771a6c770331593715cde85370226685bc50c13e8e987e3c5efd0b4e48b36ebd2372255357b709204bac750d41e94a9f7d9897fa6
d0433a3153 guix: Drop perl package (Hennadii Stepanov)
55e468f149 build: Add `-no-mimetype-database` option to qt package in depends (Hennadii Stepanov)
Pull request description:
Perl is required only in Qt to create its own MIME database, which we never use.
Guix build on `x86_64`:
```
b63983137239de664edba06834d48fbfc1957d4c56aaf1b2c4cd253bad2856f9 guix-build-d0433a31534d/output/aarch64-linux-gnu/SHA256SUMS.part
f4ea6d24a0248f573a0e6e207f872a964ad061459837e3c44ddc2257871349f9 guix-build-d0433a31534d/output/aarch64-linux-gnu/bitcoin-d0433a31534d-aarch64-linux-gnu-debug.tar.gz
00efef73311e2a231255f7e2010d5a77ec986b60be26be10f27dc24aa84382c7 guix-build-d0433a31534d/output/aarch64-linux-gnu/bitcoin-d0433a31534d-aarch64-linux-gnu.tar.gz
8eaf54f1d867b8279e5bf7db9d57a86b9d63dbb7f17bc8df131336781325ca25 guix-build-d0433a31534d/output/arm-linux-gnueabihf/SHA256SUMS.part
1fc60e3086e09cefef8f3848787c4bf601a017a5e75a1dd322c81916ad737d30 guix-build-d0433a31534d/output/arm-linux-gnueabihf/bitcoin-d0433a31534d-arm-linux-gnueabihf-debug.tar.gz
92b51c48dd7aeb1853345bc17f433c56c3704755008fbe2d5b203145af87b667 guix-build-d0433a31534d/output/arm-linux-gnueabihf/bitcoin-d0433a31534d-arm-linux-gnueabihf.tar.gz
7daadc27af84bfeab98802481c3dbce852613b712db1711f5bf67c36ad54414a guix-build-d0433a31534d/output/arm64-apple-darwin/SHA256SUMS.part
2d1de48b0acfdd6aa3a5dd7c97557463d11ef8a2a12b2227bf555a8d387c3db9 guix-build-d0433a31534d/output/arm64-apple-darwin/bitcoin-d0433a31534d-arm64-apple-darwin-unsigned.dmg
a1fd2d0103295b4a3bda8f8be39df2bb3cef1be18235c20f7a4f13e4f839b9b0 guix-build-d0433a31534d/output/arm64-apple-darwin/bitcoin-d0433a31534d-arm64-apple-darwin-unsigned.tar.gz
abb9c9f2a2506205a236240de3fc602d9bc884a19a8d64ede2d9abf03c29141c guix-build-d0433a31534d/output/arm64-apple-darwin/bitcoin-d0433a31534d-arm64-apple-darwin.tar.gz
13f21eb33c2d0719da0bd5227ea58e5bb625a7fd0bd2af8d1a13efe7a00ab46c guix-build-d0433a31534d/output/dist-archive/bitcoin-d0433a31534d.tar.gz
0a83e8b591fd79d0493f381f1fc849ed89428e43794c9f791e5ee36fa6b945b8 guix-build-d0433a31534d/output/powerpc64-linux-gnu/SHA256SUMS.part
56b592cf691ef22557a03d6083a0603b45caa6ebfd17c0dda6fc870c8612a19f guix-build-d0433a31534d/output/powerpc64-linux-gnu/bitcoin-d0433a31534d-powerpc64-linux-gnu-debug.tar.gz
9d72a57f5bd509aaf48c18bf7d8b27861722242aa85036e7c6512983e6f102ee guix-build-d0433a31534d/output/powerpc64-linux-gnu/bitcoin-d0433a31534d-powerpc64-linux-gnu.tar.gz
0512992f6ee3ca2693121cd4bcb45a23de7759ccd87db67e4f091ada75fca3e1 guix-build-d0433a31534d/output/powerpc64le-linux-gnu/SHA256SUMS.part
b3ccdeac6bc7c36ce5792018dbad81b18a6fb62c4fc67df820796e70f4630100 guix-build-d0433a31534d/output/powerpc64le-linux-gnu/bitcoin-d0433a31534d-powerpc64le-linux-gnu-debug.tar.gz
f4c11cbd56431f5d257dff881a46d7ddf83b3d3a2e05c5e88e5575c4bb552960 guix-build-d0433a31534d/output/powerpc64le-linux-gnu/bitcoin-d0433a31534d-powerpc64le-linux-gnu.tar.gz
ad71196a5af12eedb906fb009b8f635933fa2bf83586b4b2360f6b84f52998ca guix-build-d0433a31534d/output/riscv64-linux-gnu/SHA256SUMS.part
6fe7dbb772e91dccec781b4d7a47cc8179ba0fb4614a3da6423679a4539ae96e guix-build-d0433a31534d/output/riscv64-linux-gnu/bitcoin-d0433a31534d-riscv64-linux-gnu-debug.tar.gz
f8fb450f627791b20e56d00bc9544984120fe22d9644318bc01cf027914b7338 guix-build-d0433a31534d/output/riscv64-linux-gnu/bitcoin-d0433a31534d-riscv64-linux-gnu.tar.gz
fb741950e3699fe2ffa44754e493a28b06c00ce12f9a4c073e38dd960bfe805d guix-build-d0433a31534d/output/x86_64-apple-darwin/SHA256SUMS.part
47dfb3eb3526c319ed528c24f19dda4ee3e6e03ca36d62f31207bad65083be76 guix-build-d0433a31534d/output/x86_64-apple-darwin/bitcoin-d0433a31534d-x86_64-apple-darwin-unsigned.dmg
4e306e35e7c885791694762d10fbc4e563466a2240036c3e1fc877c2806ac583 guix-build-d0433a31534d/output/x86_64-apple-darwin/bitcoin-d0433a31534d-x86_64-apple-darwin-unsigned.tar.gz
ac71e5164142225fc018f47d278d5450a28de05259f41437a7c4183708d8681d guix-build-d0433a31534d/output/x86_64-apple-darwin/bitcoin-d0433a31534d-x86_64-apple-darwin.tar.gz
f670fbe6652211d57dca9c79a6e37023b40d32117cf5e0d28dd9ba6247af1d61 guix-build-d0433a31534d/output/x86_64-linux-gnu/SHA256SUMS.part
94b23c572cac60f7ce1f7851e1aa0c8d41cc5fa5863089027aa8d524b6940d91 guix-build-d0433a31534d/output/x86_64-linux-gnu/bitcoin-d0433a31534d-x86_64-linux-gnu-debug.tar.gz
6d48a676f126eea585ab352c6bc923341903d891da6e8c4d4e2e168b8d6c4820 guix-build-d0433a31534d/output/x86_64-linux-gnu/bitcoin-d0433a31534d-x86_64-linux-gnu.tar.gz
23bb6919646725bfe35f4e3eb1beedb3ee4f49dc0b410d47185a2e06fb0184e3 guix-build-d0433a31534d/output/x86_64-w64-mingw32/SHA256SUMS.part
a92202b0c397aede252c433dbf83d5094141d5263f32d1078a052da7cf23059b guix-build-d0433a31534d/output/x86_64-w64-mingw32/bitcoin-d0433a31534d-win64-debug.zip
11d84ad174e12f3342764b47f42e32a55bd6d277416dcf6b05556173ace48430 guix-build-d0433a31534d/output/x86_64-w64-mingw32/bitcoin-d0433a31534d-win64-setup-unsigned.exe
436364e555e57090472600b5486af8bdefe0baaab7441b919e23f90d01a3347f guix-build-d0433a31534d/output/x86_64-w64-mingw32/bitcoin-d0433a31534d-win64-unsigned.tar.gz
e193bf3179194d68d88e295d0ef830ef77ddb504bc0f9aa17f84b537b275ddde guix-build-d0433a31534d/output/x86_64-w64-mingw32/bitcoin-d0433a31534d-win64.zip
```
ACKs for top commit:
fanquake:
ACK d0433a3153 - with the cavaet that I haven't looked at the qt changes, or the effects of using the `-no-mimetype-database` flag, at all. Also performed a Guix build from scratch with this branch rebased on master.
jarolrod:
ACK d0433a3153
Tree-SHA512: d6dc9bb19e793027d818aee0e248e59fdbf4f4ff46d55538f30e1731254c4739de342a3e917ae7d3f3bc1b6451667b9e8984a6522a1fcece7891c51502a420e8
04fee75bac Use ReadLE64 in uint256::GetUint64() instead of duplicating logic (Pieter Wuille)
Pull request description:
No need to have a (naive) copy of the `ReadLE64` logic inside `uint256::GetUint64`, when we have an optimized function for exactly that.
ACKs for top commit:
davidgumberg:
ACK 04fee75bac
jonatack:
ACK 04fee75bac review, this use of ReadLE64() is similar to the existing invocation by Num3072::Num3072(), sanity checked that before and after this change GetUint64() returns the same result (debug build, clang 13)
Tree-SHA512: 0fc2681536a18d82408411bcc6d5c6445fb96793fa43ff4021cd2933d46514c725318da35884f428d1799023921f33f8af091ef428ceb96a50866ac53a345356
8b2891a6d1 i2p: use the same destination type for transient and persistent addresses (Vasil Dimov)
Pull request description:
We generate our persistent I2P address with type `EdDSA_SHA512_Ed25519` (`DEST GENERATE SIGNATURE_TYPE=7`).
Use the same type for our transient addresses which are created by the `SESSION CREATE ...` command. If not specified, then the default one is `DSA_SHA1` according to https://geti2p.net/en/docs/api/samv3.
Fixes https://github.com/bitcoin/bitcoin/issues/26062
ACKs for top commit:
mzumsande:
ACK 8b2891a6d1
sipa:
utACK 8b2891a6d10f4a3875010d2e8eafd78bcf378952; didn't test but verified this matches the documentation
Tree-SHA512: 1b10e7e1e274b77609d08ee9cf9d73fef8c975c51aec452ce23e15fcf41709398c697087bfdece121b1fd26bc0501fc45857a91aaab679cadd0cbb37dd94c3a7
b0349a7d95 doc: consolidate & remove release-note fragments (fanquake)
Pull request description:
The formatting / ordering doesn't matter a great deal here, given this will shortly be moving to the wiki for further additions / formatting changes etc.
ACKs for top commit:
MarcoFalke:
ACK b0349a7d95
achow101:
ACK b0349a7d95
jarolrod:
ACK b0349a7d95
Tree-SHA512: 80d2f9f25bc13d407ab9fd0473ff02043a1e6b9895e27d3229d717d357606063472582d31bc1b4058741d2e34be806ef1460acd66d43d6493562ffcf3f6defa5
02c9e56468 fs: fully initialize _OVERLAPPED for win32 (Cory Fields)
Pull request description:
```bash
fs.cpp: In member function ‘bool fsbridge::FileLock::TryLock()’:
fs.cpp:129:32: error: missing initializer for member ‘_OVERLAPPED::InternalHigh’ [-Werror=missing-field-initializers]
129 | _OVERLAPPED overlapped = {0};
| ^
fs.cpp:129:32: error: missing initializer for member ‘_OVERLAPPED::<anonymous>’ [-Werror=missing-field-initializers]
fs.cpp:129:32: error: missing initializer for member ‘_OVERLAPPED::hEvent’ [-Werror=missing-field-initializers]
```
Came up in #25972. That PR is now rebased on this change.
Closes: #26006
ACKs for top commit:
sipsorcery:
tACK 02c9e56468.
hebasto:
ACK 02c9e56468, tested on Linux x86_64:
Tree-SHA512: 6a0495c34bd952b2bb8c994a1450da7d3eee61225bb4ff0ce009c013f5e29dba94bb1c3ecef9989dc18c939909fdc8eba690a38f96da431ae9d64c23656de7d0
4b656b9ed3 build: remove unused libevent cppflags (fanquake)
afce044bb6 build: remove unused natpmp / upnp cppflags (fanquake)
Pull request description:
Their inclusion is likely just the result of copy-paste.
The only place upnp & natpmp CPPFLAGS should be used is [`libbitcoin_node` (mapport.cpp)](13fd9ee5c2/src/Makefile.am (L352)).
ACKs for top commit:
theuni:
ACK 4b656b9ed3
hebasto:
ACK 4b656b9ed3, I have reviewed the code and it looks OK, I agree it can be merged.
Tree-SHA512: 800daeb06ddcbade3a862ca939a8cf87dc36282ed4fe9dc256d17b78a8751e2e08799788dc449046e1d875f93372912269d3ffcb5702628a41648794df32e887
By throwing a custom exception from `Univalue::checkType` (instead of a plain
std::runtime_error) and catching it on the RPC server request handler.
So we properly return RPC_TYPE_ERROR (-3) on arg type errors and
not the general RPC_MISC_ERROR (-1).
and also fix spelling in test/lint/lint-locale-dependence.py not caught by the
spelling linter and fix up a paragraph we are touching here in test/README.md.
The `sendall` RPC doesn't use `CreateTransactionInternal`as the rest of
the wallet RPCs and it never checks against the tx-size mempool limit.
Add a check for tx-size as well as test coverage for that case.
6f8e3818af sendall: check if the maxtxfee has been exceeded (ishaanam)
Pull request description:
Previously the `sendall` RPC didn't check whether the fees of the transaction it creates exceed the set `maxtxfee`. This PR adds this check to `sendall` and a test case for it.
ACKs for top commit:
achow101:
ACK 6f8e3818af
Xekyo:
ACK 6f8e3818af
glozow:
Concept ACK 6f8e3818af. The high feerate is unlikely but sendall should respect the existing wallet options.
Tree-SHA512: 6ef0961937091293d49be16f17e4451cff3159d901c0c7c6e508883999dfe0c20ed4d7126bf74bfea8150d4c1eef961a45f0c28ef64562e6cb817fede2319f1a
There are many cases where we assume message processing is
single-threaded in order for how we access node-related memory to be
safe. Add an explicit mutex that we can use to document this, which allows
the compiler to catch any cases where we try to access that memory from
other threads and break that assumption.