fa07f84e31 Fix signed integer overflow in prioritisetransaction RPC (MarcoFalke)
fa52cf8e11 refactor: Replace feeDelta by m_modified_fee (MarcoFalke)
Pull request description:
Signed integer overflow is UB in theory, but not in practice. Still,
it would be nice to avoid this UB to allow Bitcoin Core to be
compiled with sanitizers such as `-ftrapv` or ubsan.
It is impossible to predict when and if an overflow occurs, since
the overflow caused by a prioritisetransaction RPC might only be
later hit when descendant txs are added to the mempool.
Since it is impossible to predict reliably, leave it up to the user
to use the RPC endpoint responsibly, considering their mempool
limits and usage patterns.
Fixes: #20626Fixes: #20383Fixes: #19278
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34146 / https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47132
## Steps to reproduce
Build the code without the changes in this pull.
Make sure to pass the sanitizer flag:
```
./autogen.sh && ./configure --with-sanitizers=signed-integer-overflow && make clean && make -j $(nproc)
```
### Reproduce on RPC
```
./src/bitcoind -chain=regtest -noprinttoconsole &
./src/bitcoin-cli -chain=regtest prioritisetransaction 00000000deadbeef00000000deadbeef00000000deadbeef00000000deadbeef 0 9123456789123456789
./src/bitcoin-cli -chain=regtest prioritisetransaction 00000000deadbeef00000000deadbeef00000000deadbeef00000000deadbeef 0 9123456789123456789
|> txmempool.cpp:920:15: runtime error: signed integer overflow: 9123456789123456789 + 9123456789123456789 cannot be represented in type 'long int'
./src/bitcoin-cli -chain=regtest stop
```
### By fuzzing
```
wget https://github.com/bitcoin/bitcoin/files/8921302/clusterfuzz-testcase-minimized-validation_load_mempool-5599531390074880.bin.txt
FUZZ=validation_load_mempool ./src/test/fuzz/fuzz ./clusterfuzz-testcase-minimized-validation_load_mempool-5599531390074880.bin.txt
|> txmempool.cpp:920:15: runtime error: signed integer overflow: 7214801925397553184 + 2314885530818453536 cannot be represented in type 'long int'
|> validation_load_mempool: succeeded against 1 files in 0s.
ACKs for top commit:
vasild:
ACK fa07f84e31
dunxen:
ACK fa07f84
LarryRuane:
ACK fa07f84e31
Tree-SHA512: 4a357950af55a49c9113da0a50c2e743c5b752f0514dd8d16cd92bfde2f77dd0ef56aa98452626df6f7f7a5b51d1227021f6bc94091201a179f0d488ee32a0df
5f082ad4e4 guix: patch LIEF to fix PPC64 NX default (fanquake)
0b5adfda87 guix: use LIEF 0.12.1 (fanquake)
4b6b4fc537 guix: remove usage of -Wl,-z,noexecstack for PPC64 HOST (fanquake)
Pull request description:
The PPC64 ELF ABI has a non-executable stack by default, so passing `-Wl,-z,noexecstack` to force the creation of a `GNU_STACK` segment, just so we can assert that it doesn't have the exectable permission, is awkward. Now that LIEF has been fixed upstream, https://github.com/lief-project/LIEF/pull/718, we can temporarily patch our LIEF build to include the (simple) patch, and drop it the next time we update LIEF.
See the relevant Linux kernel [documentation for powerpc](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/include/asm/page_64.h#n92) (and discussion in #25313):
```c
/*
* This is the default if a program doesn't have a PT_GNU_STACK
* program header entry. The PPC64 ELF ABI has a non executable stack
* stack by default, so in the absence of a PT_GNU_STACK program header
* we turn execute permission off.
*/
#define VM_STACK_DEFAULT_FLAGS32VM_DATA_FLAGS_EXEC
#define VM_STACK_DEFAULT_FLAGS64VM_DATA_FLAGS_NON_EXEC
#define VM_STACK_DEFAULT_FLAGS \
(is_32bit_task() ? \
VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64)
```
Guix Build (x86_64):
```bash
0df3f7a716b8c58c29990b0fbad17dbddb7a14d8e348bdabec7593771accaa2c guix-build-5f082ad4e4cc/output/aarch64-linux-gnu/SHA256SUMS.part
f235d9fb0255a0dd3cca7005e4ee09623b01224372585a49be8f94569bd52617 guix-build-5f082ad4e4cc/output/aarch64-linux-gnu/bitcoin-5f082ad4e4cc-aarch64-linux-gnu-debug.tar.gz
8d870b415dcd30abc889c47f5313cb6a30ec7d0a29bab11394a90c612171a09d guix-build-5f082ad4e4cc/output/aarch64-linux-gnu/bitcoin-5f082ad4e4cc-aarch64-linux-gnu.tar.gz
1f37b3ba87ab9f3aedc8f23251b423b146c1db9cc93d7cbe1ccb22a818cb597f guix-build-5f082ad4e4cc/output/arm-linux-gnueabihf/SHA256SUMS.part
515e13725241fe889208df0c4a678da83e06dfa77e0b47125b2bfd46cf784b11 guix-build-5f082ad4e4cc/output/arm-linux-gnueabihf/bitcoin-5f082ad4e4cc-arm-linux-gnueabihf-debug.tar.gz
d6051bde21d3b17c44af6925efcb68fcda5e0ae0bc42f167a36bea79205bd0f7 guix-build-5f082ad4e4cc/output/arm-linux-gnueabihf/bitcoin-5f082ad4e4cc-arm-linux-gnueabihf.tar.gz
3c12359285baa0d1696d855d220f235d5db44c1989e3e13d89cb555ca8f2bc01 guix-build-5f082ad4e4cc/output/arm64-apple-darwin/SHA256SUMS.part
74853e41c40a7d12d08c83b8e77d0a007bb19465c1206b7b78d85e5dc4f08df1 guix-build-5f082ad4e4cc/output/arm64-apple-darwin/bitcoin-5f082ad4e4cc-arm64-apple-darwin-unsigned.dmg
570d3f9578715784c729acdaafaf67ebcefbf48c1da3f322813292803f275ccf guix-build-5f082ad4e4cc/output/arm64-apple-darwin/bitcoin-5f082ad4e4cc-arm64-apple-darwin-unsigned.tar.gz
670e1f4b2825679d8e92b76f0a253dd11a9d8c484bf8a453068e63d99df7e1dd guix-build-5f082ad4e4cc/output/arm64-apple-darwin/bitcoin-5f082ad4e4cc-arm64-apple-darwin.tar.gz
935deb771d847aab5feda557902225c49b6f2547f271072853f5a94a501885fd guix-build-5f082ad4e4cc/output/dist-archive/bitcoin-5f082ad4e4cc.tar.gz
dce5d37e13ddc2482333fe5b0f6b3d5f29a2bfc38446088afeb3b2e3345c0753 guix-build-5f082ad4e4cc/output/powerpc64-linux-gnu/SHA256SUMS.part
b65de56a98b6bd9dbdfa7cb4c92517804b936c7ed101475f2764283d1f3c0b6d guix-build-5f082ad4e4cc/output/powerpc64-linux-gnu/bitcoin-5f082ad4e4cc-powerpc64-linux-gnu-debug.tar.gz
9d3cb775a467df2d653fc1670008bcf344303dd20f740e727c927ec5f9015aa8 guix-build-5f082ad4e4cc/output/powerpc64-linux-gnu/bitcoin-5f082ad4e4cc-powerpc64-linux-gnu.tar.gz
7f6cbaef349ed129a769bdae2adcff7f65d856f52f2caf25f4da44272058fbf0 guix-build-5f082ad4e4cc/output/powerpc64le-linux-gnu/SHA256SUMS.part
56435b4da1e96beefe0e2093f5c1cafac19d911fe3df667b6652e6641786a582 guix-build-5f082ad4e4cc/output/powerpc64le-linux-gnu/bitcoin-5f082ad4e4cc-powerpc64le-linux-gnu-debug.tar.gz
75a43ecdcd374d15543458251e4d7275551e08cff308483d3f54130fa18008a4 guix-build-5f082ad4e4cc/output/powerpc64le-linux-gnu/bitcoin-5f082ad4e4cc-powerpc64le-linux-gnu.tar.gz
a555d0164046d47ec32c5924657c74a3d481165096dd1b74050871e438563442 guix-build-5f082ad4e4cc/output/riscv64-linux-gnu/SHA256SUMS.part
fc4c430f34bea975f14b755574f4507b9972b873056d9cf55a165b1e2902ddae guix-build-5f082ad4e4cc/output/riscv64-linux-gnu/bitcoin-5f082ad4e4cc-riscv64-linux-gnu-debug.tar.gz
a25a0fe2c5cf08fa8af588fe4e8c74276db5386ab44118ed6226de575b50cacd guix-build-5f082ad4e4cc/output/riscv64-linux-gnu/bitcoin-5f082ad4e4cc-riscv64-linux-gnu.tar.gz
811fd6d62e02b6a3bf1a0e39d8721034398c1710649f080c81e514eb34e70500 guix-build-5f082ad4e4cc/output/x86_64-apple-darwin/SHA256SUMS.part
1a43bf4e0b56f9e724c45a7f5cc8f1641e038c450a62ab9baa68f6fe2f60da8a guix-build-5f082ad4e4cc/output/x86_64-apple-darwin/bitcoin-5f082ad4e4cc-x86_64-apple-darwin-unsigned.dmg
8c2508bdf0256177b05fff4cd613b735deaacee844f74ae075dabdc911b35204 guix-build-5f082ad4e4cc/output/x86_64-apple-darwin/bitcoin-5f082ad4e4cc-x86_64-apple-darwin-unsigned.tar.gz
7cb121072661dc224914d6777135d51aa60f16c8dc890f840f81d39cc55ee7ed guix-build-5f082ad4e4cc/output/x86_64-apple-darwin/bitcoin-5f082ad4e4cc-x86_64-apple-darwin.tar.gz
4ff472b2f9e786e620c449563c33f032795dada20701e9da9126997b2f9605e7 guix-build-5f082ad4e4cc/output/x86_64-linux-gnu/SHA256SUMS.part
1e0e4662a38f5df3027b4c062a18c6255fb59640afc69dd2e23a1dc47f278a74 guix-build-5f082ad4e4cc/output/x86_64-linux-gnu/bitcoin-5f082ad4e4cc-x86_64-linux-gnu-debug.tar.gz
0d02f5689b008818467d5fe14a10503738e0e6c96f34591771cb8fb0f2cd3763 guix-build-5f082ad4e4cc/output/x86_64-linux-gnu/bitcoin-5f082ad4e4cc-x86_64-linux-gnu.tar.gz
bff9e2893998b1880850f0195a8282564c4bf46d2bfaaf3358ddd7f1812370f1 guix-build-5f082ad4e4cc/output/x86_64-w64-mingw32/SHA256SUMS.part
11e0835f989d86c6c39a8dfa60e7129262e098ef80720d0de6acfdcd8995fd92 guix-build-5f082ad4e4cc/output/x86_64-w64-mingw32/bitcoin-5f082ad4e4cc-win64-debug.zip
491038e48288863860a3adf229a138d1b74a24004dcb1e07b28d207f866e7d15 guix-build-5f082ad4e4cc/output/x86_64-w64-mingw32/bitcoin-5f082ad4e4cc-win64-setup-unsigned.exe
5c8cbbd00a0cb5fcb00478bd05cbb7fa38f97126c677538389173cf71f64f647 guix-build-5f082ad4e4cc/output/x86_64-w64-mingw32/bitcoin-5f082ad4e4cc-win64-unsigned.tar.gz
a6ee1e220e8d91192ee6f36ef33a0c5a1348aba2f84fd42d228f04ab927f3feb guix-build-5f082ad4e4cc/output/x86_64-w64-mingw32/bitcoin-5f082ad4e4cc-win64.zip
```
Guix Build (arm64):
```bash
17ec23ec07289eb00eec401385aca7e194d366f86778bd747ca17ad2bdded16f guix-build-5f082ad4e4cc/output/arm-linux-gnueabihf/SHA256SUMS.part
34b997bba0ec8c6f66bde5cd8d08cf2fbf6e5cb04d1825a4ef4b850c059841fa guix-build-5f082ad4e4cc/output/arm-linux-gnueabihf/bitcoin-5f082ad4e4cc-arm-linux-gnueabihf-debug.tar.gz
93666cc53fd3a6cdfe3528f42a8250bc82bd7a1ab5936d99052bef49142e06c9 guix-build-5f082ad4e4cc/output/arm-linux-gnueabihf/bitcoin-5f082ad4e4cc-arm-linux-gnueabihf.tar.gz
c142bd730e1a564f9c0f65818fa3a0e3d20d41a95c419ce52b11ef33420d03ad guix-build-5f082ad4e4cc/output/arm64-apple-darwin/SHA256SUMS.part
afcf76d9807173a1dceb6c9933997f1cbac76fb9b683b6ad65af93069dbe7344 guix-build-5f082ad4e4cc/output/arm64-apple-darwin/bitcoin-5f082ad4e4cc-arm64-apple-darwin-unsigned.dmg
f1a6f2b8a01543b3f5926e880619c54317fdcb2e93ed860df5e0bb642a8e6d4c guix-build-5f082ad4e4cc/output/arm64-apple-darwin/bitcoin-5f082ad4e4cc-arm64-apple-darwin-unsigned.tar.gz
e423a0cb964177d6ad97cebd288666460a902d45f51bacba23b019644ddeea18 guix-build-5f082ad4e4cc/output/arm64-apple-darwin/bitcoin-5f082ad4e4cc-arm64-apple-darwin.tar.gz
935deb771d847aab5feda557902225c49b6f2547f271072853f5a94a501885fd guix-build-5f082ad4e4cc/output/dist-archive/bitcoin-5f082ad4e4cc.tar.gz
e01cf090da155bc7626d221a87a177b2dd1cdb8d9c2954e2423ab0268976e513 guix-build-5f082ad4e4cc/output/powerpc64-linux-gnu/SHA256SUMS.part
08afcfc256bd8f29d1dad90709828ef800b2ea3d22b834dc78af27b5d10d20b5 guix-build-5f082ad4e4cc/output/powerpc64-linux-gnu/bitcoin-5f082ad4e4cc-powerpc64-linux-gnu-debug.tar.gz
cf861876542e8b27e9335ce9432107a402e8cc4b177d2db1649b54d7e269081e guix-build-5f082ad4e4cc/output/powerpc64-linux-gnu/bitcoin-5f082ad4e4cc-powerpc64-linux-gnu.tar.gz
0840ae94ea6830d842043d4a8ed17893e3f58917113bcf2e2e3ee247bd8db249 guix-build-5f082ad4e4cc/output/powerpc64le-linux-gnu/SHA256SUMS.part
072251112d709f1c2a3b38065f5fb5a435f3cefbc788e46fa1ff9d96d746ea4d guix-build-5f082ad4e4cc/output/powerpc64le-linux-gnu/bitcoin-5f082ad4e4cc-powerpc64le-linux-gnu-debug.tar.gz
a8507446c9a69a0c7fe1020e30d6f0334d0f6c0c96263298bafd502c2ce2c7c4 guix-build-5f082ad4e4cc/output/powerpc64le-linux-gnu/bitcoin-5f082ad4e4cc-powerpc64le-linux-gnu.tar.gz
d3cf62ebabb062276dd1615774c7ee231b62a92ba1a9515f13c1f0454d84c6e5 guix-build-5f082ad4e4cc/output/riscv64-linux-gnu/SHA256SUMS.part
0b738e9f973d2ed4031fd81465ea65bc9d17e983e48c892ca89582da9d8afcd5 guix-build-5f082ad4e4cc/output/riscv64-linux-gnu/bitcoin-5f082ad4e4cc-riscv64-linux-gnu-debug.tar.gz
28e84d55aa048be871776cd62c7dcbb6286d2f42ac1ce59772ea65217eb86ec2 guix-build-5f082ad4e4cc/output/riscv64-linux-gnu/bitcoin-5f082ad4e4cc-riscv64-linux-gnu.tar.gz
811fd6d62e02b6a3bf1a0e39d8721034398c1710649f080c81e514eb34e70500 guix-build-5f082ad4e4cc/output/x86_64-apple-darwin/SHA256SUMS.part
1a43bf4e0b56f9e724c45a7f5cc8f1641e038c450a62ab9baa68f6fe2f60da8a guix-build-5f082ad4e4cc/output/x86_64-apple-darwin/bitcoin-5f082ad4e4cc-x86_64-apple-darwin-unsigned.dmg
8c2508bdf0256177b05fff4cd613b735deaacee844f74ae075dabdc911b35204 guix-build-5f082ad4e4cc/output/x86_64-apple-darwin/bitcoin-5f082ad4e4cc-x86_64-apple-darwin-unsigned.tar.gz
7cb121072661dc224914d6777135d51aa60f16c8dc890f840f81d39cc55ee7ed guix-build-5f082ad4e4cc/output/x86_64-apple-darwin/bitcoin-5f082ad4e4cc-x86_64-apple-darwin.tar.gz
6463d3502cb839e50aaa2063f3ea1e4c874904e4745836411603e4cf0b5da946 guix-build-5f082ad4e4cc/output/x86_64-linux-gnu/SHA256SUMS.part
dae5e82e1a32312fb417aabeef750cb4317a853af142ec0a7125dcb6f66e7930 guix-build-5f082ad4e4cc/output/x86_64-linux-gnu/bitcoin-5f082ad4e4cc-x86_64-linux-gnu-debug.tar.gz
2434199cc24b8b463d3efda8a053d21324c02d1b06afaa3e08af7cdffa7b05d4 guix-build-5f082ad4e4cc/output/x86_64-linux-gnu/bitcoin-5f082ad4e4cc-x86_64-linux-gnu.tar.gz
8195c14785b4f553eb05fb8c25516d1b337b3ca8fc9d7cf6ad6d2bd3bc6d2093 guix-build-5f082ad4e4cc/output/x86_64-w64-mingw32/SHA256SUMS.part
95b674ae6d9ddff652feeb5280e6a600803f78f685cde62f94332876c4039357 guix-build-5f082ad4e4cc/output/x86_64-w64-mingw32/bitcoin-5f082ad4e4cc-win64-debug.zip
491038e48288863860a3adf229a138d1b74a24004dcb1e07b28d207f866e7d15 guix-build-5f082ad4e4cc/output/x86_64-w64-mingw32/bitcoin-5f082ad4e4cc-win64-setup-unsigned.exe
5c8cbbd00a0cb5fcb00478bd05cbb7fa38f97126c677538389173cf71f64f647 guix-build-5f082ad4e4cc/output/x86_64-w64-mingw32/bitcoin-5f082ad4e4cc-win64-unsigned.tar.gz
3e5fbbe50d266e6e03ae0976ccef74cf1024d107629223e655c672e2b8d73187 guix-build-5f082ad4e4cc/output/x86_64-w64-mingw32/bitcoin-5f082ad4e4cc-win64.zip
```
ACKs for top commit:
laanwj:
Tested ACK 5f082ad4e4
Tree-SHA512: c62f2ba949553edada6631e21e7fa50af9e328cf62b5b45c90290e388b3670852bd08100802ca1a8ea1e55979799be61908fd34542f6fcc20d6845f3d8c2a28f
fafee78188 rpc: Return incrementalrelayfee in getmempoolinfo (MacroFake)
Pull request description:
Seems odd to return other policy info, but not the incremental relay fee
ACKs for top commit:
1440000bytes:
ACK fafee78188
w0xlt:
Code Review ACK fafee78188
jarolrod:
tACK fafee78188
Tree-SHA512: faad0af6c039b8257acbeac913bc5dcdb2ea2db304c95e52601536c8de60eb1186e9fbb4a64a68adf476605f18022aeda16a5644a0d7912592b0977e4c029638
e3d8d72703 test: Remove unnecessary block mining from importdescriptors test (Fabian Jahr)
Pull request description:
This removes generation of 6 blocks and replaces is with a `sync_all` in the `importdescriptors` test.
The generated blocks themself don't seem to serve any purpose in the test. Instead they could make the test flaky (although I did not find open issues pointing to this happening in practice in the CI). Right before the blocks being generated a transaction is created (L454) and later in the test this tx is assumed to be still in the mempool. If the nodes were to sync their mempools before the blocks are generated, the test fails. It currently only seems to work because one node sends the tx while the other generates the blocks and the mempools are not synced fast enough.
The `sync_all` is still needed to let nodes catch up at that point. Otherwise races happen further below which the generate call seems to have prevented so far.
ACKs for top commit:
laanwj:
Code review ACK e3d8d72703
Tree-SHA512: 14f3dc2938d779d1ad43e09a7e046523fc3c92f41df012833f279a2e88e74c2fcab301fe4f3fcc038bd8460ea1360725a8d1eb5b59acd1039495bacb484fd790
05b2d9fe07 build: Bump default `PlatformToolset` for Visual Studio 2022 (Hennadii Stepanov)
460c6c7248 doc: Make Windows build docs match the CI task (Hennadii Stepanov)
849cf967a3 ci: Increase CPU number for "Win64 native" task (Hennadii Stepanov)
a18c4c1871 ci: Bump vcpkg to the latest version (Hennadii Stepanov)
b9a5a9b68c ci: Limit ccache cache size properly on "Win64 native" task (Hennadii Stepanov)
156bc89788 ci: Update Windows task image up to visualstudio2022 (Hennadii Stepanov)
Pull request description:
Besides upgrading Visual Studio, which seems [inevitable](https://github.com/bitcoin/bitcoin/pull/24531#discussion_r887854193), this PR also:
- bumps vcpkg to the latest version (previous one was in bitcoin/bitcoin#24847)
- fixes cache size limit for `ccache`
ACKs for top commit:
sipsorcery:
reACK 05b2d9fe07.
hebasto:
> ACK [05b2d9f](05b2d9fe07)
jarolrod:
ACK 05b2d9fe07
Tree-SHA512: 6338e74a3f1907f09ca29540e9e2cf7ac3be3b9e28271e8a20e71b67a9c3d5ebb8d34528b9677bcd1d9bc0ad723d68fd2ba7db368443ed1854cca3a3961f294b
Currently, the time it takes to get the "Win64 native" task done with
all of the caches been invalidated is very close to the 2 hours limit.
This task is the only one which runs on Windows Community Cluster,
therefore this change should not affect other CI tasks.
fabae3541a rpc: Use steady_clock for getrpcinfo durations (MacroFake)
Pull request description:
Currently it uses `GetTimeMicros`, which is the system time. Using steady time instead, makes the code type safe and avoids spurious offsets when the system time adjusts.
ACKs for top commit:
laanwj:
Code review ACK fabae3541a
w0xlt:
Code Review ACK fabae3541a
shaavan:
Code Review ACK fabae3541a
Tree-SHA512: eb25fe3e69bf42ec8a2d4aaa69b435de7654b0d07218ce3e0c03ebaef6eb7f713128779057d012621773a34675a81f5757e7b2502c13b82adaf6e2df970d8c66
e4b4db5610 refactor: remove unused method `CDBWrapper::CompactRange` (Sebastian Falbesoner)
fb38c6e21f refactor: remove unused methods `{CDBIterator,CCoinsViewDBCursor}::GetValueSize()` (Sebastian Falbesoner)
Pull request description:
The `GetValueSize` methods haven't been used since the chainstate db cache has been switched from per-tx to per-txout model years ago (PR #10195, commit d342424301). The `CompactRange` is unused since the txindex migration code was removed (PR https://github.com/bitcoin/bitcoin/pull/22626, commit fa20f815a9).
ACKs for top commit:
fanquake:
ACK e4b4db5610
furszy:
re-ACK e4b4db56
laanwj:
Code review ACK e4b4db5610
Tree-SHA512: 77da445fb70c744046263c6f2ddb05782b68e3d4b2ea604dd7c7dc73ce7c1f2d2b48ec68db4dcb03e35fc27488b99b0a420f6fa3d5b83d325c1708ed68e99e0a
e7a9133766 [net processing] Set CNode::m_relays_txs=true when receiving BIP37 filters (dergoegge)
Pull request description:
This line was accidentally removed in https://github.com/bitcoin/bitcoin/pull/22778.
Receiving a `filterload` message implies that we should relay txs to the sender (`CNode::m_relays_txs = true`). `CNode::m_relays_txs` is only used for the inbound eviction logic, so removing the line might have slightly changed the eviction behaviour but nothing else.
ACKs for top commit:
laanwj:
Code review ACK e7a9133766
vasild:
ACK e7a9133766
Tree-SHA512: 19c5df0f579f707c6c7900d12a6b71ac69e802be64f7d2fdcc40ac714c918dc4c17def164592f8836cc105a03daefefca3ca5e10423145eca8db4348c27c9cfc
This method hasn't been used since the txindex migration code has been
removed (PR #22626, commit fa20f815a9).
Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
ceec6808d3 test: `-whitebind` and `-bind` with `-listen=0` should throw an error (brunoerg)
Pull request description:
This PR adds test coverage for the following init error:
b9122e95f0/src/init.cpp (L872-L875)
ACKs for top commit:
laanwj:
Code review ACK ceec6808d3
Tree-SHA512: 03068abe7199b1235f029871ab87a3dd4943738c592ad62d82cdcd3e0201e627624960bd3ea1fc6fc1e7da4b8e215ba3393d1cb8130e1108049f764e51dc75c0
d8d99d041a qt6: Do not use deprecated high DPI attributes in Qt 6 (Hennadii Stepanov)
8927bb8f06 refactor: Fix style in `initTranslations()` function (Hennadii Stepanov)
ad73447dc2 qt6: Do not use deprecated `QLibraryInfo::path` in Qt 6 (Hennadii Stepanov)
3f51d0b8b2 qt6: Fix type registration (Hennadii Stepanov)
Pull request description:
One more step in migration to Qt 6.
Could be tested with hebasto/bitcoin#3 or bitcoin/bitcoin#24798.
No behavior change when compiling with Qt 5.
ACKs for top commit:
laanwj:
Code review ACK d8d99d041a
jarolrod:
ACK d8d99d041a
Tree-SHA512: e5f92a80f8622e5f95dd98a90783956a26d3c8382b9ca8e479fb6c152cfdc85a2f6084e78d463ceea1e0f0b3ac72d2b086c8ca24967b2b6070553317e9e3252e
f67b6fce37 Update Arch Linux build example (Igor Bubelov)
Pull request description:
The current build example has two issues:
1. The claim that the wallet functionality will be missing is obsolete since Bitcoin Core can use SQLite, which is a hard dependency of `pacman` so we can assume that it's always present.
2. Installing package groups such as `base-devel` adds some friction and uncertainty by forcing readers to choose which packages they need, interactively. Listing required deps explicitly speeds up the whole process, makes it more transparent and cuts the number of installed packages.
ACKs for top commit:
laanwj:
re-ACK f67b6fce37
Tree-SHA512: c068dac5d244044827d5d94a4b48f239180301b6870dce31b003fa111a69f7e3a483681a7ea2b3d393d6791b40043685ce2fe62c338cce1b7e37a6db0f02b1a2
faee330c7b test: Fail if connect_nodes fails (MacroFake)
Pull request description:
Currently, `connect_nodes` will return silently when the connection is disconnected while connecting. This is confusing, so fix it.
Can be tested by reverting the signet test change and observing the failure when running the test.
ACKs for top commit:
laanwj:
Tested ACK faee330c7b
Tree-SHA512: 641ca8adcb9f5ff33239b143573bddc0dfde41dbd103751ee870f1572ca2469f6a0d4bab6693102454cd3e270ef8251d87fbfac48f6d8adac70d2d6bbffaae56
a724c39606 net: rename Sock::Reset() to Sock::Close() and make it private (Vasil Dimov)
e8ff3f0c52 net: remove CloseSocket() (Vasil Dimov)
175fb2670a net: remove now unused Sock::Release() (Vasil Dimov)
Pull request description:
_This is a piece of #21878, chopped off to ease review._
* `Sock::Release()` is unused, thus remove it
* `CloseSocket()` is only called from `Sock::Reset()`, so move the body of `CloseSocket()` inside `Sock::Reset()` and remove `CloseSocket()` - this helps to hide low level file descriptor sockets inside the `Sock` class.
* Rename `Sock::Reset()` to `Sock::Close()` and make it `private` - to be used only in the destructor and in the `Sock` assignment operator. This simplifies the public API by removing one method from it.
ACKs for top commit:
laanwj:
Code review ACK a724c39606
Tree-SHA512: 4b12586642b3d049092fadcb1877132e285ec66a80af92563a7703c6970e278e0f2064fba45c7eaa78eb65db94b3641fd5e5264f7b4f61116d1a6f3333868639
fa7cbc6e5c build: Remove negated --enable-fuzz checks from build system (MarcoFalke)
Pull request description:
It is confusing to enable the unit test binary with `ENABLE_TESTS && !ENABLE_FUZZ`, but every other binary is enabled with a simple flag. For example `ENABLE_BENCH`, or `ENABLE_FUZZ_BINARY`.
Fix that by turning `ENABLE_TESTS` back into meaning "enable unit test binary".
ACKs for top commit:
laanwj:
Code review re-ACK fa7cbc6e5c
Tree-SHA512: 2eca26d365fe1d60ff7b87c882a441273cc64bc5eefdc10ec1a0975db24f9b47f591ce8ef53f14eb02d8e3271510e503bfd1a3d09a5d1b35fe44f531f318e87e
* feeDelta tracked the delta (to be applied on top of the actual fee)
* m_modified_fee tracks the actual fee with the delta included
* Instead of passing in the new total delta to the Updater, pass in by
how much the total delta should be modified.
This is needed for the next commit, but makes sense on its own because
the same is done by UpdateDescendantState and UpdateAncestorState.
Outside of `Sock`, `Sock::Reset()` was used in just one place (in
`i2p.cpp`) which can use the assignment operator instead.
This simplifies the public `Sock` API by having one method less.
c01ae8f5ea Use consistent wording in log (Igor Bubelov)
Pull request description:
It's a trivial change, but it bothers me a bit that two log lines in a row aren't grammatically identical while following exactly the same pattern. I've read `contributing.md` and I'm aware that changes like this are usually being ignored and dropped, but I decided to leave it here anyway in case someone feels the same way about inconsistent log messages or grammar =)
ACKs for top commit:
laanwj:
Code review ACK c01ae8f5ea
Tree-SHA512: d5b3849b3a6e3de7ea9b468c05f17cacd1dbd1aca2f3401b5138383dc8d385cea9e221db558ab472c1c4c7f6921d57dcc7af89a54776c5765fa00e429694b4e7
fa8421bc5b test: Remove from_node from create_self_transfer* MiniWallet helpers (MacroFake)
Pull request description:
MiniWallet is capable to create a transaction without a node, so don't pass it in where not needed.
ACKs for top commit:
kouloumos:
ACK fa8421bc5b
theStack:
ACK fa8421bc5b
Tree-SHA512: d51e2ae6577c1e2bc80386678ff5c7974609e86317850aaec45cdbf0d23076ba1ae76342610c8f90931a6c0971c8e916864442b041a253212e6a9d476d79c541
32e5edc0f4 wallet: avoid extra wtx lookup in AddToSpends (furszy)
Pull request description:
As `AddToSpends` is only called from `AddToWallet` and `LoadToWallet`, places where we insert the wtx into the wallet map, we can directly feed `AddToSpends` with the `wtx` and remove another extra lookup.
ACKs for top commit:
laanwj:
Code review ACK 32e5edc0f4
achow101:
ACK 32e5edc0f4
theStack:
Code-review ACK 32e5edc0f4
w0xlt:
Code Review ACK 32e5edc0f4
brunoerg:
crACK 32e5edc0f4
Tree-SHA512: e9fb8df44c3e3fa26c107d261bf78e45014b4755890a64817f2be62ee6b7751f5dd2813a18dcb103a21ddba1422f9d2d59c4bf186f08314e634365d36b01be8f