[32.x] More Backports #36427

Manually merged
fanquake merged 11 commits from 32_0_rc4_final_backports into 32.x 2026-10-10 21:53:33 +00:00 AGit
fanquake commented 2026-10-03 10:11:00 +00:00 (Migrated from github.com)
Backports: * #36277 * #36303 * #36404 * #36435 * #36340 * #36392 * #36462 * #36471
DrahtBot commented 2026-10-03 10:11:08 +00:00 (Migrated from github.com)

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

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK andrewtoth
Stale ACK willcl-ark, sedited, marcofleon

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

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36427 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36427.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36427#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [andrewtoth](https://github.com/bitcoin/bitcoin/pull/36427#issuecomment-6098393432) | | Stale ACK | [willcl-ark](https://github.com/bitcoin/bitcoin/pull/36427#pullrequestreview-5456407854), [sedited](https://github.com/bitcoin/bitcoin/pull/36427#pullrequestreview-5456473570), [marcofleon](https://github.com/bitcoin/bitcoin/pull/36427#issuecomment-6064678658) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--5faf32d7da4f0f540f40219e4f7537a3-->
First-time contributor

Base: 2633a1ded5cd2121b626a414d6a205b7ac39b178
Head: 101719cb4325843ec31302d5b7c0af9d080ac087

Findings

Major

Abort misses resolved transactions with initial sends pending (src/private_broadcast.cpp:163, head)

If a transaction is received back before all planned initial sends are picked, it is marked resolved while IsPending() still permits those sends. This filter then removes it from GetBroadcastInfo(), the snapshot AbortPrivateBroadcast() searches. The abortprivatebroadcast RPC consequently reports that the transaction is not in the queue and does not cancel the remaining scheduled connections, contrary to its documented behavior.

Minor

The throttle test accepts a stall after any positive read (test/functional/interface_http.py:815, head)

If the server reads a small initial chunk and client or TCP delivery then pauses for a polling interval, total == prev_total && total > 0 passes without showing that the throttle engaged. The sender retries BlockingIOError, and the test requires no minimum server-read threshold before accepting the stall. No specific CI run exhibiting this false pass was identified.

Alternatives

Chunk waits that exceed the platform limit. Have Sock::WaitMany repeat waits of at most INT_MAX milliseconds, using a monotonic deadline to track the remaining requested duration. Benefit: Retains safe poll/select timeout values while better honoring the wait duration requested by callers, including the five-year approximation used for -rpcclienttimeout=0. Trade-off: Adds deadline and remaining-time bookkeeping and requires care around timeout, error, and interruption behavior. Unresolved: Confirm whether all current WaitMany callers expect the full requested duration or already compensate at a higher layer.

Review coverage was incomplete. adversarial: Stage budget exhausted before the review completed. adversarial_glm: Stage budget exhausted before the review completed. design: The implementation of TestNode.wait_until_stopped() was not available for inspection, so I could not determine whether replacing assert_equal(0, node.process.wait()) still checks for a clean process exit. verifier: The cited upstream discussions that underpin the concept candidate’s release-level concern were not checked, so whether a more complete private-broadcast fix is planned for 32.x remains unknown.

Full review report

<!-- forgejo-review-bot:bitcoin/bitcoin --> Base: `2633a1ded5cd2121b626a414d6a205b7ac39b178` Head: `101719cb4325843ec31302d5b7c0af9d080ac087` ##### Findings **Major** **Abort misses resolved transactions with initial sends pending** (src/private_broadcast.cpp:163, head) If a transaction is received back before all planned initial sends are picked, it is marked resolved while `IsPending()` still permits those sends. This filter then removes it from `GetBroadcastInfo()`, the snapshot `AbortPrivateBroadcast()` searches. The `abortprivatebroadcast` RPC consequently reports that the transaction is not in the queue and does not cancel the remaining scheduled connections, contrary to its documented behavior. **Minor** **The throttle test accepts a stall after any positive read** (test/functional/interface_http.py:815, head) If the server reads a small initial chunk and client or TCP delivery then pauses for a polling interval, `total == prev_total && total > 0` passes without showing that the throttle engaged. The sender retries `BlockingIOError`, and the test requires no minimum server-read threshold before accepting the stall. No specific CI run exhibiting this false pass was identified. ##### Alternatives **Chunk waits that exceed the platform limit.** Have Sock::WaitMany repeat waits of at most INT_MAX milliseconds, using a monotonic deadline to track the remaining requested duration. Benefit: Retains safe poll/select timeout values while better honoring the wait duration requested by callers, including the five-year approximation used for -rpcclienttimeout=0. Trade-off: Adds deadline and remaining-time bookkeeping and requires care around timeout, error, and interruption behavior. Unresolved: Confirm whether all current WaitMany callers expect the full requested duration or already compensate at a higher layer. Review coverage was incomplete. adversarial: Stage budget exhausted before the review completed. adversarial_glm: Stage budget exhausted before the review completed. design: The implementation of `TestNode.wait_until_stopped()` was not available for inspection, so I could not determine whether replacing `assert_equal(0, node.process.wait())` still checks for a clean process exit. verifier: The cited upstream discussions that underpin the concept candidate’s release-level concern were not checked, so whether a more complete private-broadcast fix is planned for 32.x remains unknown. [Full review report](<https://review.fish.foo/traces/36427-101719cb4325843ec31302d5b7c0af9d080ac087-615-8.html>)
andrewtoth commented 2026-10-06 14:47:38 +00:00 (Migrated from github.com)

@fanquake it doesn't seem like #36277 was added here.

Edit: Weird didn't see the last 2 commits until just now, and also received the notification email now but it was backdated. Must be something with github.

@fanquake it doesn't seem like #36277 was added here. Edit: Weird didn't see the last 2 commits until just now, and also received the notification email now but it was backdated. Must be something with github.
sedited (Migrated from github.com) approved these changes 2026-10-07 20:10:49 +00:00
sedited (Migrated from github.com) left a comment
ACK a323326a0d42a426456cb80be97bec29818b4235
marcofleon (Migrated from github.com) approved these changes 2026-10-07 21:01:01 +00:00
marcofleon (Migrated from github.com) left a comment
ACK a323326a0d42a426456cb80be97bec29818b4235
andrewtoth (Migrated from github.com) approved these changes 2026-10-07 21:24:18 +00:00
andrewtoth (Migrated from github.com) left a comment
ACK a323326a0d42a426456cb80be97bec29818b4235
willcl-ark commented 2026-10-08 09:42:26 +00:00 (Migrated from github.com)

Looks OK.

Why the commit message change in b2c6f6f027 though? Assume it's an editor accident, and not a big deal tbh.

--- /tmp/commit1        2026-10-08 10:41:30.369567197 +0100
+++ /tmp/commit2        2026-10-08 10:41:30.373567171 +0100
@@ -4,6 +4,7 @@
 it down to Sock::Wait. On systems without poll() (e.g. macOS and the
 BSDs) the wait is done with select(), which fails with EINVAL for
 timeouts above 10^8 seconds on macOS. So since the libevent removal in
+#34342, `bitcoin-cli -rpcclienttimeout=0 ...` fails on macOS with
 "Could not connect to the server". With poll(), the millisecond count
 is narrowed to int, so large values can wrap as well.

@@ -13,7 +14,3 @@

 Add a bitcoin-cli call with -rpcclienttimeout=0 to
 interface_bitcoin_cli.py. It fails on macOS without the cap.
-
-Github-Pull: #36340
-Rebased-From: 8dcf90a9b320c791f49f78de3b1094f54068e339
-
Looks OK. Why the commit message change in b2c6f6f0271 though? Assume it's an editor accident, and not a big deal tbh. ```diff --- /tmp/commit1 2026-10-08 10:41:30.369567197 +0100 +++ /tmp/commit2 2026-10-08 10:41:30.373567171 +0100 @@ -4,6 +4,7 @@ it down to Sock::Wait. On systems without poll() (e.g. macOS and the BSDs) the wait is done with select(), which fails with EINVAL for timeouts above 10^8 seconds on macOS. So since the libevent removal in +#34342, `bitcoin-cli -rpcclienttimeout=0 ...` fails on macOS with "Could not connect to the server". With poll(), the millisecond count is narrowed to int, so large values can wrap as well. @@ -13,7 +14,3 @@ Add a bitcoin-cli call with -rpcclienttimeout=0 to interface_bitcoin_cli.py. It fails on macOS without the cap. - -Github-Pull: #36340 -Rebased-From: 8dcf90a9b320c791f49f78de3b1094f54068e339 - ```
willcl-ark (Migrated from github.com) approved these changes 2026-10-08 09:43:33 +00:00
willcl-ark (Migrated from github.com) left a comment

ACK a323326a0d

happy to re-ack with fixed commit message, if it's deemed important-enough to fix :)

ACK a323326a0d42a426456cb80be97bec29818b4235 happy to re-ack with fixed commit message, if it's deemed important-enough to fix :)
willcl-ark (Migrated from github.com) approved these changes 2026-10-08 12:16:44 +00:00
willcl-ark (Migrated from github.com) left a comment

reACK d66ea38afc

only commit message fixed

reACK d66ea38afc618b3380c41e950aa0bbca2f524558 only commit message fixed
sedited (Migrated from github.com) approved these changes 2026-10-08 12:22:33 +00:00
sedited (Migrated from github.com) left a comment

Re-ACK d66ea38afc

Re-ACK d66ea38afc618b3380c41e950aa0bbca2f524558
marcofleon commented 2026-10-08 16:44:54 +00:00 (Migrated from github.com)

re-ACK d66ea38afc

re-ACK d66ea38afc618b3380c41e950aa0bbca2f524558
andrewtoth commented 2026-10-10 14:15:08 +00:00 (Migrated from github.com)
ACK 101719cb4325843ec31302d5b7c0af9d080ac087
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36427
No description provided.