Repository navigation
main: update tokio for RUSTSEC-2026-0386, and keep the block-proof acknowledgement bound from dropping a disposition poll's connection - #781
Merged
Conversation
The Dependency audit job (`cargo deny --locked check`) fails on RUSTSEC-2026-0386: tokio 1.53.1's safe `AsyncFd` constructors violate I/O safety. Move tokio to its first fixed patch release, 1.53.3, in the root and fuzz lockfiles, as #777 did for the TLS advisories. Nothing in the workspace uses `AsyncFd`. Only tokio's version and checksum change. `cargo update -p tokio --precise 1.53.3` also moved the windows-sys edges of four unrelated crates (errno, quinn-udp, rustix, tempfile) from 0.61.2 to 0.52.0, so the edit keeps those as they were; both lockfiles pass `cargo metadata --locked`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…osition poll's connection b574_ack_cap's a_captured_proof_is_answered_at_the_cap_and_credited_after_its_landing failed on #780 with `proxy connection task failed: Connection reset by peer (os error 104)`, which the ledger execution proxy reported when the fixture closed. `deferred_share_disposition` wrapped each poll's checkout and SQL in `timeout_at(bound, ...)`. When the bound fell inside the checkout, during the pool's `before_acquire` ping of a connection idle for 100 ms or a new connection's setup, SQLx dropped the raw connection with the reply unread, and the kernel answered with a TCP reset. The test proxy reports that as a failed connection; PostgreSQL logs it as a client reset, and the pool loses a healthy connection. Each poll now runs in its own task, as the duplicate probe and enqueue do (#574), and only the wait for it is bounded. Answers, phases and `block_proof_ack_capped_total` are unchanged. A poll still running at the bound, or when the submission is cancelled, finishes on its own and returns its connection, so `database_pool_acquire_seconds` records its checkout when it ends instead of as a cancelled failure. Two acquire tests and docs/prism-pool-acquire-metrics.md now say so. A bound already past on entry, as for a #657 capture that committed in the share grace, starts no poll: the old code's poll there could only be cut off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Reviewed at 2608df7: 0 findings shared privately with maintainers. |
2 of 7 tasks
RobertClarke
added a commit
that referenced
this pull request
Oct 26, 2026
* 3.x.x: version 3.1.0, and tokio 1.53.3 for RUSTSEC-2026-0386 VERSION, the workspace version and both lockfiles' workspace members move to 3.1.0. tokio moves from 1.53.1 to 1.53.3, its first fixed patch release for RUSTSEC-2026-0386, in the root and fuzz lockfiles, as main took it in #781. cargo update -p tokio --precise 1.53.3 also moved the windows-sys edges of four unrelated crates to 0.52.0, so, as in #781, only tokio's version and checksum change. Nothing in the workspace uses AsyncFd. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3.x.x: 3.1.0 release notes, and 3.x.x as the production line doc/release-notes-3.1.0.md covers the changes since 3.1.0-rc.1 (#777's TLS updates and the tokio update), the upgrade from rc.1 (a binary swap) and from 3.0.0 or 3.0.0-rc.6 (#773's pre-migrate, the binary, then the optional dual-writer cutover), and the known issues carried from rc.1 plus #779's L3 failures and the acknowledgement bound's connection drop that main fixes in #781. The README banner, the development-line note and the migration guide now say 3.x.x is the production line, deployed from the v3.1.0 tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3.x.x: 3.1.0 notes: review fixes The migration guide and ledger operations cite the released 3.0.0 notes' D5 boundary at v3.0.0, not this branch's pre-release copy. The development-line note's header no longer calls the line "not a release". The 3.1.0 notes say a dual-writer-off frontend serves as 3.0's does once the migrations are applied, tell a 2.0.x upgrade that #765's guard is not needed, and list the required prism-dual-writer lane and rc.1's evidence set under Verification. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3.x.x: 3.1.0 notes: second review round The #779 known issue counts the async preset's failed repeats (four of six) and names the sync preset rather than a repeat's job. The cutover step names node-identity repersonalise and defers the cutover itself to the pair's runbook, as rc.1's notes do. Verification says docs changed since rc.1 too. The development-line note says 3.0.x is not an ancestor of 3.1.0, and the migration guide no longer implies the 3.0.0 candidates were a supported production upgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3.x.x: 3.1.0 notes: rewrap two lines Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the two independent failures on #780's CI (run 40351435557). #780 only adds a Markdown file, so both failures come from
mainitself. The other two red checks,Prove every Rust PRISM gated test executedandLint, compile, and test, only report that shard 3 and the audit job failed.AsyncFdconstructors violate I/O safety. Every PR intomainfails this check now.b574_ack_cap::a_captured_proof_is_answered_at_the_cap_and_credited_after_its_landing:proxy connection task failed: Connection reset by peer (os error 104)1. tokio for RUSTSEC-2026-0386
As #777 did for the TLS advisories, this moves tokio to its first fixed patch release. Nothing in the workspace uses
AsyncFd. Only tokio's version and checksum change:cargo update -p tokio --precise 1.53.3also moved thewindows-sysedges of four unrelated crates (errno, quinn-udp, rustix, tempfile) from 0.61.2 to 0.52.0, so the edit leaves those alone. Both lockfiles passcargo metadata --locked.2. The b574_ack_cap connection reset
The test passed, but the ledger execution proxy then failed the run while the fixture was closing. Its client socket had received a TCP reset.
deferred_share_dispositionwrapped each poll's checkout and SQL intimeout_at(bound, …). Sometimes the bound expired while the checkout was still running:before_acquireping, which runs once a connection has been idle for 100 ms and is the likely case, since the loop polls every 50 ms across several pooled connections, orWhen that happened, SQLx dropped the raw connection with the reply still unread. The kernel then answered with a reset, which the proxy treats as an error by design (#440). The same drop also costs production a healthy pooled connection, and PostgreSQL logs it as a client reset.
The poll now runs in its own task, as the duplicate probe and enqueue already do (#574), and only the wait for it is bounded. Answers, phases and
block_proof_ack_capped_totalare unchanged. A poll that is still running at the bound, or when the submission is cancelled, finishes on its own and returns its connection.database_pool_acquire_secondstherefore records that checkout when it ends, not as a cancelled failure at the bound. Two acquire tests asserted the old cancellation and now assert this.docs/prism-pool-acquire-metrics.mdis updated to match.Evidence
mainfailed 26 of 30 runs, every time with exactly the CI error. With this fix and the same patch, it passed 30 of 30.Checked locally
cargo deny --locked check: advisories, bans, licenses and sources ok. As a control,origin/mainfails the advisories check with RUSTSEC-2026-0386.cargo fmt --all -- --check;cargo clippy --locked --workspace --all-targets -- -D warnings.python3 scripts/check_prism_pool_acquires.pywith its unit tests, andpython3 scripts/check_toolchain_pin.py.coordinator::miner_submit::acquire_tests: 10 of 10 against PostgreSQL 16.cargo test --locked -p qbit-prism-serveragainst PostgreSQL 16: 2,112 passed. The only failure waspublic_database_config, caused by my cluster's trust-allpg_hba.conf; it passes under the SCRAMpg_hba.confthattest/prism-native-tests.shwrites. The qbitd tests skipped because this host has no qbitd.b574_ack_cap22 of 22,b478_capture_overpay29 of 29,lost_race_pin8 of 8,compact_runtime_e2e35 of 35.Review notes
/code-review mediumfound one thing worth fixing, and it is fixed here. The 3.x.x: a block found on the current tip is dropped when the payout revision moves between its submit check and its append's revision fence (#478 capture gap) #657 capture path can reach the loop with its deadline already passed, and now starts no poll there; the old code started one there that could only be cut off.acquire_timeoutruns out. It then runs one indexedSELECTwhose result is thrown away. This is at most one poll per capped block-bearing submission, the same trade 3.x.x: cap a captured block proof's acknowledgement wait at the share-commit timeout (follow-up to #562) #574 made for the probe and enqueue.3.x.xand3.0.xhave the same tokio 1.53.1 pin and the same poll code, so they need the same changes.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.