WIP: [32.x] Backports

bitcoin/bitcoin: PR #36727

1 minor finding · 1 suggestion

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

Findings

Link

[minor] · Declared backport #36848 is absent from the bundle

This WIP bundle declares #36848 but retains the pre-existing HTTP test upper bound that can fail on slow CI; no failure on 32.x runners was observed.

Location: doc/release-notes.md:70 (head).

Details and suggested fix

BitcoinHTTPConnection.expect_timeout still enforces duration <= seconds + 2 in both idle-timeout scenarios, unchanged from base. The declared #36848's sole source commit, 75a23e7d36afbbcfedef11bca94967b88bf40de0, removes that bound because scheduling delays can fail the test even when the server closes normally. The target series does not include that deletion.

Include a target-adapted backport, retain duration >= seconds - 1, and add #36848 under ### Test in doc/release-notes.md. Adapt the upstream time.monotonic() context to this branch's time.time() implementation, and do not copy the claim that httpserver_tests covers exact timing: 32.x lacks the corresponding mock-clock assertions. If the omission is intentional, explicitly defer #36848 and remove it from the declared list instead.


Optional improvements

Link

[suggestion] · peer_discouragement misses ordinary same-address survivors

Restoring the old private-broadcast-exempt address-wide disconnect would still satisfy peer_discouragement, because its only same-address survivor is a PRIVATE_BROADCAST peer.

Location: src/net_processing.cpp:5405 (head).

Details and suggested fix

nodes[2] and nodes[3] are the only shared-address pair, but nodes[3] is PRIVATE_BROADCAST. The base punishment call used DisconnectNode(CSubNet{pnode.addr}, /*disconnect_private_broadcast=*/false), so its survivor assertion also holds under the behavior #36894 fixes. An unfiltered call to the head's subnet helper would fail this assertion, but restoring the old exemption would not. Add another ordinary INBOUND or OUTBOUND_FULL_RELAY peer sharing a non-local address with an ordinary offender. Register both with connman, mark only the offender misbehaving, and call SendMessages on it. Check that the address is discouraged and only the offender has fDisconnect set. Keep the existing private-broadcast checks. Prefer adding this regression test upstream first and then backporting it.


Backport verdict: Incomplete

Nine of the ten declared PRs (14 commits) match their upstream originals. The tenth, bitcoin/bitcoin#36848 (75a23e7d36afbbcfedef11bca94967b88bf40de0), is listed in the PR description but has no commit here, and its change is not already in the base. The head still has the flaky "Server disconnected too slow" check that #36848 removes. The release notes and credits also leave #36848 out, which suggests it may have been dropped on purpose, but no reason is given. The upstream patch also won't apply as-is: its context uses time.monotonic(), while the 32.x file uses time.time(). The included code hunks are identical to upstream or differ only in line offsets or commit order. The one real adaptation is in #36539: the doc/release-notes-hwi-minver.md file was dropped and its text moved into doc/release-notes.md, with the version changed from 32.0 to 32.1. That change is justified because the base release notes say 32.0 was never fully released. Checks at the PR head found no compile or behaviour problems in how these backports fit the 32.x branch.

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.

Unresolved disagreements

The earlier debate did not establish a generally valid one-IP/one-operator assumption. One position defended shared-IP punishment and the usefulness of discouragement; objections cited honest users sharing an address, CGNAT, and attackers cheaply changing addresses. The later Tor-exit example supplies a concrete shared-address threat, but does not by itself resolve the broader appropriate scope of address-based discouragement.

The head narrows immediate disconnection while retaining address-wide discouragement. Historical objections explain that distinction without proving either that all address-level defenses are useless or that all connections sharing an address are trustworthy.

Source 1 · Source 2 · Source 3 · Source 4 · Source 5