Skip to content

[31.x] Backports - #35331

Merged
sedited merged 26 commits into
bitcoin:31.xfrom
fanquake:more_31_x_backports
Jun 22, 2026
Merged

sedited merged 26 commits into
bitcoin:31.xfrom
fanquake:more_31_x_backports

Conversation

Because the corresponding Taproot fields were added in PSBT in PR 22558, so
these restrictions are no longer necessary.

Github-Pull: bitcoin#35279
Rebased-From: 8134857
@fanquake fanquake added this to the 31.1 milestone May 20, 2026
@DrahtBot

DrahtBot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35331.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK sedited, marcofleon

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

LLM Linter (✨ experimental)

Possible typos and grammar issues:

  • use the proxy if overriden -> use the proxy if overridden [misspelling of “overridden”]

Possible places where named args for integral literals may be used (e.g. func(x, /*named_arg=*/0) in C++, and func(x, named_arg=0) in Python):

  • [MaxInputWeight(*desc, CTxIn{outpoint}, coin_control, true, can_grind_r)] in [src/wallet/spend.cpp]

2026-06-22 11:06:46

`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
@fanquake
fanquake force-pushed the more_31_x_backports branch from cf5e44a to 8da939b Compare May 20, 2026 14:28
Cirrus is winding down and github now offers more than 10GB cache.

Switch to GH cache for all runner-types. Simplify docker build arg
construction, and reduce the number of needed action permissions.

Github-Pull: bitcoin#35348
Rebased-From: c03107a
@DrahtBot

Copy link
Copy Markdown
Contributor

🚧 At least one of the CI tasks failed.
Task lint: https://github.com/bitcoin/bitcoin/actions/runs/26580148981/job/78317916896
LLM reason (✨ experimental): CI failed the lint check “subtree” because a subtree directory was modified without a corresponding subtree merge.

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

vasild and others added 8 commits June 19, 2026 18:47
Private broadcast connections use either Tor or I2P, which require a
proxy intrinsically or IPv4 or IPv6 which must use a proxy in the
context of private broadcast to avoid leaking the originator's IP
address.

Add a safety check to guard against future mistakes.

Co-authored-by: Andrew Toth <[email protected]>

Github-Pull: bitcoin#35410
Rebased-From: d01b461
Extract the part of `p2p_private_broadcast.py` that configures and
starts the SOCKS5 server into a reusable function and put it into
`test_framework/socks5.py`.

Use bind port 0 to let the OS pick an available port instead of
hackishly assuming that `p2p_port(N)` is available where N is more
than the number of the nodes the test uses.

Github-Pull: bitcoin#35410
Rebased-From: 2ffa81f
Extract the part of `p2p_private_broadcast.py` that starts
listening on a `P2PConnection` object (or its children classes)
and put it into `test_framework/p2p.py`.

Github-Pull: bitcoin#35410
Rebased-From: 2333be9
Extract the part of `p2p_private_broadcast.py` that fills a given node's
addrman and put it into `test_framework/test_framework.py`.

Github-Pull: bitcoin#35410
Rebased-From: ab35a02
This way callers will not forget to set it.

Github-Pull: bitcoin#35410
Rebased-From: bf0d257
This is no-longer a proper subtree, because of direct cherry-picks.
In WriteSettings(), verify that writing to the stream and closing it
succeeded before returning true. This prevents RenameOver() from replacing
a valid settings.json with a corrupted or zero-byte file when write limits
or a full disk are encountered.

Additionally, update the ReadSettings() parse failure message to mention
power loss, full disk, or storage error as possible causes.

Fixes bitcoin#35373

Github-Pull: bitcoin#35384
Rebased-From: 0654511
@fanquake
fanquake force-pushed the more_31_x_backports branch from 26c6d97 to bc371bb Compare June 19, 2026 16:47
@marcofleon

Copy link
Copy Markdown
Contributor

reACK bc371bbc35a588aa462bcacbfb7b9cd200d47109

l0rinc added 3 commits June 22, 2026 10:39
Add `CDBWrapper::GetProperty()` and expose it through `CCoinsViewDB::GetDBProperty()` so coins tests can inspect LevelDB runtime properties through the coins view.
Use it in a coins DB flush baseline that records the LevelDB layout after flushing while keeping readback coverage for the flushed coin and best block.

Co-authored-by: Andrew Toth <[email protected]>

Github-Pull: bitcoin#35465
Rebased-From: b10889d
Full chainstate flushes are convenient maintenance points for long-term LevelDB cleanup because the chainstate was just written.
Randomize the trigger so nodes that flush near the same height do not compact together.

Add blocking chainstate compaction through `CCoinsViewDB::CompactFull()` and give each post-IBD full flush on the normal chainstate a 1/320 chance to start compaction.
With hourly flushes this averages roughly every two weeks and makes a six-month miss about one in a million.
This keeps the schedule stateless and leaves last-compaction height or timestamp bookkeeping out of chainstate metadata.

Co-authored-by: Andrew Toth <[email protected]>

Github-Pull: bitcoin#35465
Rebased-From: aa021b2
Full chainstate compaction can take minutes on large databases.
Move `CCoinsViewDB::CompactFull()` to a named `utxocompact` one-shot background thread so validation only schedules the work.

When validation selects compaction after a full flush, the chainstate was just written and another write is less likely to be needed immediately.
The coins view destructor waits for completion, and a mutex prevents compaction from using `m_db` while `ResizeCache()` replaces it.

Co-authored-by: Andrew Toth <[email protected]>

Github-Pull: bitcoin#35465
Rebased-From: 394e473

@sedited sedited left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-created ACK ea6c629845a894af3e695b9c23c209f13ded4671

I think Eugene is missing in the credits.

@DrahtBot
DrahtBot requested a review from marcofleon June 22, 2026 10:39
@fanquake
fanquake force-pushed the more_31_x_backports branch from ea6c629 to 39dad14 Compare June 22, 2026 10:42
@fanquake
fanquake force-pushed the more_31_x_backports branch from 39dad14 to c058c29 Compare June 22, 2026 11:06

@sedited sedited left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK c058c29

@marcofleon

Copy link
Copy Markdown
Contributor

ACK c058c29

@sedited
sedited merged commit efde623 into bitcoin:31.x Jun 22, 2026
26 checks passed
@fanquake
fanquake deleted the more_31_x_backports branch June 22, 2026 13:12
@l0rinc

l0rinc commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

ACK c058c29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.