WIP: [32.x] Backports

bitcoin/bitcoin: PR #36727

1 minor finding

Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.

Findings

Link

[minor] · The #36848 backport removes idle-deadline coverage without its replacements

Source inspection shows that the 32.x backport lets late idle disconnects pass interface_http.py: it removes the upper bound without the socket timeout or deterministic unit coverage cited by the new comment.

Location: test/functional/interface_http.py:97 (head).

Details and suggested fix

With -rpcservertimeout=2, an idle connection closing after ten seconds now satisfies expect_timeout, whereas base rejected it through duration <= seconds + 2. Upstream has the safeguards cited here, but 32.x constructs HTTPConnection without a timeout, neither caller invokes set_timeout, and httpserver_tests.cpp does not check the idle deadline with a mocked clock. Waiting indefinitely for a server that never disconnects is pre-existing, not a regression introduced here. Before dropping the upper bound, backport equivalent finite socket timeouts and mock-clock idle-deadline coverage so the comment accurately describes the target branch.


Backport verdict: Incomplete

I checked all 10 original commits from the 8 PRs. Nine apply faithfully and work on the 32.x branch. The #36615, #36617, #36405 and #36869 patches are byte-identical. #36701 and the two #36406 commits differ only by context or stacking. #36539 keeps its code changes and moves its release-note fragment into doc/release-notes.md, which is a sound adaptation. The problem is #36848 (75a23e7d → ef37fd2008). It removes the only upper-bound check on the idle-timeout disconnect in interface_http.py. Upstream could do that because two other checks cover the case, and the new comment says so: a socket timeout set to rpc_timeout, and the mock-clock test http_should_disconnect_tests in httpserver_tests. Neither exists on 32.x. Here BitcoinHTTPConnection opens its HTTP connection with no timeout, and httpserver_tests has no idle-timeout test. So the backported comment is false on this branch. A late disconnect now goes undetected, and a server that never disconnects makes the test hang instead of fail. This only affects tests, but the #36848 port needs a fix before the series can be called faithful.

Evidence:

Required fixes:

Limitations:

Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

The original PSBTv2 implementation was intended to accommodate BIP370's new fields and different invariants while retaining compatibility with PSBTv0.

Upstream #21283 explicitly describes restructuring the PSBT implementation without abandoning version 0. This distinguishes support for both formats from the separate choice of which format to create at a particular boundary. It does not, by itself, explain why version 2 became the constructor default.

Source 1

Returning ordinary GUI unsigned exports to version 0 was a compatibility rollback deliberately kept small enough to avoid new translated strings during release preparation.

The inspected final upstream commit says that defaulting GUI users to PSBTv2 caused problems for existing users and offered little immediate benefit. The historical proposal dropped a version-selection checkbox to simplify backporting past string freeze. The pinned head consequently selects version 0 for the send dialog's unsigned export, while the supplied patch makes the corresponding change for the fee-bump export.

Source 1

The final upstream change deliberately retained PSBTv2 for external signing and documented PSBTv2-capable signing software—not necessarily PSBTv2-capable hardware—as the compatibility requirement.

The inspected upstream commit and its release-note fragment specify HWI 2.1.0 as the minimum HWI version. Pinned head inspection confirms explicit version 2 construction in both external-signer send and wallet fee-bump signing paths. These paths preserve the existing version choice rather than participating in the ordinary unsigned-export rollback.

Source 1

Ralph's inferences

The supported interpretation of 'must retain version 2' is preservation of the established external-signer behavior and its documented software baseline, not a demonstrated universal inability to sign version 0.

At the pinned base, the send/export call sites inherited the constructor's version choice; at the head, ordinary export and external signing make different choices explicitly. The upstream author's earlier description considered version 0 for external signing, while the final commits retained version 2. Without the missing substantive discussion, attributing that final choice to a particular signer limitation would overstate the evidence.

Source 1