Commit Graph

29062 Commits

Author SHA1 Message Date
Ryan Ofsky
c065bcd2d7 init: Signal m_tip_block_cv on Ctrl-C
Signal m_tip_block_cv when Ctrl-C is pressed or SIGTERM is received, the same
way it is currently signalled when the `stop` RPC is called. This lets RPC
calls like `waitforblockheight` and IPC calls like `waitTipChanged` be
interrupted, instead of waiting for their original timeouts and delaying
shutdown.

Historical notes:

- The behavior where `stop` RPC signals `m_tip_block_cv`, but CTRL-C does not,
  has been around since the condition variable was introduced in #30409
  (7eccdaf160).
- The signaling was later moved without changing behavior in #30967
  (5ca28ef28b). This commit moves it again to
  the Interrupt() function, which is probably the place it should have been
  added initially, so it works for Ctrl-C shutdowns as well as `stop`
  shutdowns.
- A Qt shutdown bug calling wait methods was fixed previously in #18452
  (da73f1513a), and this change updates that
  fix to avoid the hang happening again in Qt.

Github-Pull: #33511
Rebased-From: c25a5e670b
2026-01-05 12:07:02 +00:00
brunoerg
f620dde411 fuzz: doc: remove any mention to address_deserialize_v2
Github-Pull: #34091
Rebased-From: caf4843a59
2025-12-31 12:30:48 +00:00
SatsAndSports
18f3ada037 Remove unreliable seed from chainparams.cpp, and the associated README
Github-Pull: #33723
Rebased-From: b0c706795c
2025-12-05 09:46:37 +00:00
glozow
ab58b2c0f8 [wallet] never try to spend from unconfirmed TRUC that already has ancestors
Github-Pull: #33528
Rebased-From: e753fadfd0
2025-12-05 09:46:32 +00:00
ismaelsadeeq
39d53dd8bf interfaces: add interruptWait method
- This method can be used to cancel a running
  waitNext().

- This commit also adds a test case for interruptWait method

Github-Pull: #33676
Rebased-From: dcb56fd4cb
2025-11-26 16:49:06 +00:00
Hennadii Stepanov
c0d851e6c6 qt: Modernize custom filtering
In `QSortFilterProxyModel`, `invalidateFilter()` is scheduled for
deprecation in Qt 6.13.
`beginFilterChange()` was introduced in Qt 6.9.
`endFilterChange()` was introduced in Qt 6.10.

Github-Pull: gui#899
Rebased-From: e15e8cbada
2025-11-05 09:52:41 +00:00
WakeTrainDev
049bf100f1 qt: add createwallet, createwalletdescriptor, and migratewallet to history filter
Github-Pull: #gui901
Rebased-From: 4e352efa2c
2025-11-04 11:40:15 +00:00
Sjors Provoost
3afd5a9729 miner: fix empty mempool case for waitNext()
Block template fees are calculated by looping over new_tmpl->vTxFees
and return (early) once the fee_threshold is exceeded.

This left an edge case when the mempool is empty, which this commit
fixes and adds a test for. It does so by using std::accumulate instead
of manual loops.

Also update interface_ipc.py to account for the new behavior.

Co-authored-by: Raimo33 <claudio.raimondi@protonmail.com>

Github-Pull: #33566
Rebased-From: 8f7673257a
2025-10-23 15:36:56 +02:00
Ryan Ofsky
23ac752d09 bitcoin: Make wrapper not require -m
Choose the right binary by default if an IPC option is specified

Github-Pull: #33229
Rebased-From: 453b0fa286
2025-10-17 15:43:25 +01:00
Ryan Ofsky
42d4847fdf init: add exe name to bitcoind, bitcoin-node -version output to be able to distinguish these in tests
Github-Pull: #33229
Rebased-From: 0972f55040
2025-10-17 15:43:18 +01:00
glozow
96110f8846 [doc] correct topology requirements in submitpackage helptext
Github-Pull: #33630
Rebased-From: 3d22282564
2025-10-17 15:17:37 +01:00
Cory Fields
729e4c2abd multiprocess: align our logging with libmultiprocess's
Without this change, logging (even if unused) may account for a
substantial portion of bitcoin-node's and/or client's runtime cpu usage, due
to libmultiprocess's expensive message serialization.

This (along with some recent upstream changes) avoids the overhead by opting
out of log handling for messages that we're not interested in.

Info, Warning, and Error are logged unconditionally to match our behavior
elsewhere. See BCLog::Logger::GetCategoryLogLevel .

Github-Pull: #33517
Rebased-From: 0626b90f50
2025-10-16 09:55:12 +01:00
Cory Fields
f8db6f6ce7 multiprocess: update multiprocess EventLoop construction to use options
This uses the constructors recently added upstream.

Github-Pull: #33517
Rebased-From: 9d068225ee
2025-10-16 09:55:09 +01:00
merge-script
a14e7b9dee Merge bitcoin/bitcoin#33519: Update libmultiprocess subtree in 30.x branch
abcd4c4ff9 Squashed 'src/ipc/libmultiprocess/' changes from 13424cf2ecc1..a4f929696490 (Ryan Ofsky)

Pull request description:

  Includes:

  - https://github.com/bitcoin-core/libmultiprocess/pull/207
  - https://github.com/bitcoin-core/libmultiprocess/pull/208
  - https://github.com/bitcoin-core/libmultiprocess/pull/211
  - https://github.com/bitcoin-core/libmultiprocess/pull/201
  - https://github.com/bitcoin-core/libmultiprocess/pull/213
  - https://github.com/bitcoin-core/libmultiprocess/pull/214
  - https://github.com/bitcoin-core/libmultiprocess/pull/221
  - https://github.com/bitcoin-core/libmultiprocess/pull/220
  - https://github.com/bitcoin-core/libmultiprocess/pull/222
  - https://github.com/bitcoin-core/libmultiprocess/pull/224

  Corresponding to #32641 and #33518 in master.

  The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh)

  They can also be verified by checking `src/ipc/libmultiprocess/` contents are the same in master. (See also #33439).

ACKs for top commit:
  Sjors:
    ACK ae63cc4bf2
  theuni:
    ACK ae63cc4bf2 . Verified that it's the same as what's in master.

Tree-SHA512: 6c9462d5fb9201ee8ace900d7d02bfb6d0c7aa3d2f22475dc55e55e0239e2d20ed69f572c0df233da7910375e9d8ccaf3e84bf949ae92df27b88f16adb26dd7a
2025-10-16 09:53:04 +01:00
Ryan Ofsky
ae63cc4bf2 Merge commit 'abcd4c4ff928a7af280ca271f8a939367fc4e09a' into pr/subtree-6-v30 2025-10-07 10:12:08 -04:00
Ryan Ofsky
abcd4c4ff9 Squashed 'src/ipc/libmultiprocess/' changes from 13424cf2ecc1..a4f929696490
a4f929696490 Merge bitcoin-core/libmultiprocess#224: doc: fix typos
f4344ae87da0 Merge bitcoin-core/libmultiprocess#222: test, ci: Fix threadsanitizer errors in mptest
1434642b3804 doc: fix typos
73d22ba2e930 test: Fix tsan race in thread busy test
b74e1bba014d ci: Use tsan-instrumented cap'n proto in sanitizers job
c332774409ad test: Fix failing exception check in new thread busy test
ca3c05d56709 test: Use KJ_LOG instead of std::cout for logging
7eb1da120ab6 ci: Use tsan-instrumented libcxx in sanitizers job
ec86e4336e98 Merge bitcoin-core/libmultiprocess#220: Add log levels and advertise them to users via logging callback
515ce93ad349 Logging: Pass LogData struct to logging callback
213574ccc43d Logging: reclassify remaining log messages
e4de0412b430 Logging: Break out expensive log messages and classify them as Trace
408874a78fdc Logging: Use new logging macros
67b092d835cd Logging: Disable logging if messsage level is less than the requested level
d0a1ba7ebf21 Logging: add log levels to mirror Core's
463a8296d188 Logging: Disable moving or copying Logger
83a2e10c0b03 Logging: Add an EventLoop constructor to allow for user-specified log options
58cf47a7fc8c Merge bitcoin-core/libmultiprocess#221: test default PassField impl handles output parameters
db03a663f514 Merge bitcoin-core/libmultiprocess#214: Fix crash on simultaneous IPC calls using the same thread
afcc40b0f1e8 Merge bitcoin-core/libmultiprocess#213: util+doc: Clearer errors when attempting to run examples + polished docs
6db669628387 test In|Out parameter
29cf2ada75ea test default PassField impl handles output parameters
1238170f68e8 test: simultaneous IPC calls using same thread
eb069ab75d83 Fix crash on simultaneous IPC calls using the same thread
ec03a9639ab5 doc: Precision and typos
2b4348193551 doc: Where possible, remove links to ryanofsky/bitcoin/
286fe469c9c9 util: Add helpful error message when failing to execute file
47d79db8a552 Merge bitcoin-core/libmultiprocess#201: bug: fix mptest hang, ProxyClient<Thread> deadlock in disconnect handler
f15ae9c9b9fb Merge bitcoin-core/libmultiprocess#211: Add .gitignore
4a269b21b8c8 bug: fix ProxyClient<Thread> deadlock if disconnected as IPC call is returning
85df96482c49 Use try_emplace in SetThread instead of threads.find
ca9b380ea91a Use std::optional in ConnThreads to allow shortening locks
9b0799113557 doc: describe ThreadContext struct and synchronization requirements
d60db601ed9b proxy-io.h: add Waiter::m_mutex thread safety annotations
4e365b019a9f ci: Use -Wthread-safety not -Wthread-safety-analysis
15d7bafbb001 Add .gitignore
fe1cd8c76131 Merge bitcoin-core/libmultiprocess#208: ci: Test minimum cmake version in olddeps job
b713a0b7bfbc Merge bitcoin-core/libmultiprocess#207: ci: output CMake version in CI script
0f580397c913 ci: Test minimum cmake version in olddeps job
d603dcc0eef0 ci: output CMake version in CI script

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: a4f92969649018ca70f949a09148bccfeaecd99a
2025-10-07 10:12:08 -04:00
merge-script
d5e0077bef Merge bitcoin/bitcoin#33473: [30.x] Backports & rc3
4e869a67aa doc: update example bitcoin conf for 30.0rc3 (fanquake)
a2ac6cce57 doc: update manual pages for v30.0rc3 (fanquake)
e4b568917c build: bump version to v30.0rc3 (fanquake)
f957c2171d contrib: fix using macdploy script without translations. (amisha)
1eb578045d depends: static libxcb_cursor (fanquake)
e4f9ec2f05 test: add more TRUC reorg coverge (Greg Sanders)
3485252584 Mempool: Do not enforce TRUC checks on reorg (Greg Sanders)
a3a1dcb589 fuzz: don't bypass_limits for most mempool harnesses (Greg Sanders)
fce1c60770 datacarrier: Undeprecate configuration option (Anthony Towns)
b75afaccb8 doc: rpc: fix case typo in `finalizepsbt` help (final_scriptwitness) (Sebastian Falbesoner)
45703931e5 miner: fix `addPackageTxs` unsigned integer overflow (ismaelsadeeq)
1e348bc55a rpc: fix getblock(header) returns target for tip (Sjors Provoost)
4ec30d53ec test: add block 2016 to mock mainnet (Sjors Provoost)

Pull request description:

  Backports:
  * #33434
  * #33446
  * #33453
  * #33475
  * #33482
  * #33484
  * #33504

  Includes changes for `v30.0rc3`:
  * Version bump
  * Regen manpages
  * Regen exmaple .conf

ACKs for top commit:
  marcofleon:
    lgtm ACK 4e869a67aa
  dergoegge:
    ACK 4e869a67aa
  hebasto:
    ACK 4e869a67aa, I agree on the backported PRs. I've reproduced locally all backports, the manpages update, and the example `bitcoin.conf` updated, and obtained zero diff with this PR.
  Zero-1729:
    LGTM ACK 4e869a67aa

Tree-SHA512: 90bffbb6dfe2b512167b5e08253ea163b714505ec3ef2247d798c40b30713a7db13cf0b5486b5f9e0e5b3ba53108dfaeea47276c40816eeb81065d42bd402379
2025-10-06 10:37:26 +01:00
Hennadii Stepanov
71ee0163de qt: 30.0rc3 translations update 2025-10-05 11:53:45 +01:00
Greg Sanders
3485252584 Mempool: Do not enforce TRUC checks on reorg
Not enforcing TRUC topology on reorg was the intended
behavior, but the appropriate bypass argument was not
checked.

This mistake means we could potentially invalidate a long
chain of perfectly incentive-compatible transactions that
were made historically, including subsequent non-TRUC
transactions, all of which may have been very high feerate.

Lastly, it wastes CPU cycles doing topology checks since
this behavior cannot actually enforce the topology in
general for the reorg setting.

Github-Pull: #33504
Rebased-From: 26e71c237d
2025-10-02 13:55:58 +01:00
Greg Sanders
a3a1dcb589 fuzz: don't bypass_limits for most mempool harnesses
Using bypass_limits=true is essentially fuzzing part of a
reorg only, and results in TRUC invariants unable to be
checked. Remove most instances of bypassing limits, leaving
one harness able to do so.

Github-Pull: #33504
Rebased-From: bbe8e9063c
2025-10-02 13:55:33 +01:00
Anthony Towns
fce1c60770 datacarrier: Undeprecate configuration option
Reverts commit 0b4048c733

Github-Pull: #33453
Rebased-From: 451ba9ada4
2025-09-30 18:37:37 -04:00
Sebastian Falbesoner
b75afaccb8 doc: rpc: fix case typo in finalizepsbt help (final_scriptwitness)
Github-Pull: #33484
Rebased-From: ff05bebcc4
2025-09-28 18:14:03 -04:00
ismaelsadeeq
45703931e5 miner: fix addPackageTxs unsigned integer overflow
Github-Pull: #33475
Rebased-From: b807dfcdc5
2025-09-25 08:19:33 -04:00
Sjors Provoost
1e348bc55a rpc: fix getblock(header) returns target for tip
A target field was added to the getblock and getblockheader RPC calls in bitcoin#31583, but it mistakingly always used the tip value.

Because regtest does not have difficulty adjustment, a test is added for mainnet instead.

Github-Pull: #33446
Rebased-From: bf7996cbc3
2025-09-24 10:09:25 -04:00
Lőrinc
acf7d53ace test: split out system_ram_tests to signal when total ram cannot be determined
when `GetTotalRAM` returns an `std::nullopt` now we're getting:
```
The following tests did not run:
        106 - system_ram_tests (Skipped)
```

GitHub-Pull: #33435
Rebased-From: 56791b5829
2025-09-23 10:20:06 -04:00
Vasil Dimov
ce56548c63 system: improve handling around GetTotalRAM()
This patch achieves two things:
1. Fix unused variable warning (https://github.com/bitcoin/bitcoin/pull/33333#discussion_r2362493046)
2. Enable GetTotalRAM() on other platforms where it was tested to work.

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>

Github-Pull: #33435
Rebased-From: 337a6e7386
2025-09-23 10:20:06 -04:00
Lőrinc
5226a92f28 coins: warn on oversized -dbcache
Oversized allocations can cause out-of-memory errors or [heavy swapping](https://github.com/getumbrel/umbrel-os/issues/64#issuecomment-663637321), [grinding the system to a halt](https://x.com/murchandamus/status/1964432335849607224).

`LogOversizedDbCache()` now emits a startup warning if the configured `-dbcache` exceeds a cap derived from system RAM, using the same parsing/clamping as cache sizing via CalculateDbCacheBytes(). This isn't meant as a recommended setting, rather a likely upper limit.

Note that we're not modifying the set value, just issuing a warning.
Also note that the 75% calculation is rounded for the last two numbers since we have to divide first before multiplying, otherwise we wouldn't stay inside size_t on 32-bit systems - and this was simpler than casting back and forth.

We could have chosen the remaining free memory for the warning (e.g. warn if free memory is less than 1 GiB), but this is just a heuristic, we assumed that on systems with a lot of memory, other processes are also running, while memory constrained ones run only Core.

If total RAM < 2 GiB, cap is `DEFAULT_DB_CACHE` (`450 MiB`), otherwise it's 75% of total RAM.
The threshold is chosen to be close to values commonly used in [raspiblitz](https://github.com/raspiblitz/raspiblitz/blob/dev/home.admin/_provision.setup.sh#L98-L115) for common setups:

| Total RAM | `dbcache` (MiB) | raspiblitz % | proposed cap (MiB) |
|----------:|----------------:|-------------:|-------------------:|
|     1 GiB |             512 |        50.0% |               450* |
|     2 GiB |            1536 |        75.0% |               1536 |
|     4 GiB |            2560 |        62.5% |               3072 |
|     8 GiB |            4096 |        50.0% |               6144 |
|    16 GiB |            4096 |        25.0% |              12288 |
|    32 GiB |            4096 |        12.5% |              24576 |

[Umbrel issues](https://github.com/getumbrel/umbrel-os/issues/64#issuecomment-663816367) also mention 75% being the upper limit.

Starting `bitcoind` on an 8 GiB rpi4b with a dbcache of 7 GiB:
> ./build/bin/bitcoind -dbcache=7000

warns now as follows:
```
2025-09-07T17:24:29Z [warning] A 7000 MiB dbcache may be too large for a system memory of only 7800 MiB.
2025-09-07T17:24:29Z Cache configuration:
2025-09-07T17:24:29Z * Using 2.0 MiB for block index database
2025-09-07T17:24:29Z * Using 8.0 MiB for chain state database
2025-09-07T17:24:29Z * Using 6990.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
```

Besides the [godbolt](https://godbolt.org/z/EPsaE3xTj) reproducers for the new total memory method, we also tested the warnings manually on:
- [x] Apple M4 Max, macOS 15.6.1
- [x] Intel Core i9-9900K, Ubuntu 24.04.2 LTS
- [x] Raspberry Pi 4 Model B, Armbian Linux 6.12.22-current-bcm2711
- [x] Intel Xeon x64, Windows 11 Home Version 24H2, OS Build 26100.4351

Co-authored-by: stickies-v <stickies-v@protonmail.com>
Co-authored-by: Hodlinator <172445034+hodlinator@users.noreply.github.com>
Co-authored-by: w0xlt <woltx@protonmail.com>

Github-Pull: #33333
Rebased-From: 168360f4ae
2025-09-23 10:20:06 -04:00
Lőrinc
49d4ebcbfe system: add helper for fetching total system memory
Added a minimal system helper to query total physical RAM on [Linux/macOS/Windows](https://stackoverflow.com/a/2513561) (on other platforms we just return an empty optional).

The added test checks if the value is roughly correct by checking if the CI platforms are returning any value and if the value is at least 1 GiB and not more than 10 TiB.

The max value is only validated on 64 bits, since it's not unreasonable for 32 bits to have max memory, but on 64 bits it's likely an error.

https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex
> ullTotalPhys The amount of actual physical memory, in bytes.

https://man7.org/linux/man-pages/man3/sysconf.3.html:
> _SC_PHYS_PAGES The number of pages of physical memory. Note that it is possible for the product of this value and the value of _SC_PAGESIZE to overflow.
> _SC_PAGESIZE Size of a page in bytes. Must not be less than 1.

See https://godbolt.org/z/ec81Tjvrj for further details

Github-Pull: #33333
Rebased-From: 6c720459be
2025-09-23 10:20:06 -04:00
Anthony Towns
1bc3be1962 p2p: Increase tx relay rate
In the presence of smaller transactions on the network, blocks can sustain a
higher relay rate than 7tx/second. In this event, the per-peer inventory queues
can grow too large.

This commit bumps the rate up to 14 tx/s (for inbound peers), increasing the
safety margin by a factor of 2.

Outbound peers continue to receive relayed transactions at 2.5x the rate of
inbound peers, for a rate of 35tx/second.

Co-Authored-By: Suhas Daftuar <sdaftuar@gmail.com>

Github-Pull: #28592
Rebased-From: b81f37031c
2025-09-23 10:20:05 -04:00
Hennadii Stepanov
33a0d4bb5b qt: 30.0rc2 translations update 2025-09-21 21:38:11 +01:00
Hennadii Stepanov
c9f751090c cmake: Install bitcoin manpage
Github-Pull: #33407
Rebased-From: 7584a4fda9
2025-09-17 09:58:49 +01:00
Martin Zumsande
2327b2b0db net: Do not apply whitelist permission to onion inbounds
Tor inbound connections do not reveal the peer's actual network address.
Therefore do not apply whitelist permissions to them.

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>

Github-Pull: #33395
Rebased-From: f563ce9081
2025-09-17 09:58:25 +01:00
Ryan Ofsky
3ae592537d test: Prevent disk space warning during node_init_tests
mzumsande pointed out https://github.com/bitcoin/bitcoin/pull/32345#issuecomment-3286964369 that this test was causing a warning:

   Warning: Disk space for "/tmp/test_common bitcoin/node_init_tests/init_test/bf78678cb7723a3e84b5/blocks" may not accommodate the block files. Approximately 810 GB of data will be stored in this directory.

Fix by setting regtest instead of mainnet network before running the test.

Github-Pull: #33391
Rebased-From: bdf01c6f61
2025-09-16 09:49:48 +01:00
Ava Chow
75026cddea wallet: Add m_cached_from_me to cache "from me" status
m_cached_from_me is used to track whether a transaction is "from me", i.e. has
any inputs which belong to the wallet. This is held in memory only in
the same way that a transaction's balances are.

Github-Pull: #33268
Rebased-From: 113a422822
2025-09-12 14:52:45 +01:00
Ava Chow
b85dc7ed3a wallet: Throw an error in sendall if the tx size cannot be calculated
Github-Pull: #33268
Rebased-From: c40dc822d7
2025-09-12 14:51:51 +01:00
Ava Chow
d2be9a22d8 wallet: Determine IsFromMe by checking for TXOs of inputs
Instead of checking whether the total amount of inputs known by the
wallet is greater than 0, we should be checking for whether the input is
known by the wallet. This enables us to determine whether a transaction
spends an of output with an amount of 0, which is necessary for marking
0-value dust outputs as spent.

Github-Pull: #33268
Rebased-From: 39a7dbdd27
2025-09-12 14:48:15 +01:00
Luke Dashjr
35038b03c9 trace: Workaround GCC bug compiling with old systemtap
Github-Pull: #33310
Rebased-From: 93a29ff283
2025-09-12 11:50:28 +01:00
David Gumberg
6b19ede1a5 gui: Avoid pathological QT text/markdown behavior...
during text selection by only setting plaintext mime data.

Github-Pull: https://github.com/bitcoin-core/gui/pull/886
Rebased-From: 6a371b70c8
2025-09-10 12:43:27 +01:00
merge-script
84cf542039 Merge bitcoin/bitcoin#33275: Release: 30.0 translations update
b320f5efa1 qt: 30.0 translations update (Hennadii Stepanov)

Pull request description:

  This PR follows our [Release Process](53a996f122/doc/release-process.md) and concludes the translation-specific efforts for this release cycle. It follows two previous translation-related PRs, https://github.com/bitcoin/bitcoin/pull/33152 and https://github.com/bitcoin/bitcoin/pull/33193.

  It is one of the steps required _before_ branch-off, as scheduled in https://github.com/bitcoin/bitcoin/issues/32275.

  A previous similar PR: https://github.com/bitcoin/bitcoin/pull/32004.

  **Notes for reviewers:**
  1. The actual translations on Transifex is a moving target. As a result, your diff after running [`bitcoin-maintainer-tools/update-translations.py`](https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py) may differ.

  2. The Polish translation update has been discarded. See https://github.com/bitcoin/bitcoin/pull/33275#issuecomment-3265688565 and https://github.com/bitcoin/bitcoin/pull/33275#issuecomment-3265829027.

ACKs for top commit:
  fanquake:
    ACK b320f5efa1

Tree-SHA512: 3e34c0fc7471dd27deeff2c871baa523e8741724e2aee5ed8afdf90263904f489dd77df849953425c9f0395dc23932dc4729646e0e4445f53225683f4f635087
2025-09-09 10:20:05 +01:00
merge-script
9cbd346daa Merge bitcoin/bitcoin#33340: Fix benchmark CSV output
790b440197 Fix benchmark CSV output (Hennadii Stepanov)

Pull request description:

  The `SHA256AutoDetect` return output is used, among other use cases, to name benchmarks. Using a comma breaks the `bench_bitcoin` CSV output.

  This PR replaces the comma with a semicolon, which fixes https://github.com/bitcoin/bitcoin/issues/33331.

ACKs for top commit:
  Raimo33:
    Code Review ACK 790b440197
  l0rinc:
    Code review ACK 790b440197
  janb84:
    code review ACK 790b440197

Tree-SHA512: 096bfa29a0639a4d97d510a3e2a15f071f384148c3035e4d0fc525794682e499c45a0d0c95728d5c78010098393b2c486a7fa9c21c1e2fbb600dea7c5638a55f
2025-09-09 10:11:29 +01:00
Ava Chow
0ba44d9c38 Merge bitcoin/bitcoin#33296: net: check for empty header before calling FillBlock
8b62647680 test: send duplicate blocktxn message in p2p_compactblocks.py (Eugene Siegel)
5e585a0fc4 net: check for empty header before calling FillBlock (Eugene Siegel)

Pull request description:

  This avoids an Assume crash if multiple blocktxn messages are received. The first call to `FillBlock` would make the header empty via `SetNull` and the call right before the second `FillBlock` would crash [here](689a321976/src/net_processing.cpp (L3333)) since `LookupBlockIndex` won't find anything. Fix that by checking for an empty header before the Assume.

ACKs for top commit:
  instagibbs:
    reACK 8b62647680
  fjahr:
    tACK 8b62647680
  achow101:
    ACK 8b62647680
  mzumsande:
    Code Review ACK 8b62647680

Tree-SHA512: d43a6f652161d4f7e6137f207a3e95259fc51509279d20347b1698c91179c39c8fcb75d2668b13a6b220f478a03578573208a415804be1d8843acb057fa1a73a
2025-09-08 17:16:28 -07:00
Ava Chow
1861030bea Merge bitcoin/bitcoin#30469: index: Fix coinstats overflow
c767974811 clang-tidy: Fix critical warnings (Fabian Jahr)
54dc34ec22 index: Remove unused coinstatsindex recovery code (Fabian Jahr)
37c4fba1f4 index: Check BIP30 blocks when rewinding Coinstatsindex (Fabian Jahr)
51df9de8e5 doc: Add release note for 30469 (Fabian Jahr)
bb8d673183 test: Add coinstatsindex compatibility test (Fabian Jahr)
b2e8b64ddc index, refactor: Append blocks to coinstatsindex without db read (Fabian Jahr)
431a076ae6 index: Fix coinstatsindex overflow issue (Fabian Jahr)
84e813a02b index, refactor: DRY coinbase check (Fabian Jahr)
fab842b324 index, refactor: Rename ReverseBlock to RevertBlock (Fabian Jahr)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/26362

  This continues the work that was started with #26426. It fixes the overflow issue by switching the tracked values that are in danger of overflowing from `CAmount` to `arith_uint256`.

  The current approach opts for a simple solution to ensure compatibility with datadirs including the previous version of the index: The new version of the index goes into a separate location in the datadir (`index/coinstatsindex/` rather than `index/coinstats/` before, the new naming is more consistent with the naming of the other indexes). There is no explicit concept of versioning of the index which earlier versions of this PR had. Having the two different versions of the index in separate places allows for downgrading of the node without having to rebuild the index. However, there will be a warning printed in the logs if the new code (v30) detects the old index still being present. A future version could delete a left-over legacy index automatically.

  The PR also includes several minor improvements but most notably it lets new entries be calculated and stored without needing to read any DB records.

ACKs for top commit:
  achow101:
    ACK c767974811
  TheCharlatan:
    ACK c767974811
  mzumsande:
    Tested / Code Review ACK c767974811

Tree-SHA512: 3fa4a19dd1a01c1b01390247bc9daa6871eece7c1899eac976e0cc21ede09c79c65f758d14daafc46a43c4ddd7055c85fb28ff03029132d48936b248639c6ab9
2025-09-08 17:06:30 -07:00
Eugene Siegel
5e585a0fc4 net: check for empty header before calling FillBlock
Previously in debug builds, this would cause an Assume crash if
FillBlock had been called previously. This could happen when multiple
blocktxn messages were received.

Co-Authored-By: Greg Sanders <gsanders87@gmail.com>
2025-09-08 17:03:24 -04:00
Ava Chow
cb825a07ac Merge bitcoin/bitcoin#33338: net: Add interrupt to pcp retry loop
188de70c86 net: Add interrupt to pcp retry loop (TheCharlatan)

Pull request description:

  Without this interrupt bitcoind takes a long time to exit if requested to do so after a failed pcp lookup on startup.

ACKs for top commit:
  achow101:
    ACK 188de70c86
  fjahr:
    utACK 188de70c86
  hodlinator:
    utACK 188de70c86

Tree-SHA512: 426dabd10ac0ef5de246c83d281ba70957e4032d251054aa6028b4d7ce4e35cd35ac70e67dc07bd418673bcdd2f4457b76f174ac5e7d0dd3caa05de5da952dac
2025-09-08 13:44:44 -07:00
Ava Chow
0b0bd74c3e Merge bitcoin/bitcoin#33312: clang-tidy: Disable UndefinedBinaryOperatorResult check in src/ipc
589b65f06c clang-tidy: Disable `UndefinedBinaryOperatorResult` check in `src/ipc` (Hennadii Stepanov)

Pull request description:

  The warnings are false positive and have been fixed upstream. See: https://github.com/capnproto/capnproto/pull/2334.

  This PR:

  1. Disables the `UndefinedBinaryOperatorResult` clang-tidy check for source files generated by the `mpgen` tool.

  2. Is an alternative to the draft https://github.com/bitcoin/bitcoin/pull/33281.

  3. Fixes https://github.com/bitcoin/bitcoin/issues/33256.

ACKs for top commit:
  Sjors:
    ACK 589b65f06c
  fjahr:
    ACK 589b65f06c
  achow101:
    ACK 589b65f06c
  ryanofsky:
    Code review ACK 589b65f06c. Thanks for the fix!

Tree-SHA512: 6d376a82641a5b85d4dd1fa164fdcbd8e15f1262e7d4f582f4d9959031d35852e28ff1b8268336e39ba6779fdd10ecdb986af42407d0545f4217f41d64556272
2025-09-08 13:28:01 -07:00
Hennadii Stepanov
790b440197 Fix benchmark CSV output
The `SHA256AutoDetect` return output is used, among other use cases, to
name benchmarks. Using a comma breaks the CSV output.

This change replaces the comma with a semicolon, which fixes the issue.
2025-09-08 18:39:55 +01:00
Hennadii Stepanov
b320f5efa1 qt: 30.0 translations update 2025-09-08 12:24:41 +01:00
merge-script
2d799590fe Merge bitcoin/bitcoin#33283: contrib: update fixed seeds
939678940f contrib: update fixed seeds (fanquake)
6cdd8ee676 contrib: update makeseeds minblocks (fanquake)
b8da9f4034 contrib: update makeseeds UA regex (fanquake)

Pull request description:

  Update the fixed seeds pre 30 branch off.

ACKs for top commit:
  dergoegge:
    ACK 939678940f
  marcofleon:
    ACK 939678940f

Tree-SHA512: 7488f895a9c5a5fc115dd9fffced6e4846a238feef30a70795e189e4167404286e4142d93f91b62e0c765fb798bbbfb09c7b8194e8bdac1b480b230c58b66044
2025-09-08 10:32:52 +01:00
TheCharlatan
188de70c86 net: Add interrupt to pcp retry loop
Without this interrupt bitcoind takes a long time to exit if requested
to do so after a failed pcp lookup on startup.
2025-09-08 11:18:51 +02:00
merge-script
9c6fa07b12 Merge bitcoin/bitcoin#33322: Update libmultiprocess subtree to improve build and logs
a334bbe9b7 Squashed 'src/ipc/libmultiprocess/' changes from 1b8d4a6f1e54..13424cf2ecc1 (Ryan Ofsky)

Pull request description:

  Includes:

  - https://github.com/bitcoin-core/libmultiprocess/pull/197
  - https://github.com/bitcoin-core/libmultiprocess/pull/202
  - https://github.com/bitcoin-core/libmultiprocess/pull/203
  - https://github.com/bitcoin-core/libmultiprocess/pull/200
  - https://github.com/bitcoin-core/libmultiprocess/pull/205

  These changes should give better feedback when there are build errors, and also make IPC logs more readable.

  The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh)

ACKs for top commit:
  Sjors:
    ACK a4ee70e5b6

Tree-SHA512: ddddd0ed44522ade98a5b94f44b57210794d64f8c378a00438082b8c377f41e9b86c0c5ed29add45472549758f7478ab220af8e268b90b30f57a236c639497d3
2025-09-08 10:05:27 +01:00