Repository navigation
[29.x] Backports - #35234
[29.x] Backports#35234
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35234. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste LLM Linter (✨ experimental)Possible places where named args for integral literals may be used (e.g.
2026-06-02 15:06:57 |
The FreeBSD, NetBSD, and OpenBSD build guides state that ZMQ support is compiled in when the package is installed. Since WITH_ZMQ defaults to OFF, update the wording to mention the required CMake option. Github-Pull: bitcoin#35283 Rebased-From: ca93ab8
561f53c to
b8b94d3
Compare
`CalculateMaximumSignedInputSize()` is passed the outpoint being sized, but that context was not used when estimating the signed input size. Pass the outpoint through so externally selected inputs are not underestimated. Co-authored-by: Antoine Poinsot <[email protected]> Github-Pull: bitcoin#35228 Rebased-From: cd8d3bd
b8b94d3 to
54edc2b
Compare
54edc2b to
6014ee2
Compare
6014ee2 to
0bc37f4
Compare
0bc37f4 to
be07b75
Compare
f600348 to
3031ebc
Compare
|
#34228 was backported here, but not mentioned in description or in that PR's comments. Likely an oversight? Commit trailers for #34228 and for bitcoin-core/leveldb-subtree#61 are missing. Lint fails due to not updating the leveldb subtree. I guess that's ok? Also this comment in the 30.x backport PR applies here as well I believe #35232 (comment). |
Github-Pull: bitcoin#34228 Rebased-From: 9f7a229
Seek compaction is causing a cascade effect in the chainstate DB, causing large parts of the database to be rewritten every ~hour. Every periodic flush writes around 2 MiB. Since this is roughly the `write_buffer_size`, these writes regularly cause the memtable to rotate into a small L0 file. This file has a small seek budget, and with the random UTXO reads done during validation, it can get scheduled for seek compaction quickly. That seek compaction pushes the small file down to L1. Since most UTXOs are already lower down in L4/L5, many reads that consult this file do not find the key there and continue downward. The bloom filter makes those misses cheap, but LevelDB still decrements the file's seek budget. The file then gets scheduled for another seek compaction, and the same pattern pushes it down through L2 and L3. The expensive part happens around L3/L4. L4 has many ~32 MiB files holding the bulk of the UTXO set. When LevelDB compacts into L3, it may split the output into many smaller L3 files to limit how much L4 "grandparent" data any one output overlaps. Each of these small L3 files then gets its own small seek budget. Because chainstate keys are hash-random, each small L3 file can still have a broad key range, so many random reads consult it and quickly drain its budget. Once seek-compacted into L4, each tiny L3 file can overlap many L4 files, so compacting a few hundred KiB from L3 can require rewriting hundreds of MiB from L4. Repeating that across many small L3 files can rewrite most of the chainstate. This is a poor fit for chainstate because UTXO keys are hash-random, the DB is large enough to have many levels, writes are relatively small and periodic, and reads are frequent. The result is that read misses trigger compactions much earlier than size pressure would, and those compactions have very high write amplification. Disabling seek compaction may leave more files in upper levels for longer, so reads could theoretically consult more files. But Bitcoin Core enables bloom filters for all its LevelDB instances, so these misses are usually cheap in-memory filter checks rather than disk reads. For the other DBs, the risk is much smaller. They also use bloom filters, and most are smaller and less read-heavy. With fewer levels and less random read pressure, disabling seek compaction should have little effect there. Co-authored-by: l0rinc <[email protected]> Github-Pull: bitcoin#35313 Rebased-From: 6bfdb6093bba4710d0f8313ed0113967a8b5176f
Github-Pull: bitcoin#35378 Rebased-From: 4bdd46a
Github-Pull: bitcoin#35408 Rebased-From: 265563b
To match the usage of -latest for the warp runners. Github-Pull: bitcoin#35408 Rebased-From: 5700a61
3031ebc to
a7f22d1
Compare
|
@andrewtoth thanks, should all be addressed. |
a7f22d1 to
d8da418
Compare
88cd3a7 doc: update manual pages for v29.4rc1 (fanquake) 116565b build: bump version to v29.4rc1 (fanquake) d82afa9 doc: update release notes for v29.4rc1 (fanquake) ea8fafd fuzz: Remove unused g_setup pointers (MarcoFalke) 1907b3f coins: compact chainstate in background (Lőrinc) 9dd8e32 validation: randomly compact chainstate (Lőrinc) e0ab4cf coins: test chainstate flush baseline (Lőrinc) 53a5c7f lint: disable leveldb subtree check (fanquake) Pull request description: Backports: * #35465 Final changes for v`29.4rc1`. Backports since 29.3: * #34680 * #34855 * #35212 * #35234 ACKs for top commit: sedited: ACK 88cd3a7 Tree-SHA512: 57d647f0baf124128d84072c3865cca72ca4a266e95f88b8e1313230aa70a25d76d372e042b095312325b57983805943179d46bfa898522303e90adb69c74347
Backports:
SOURCE_DATE_EPOCHingen_idscript #34228outpointwhen estimating input size #35228