feat(network)!: activate bounded paired GetBlocks serving - #945
feat(network)!: activate bounded paired GetBlocks serving#945czarcas7ic wants to merge 101 commits into
Conversation
And one more auto-invalidated finding. Analyzed 37 files, diff |
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. |
20808bf to
36e649b
Compare
36e649b to
ee0ae5a
Compare
refactor(network): generalize paired streams into service sessions
Motivation
Native GetBlocks serving needs bounded ownership through storage, queued results, and writes while downloads continue on the same connection. This activates the refactor from #892 using the owned storage, service sessions, and request ownership now merged into
main.Solution
Declare the paired data and request streams through the service-session transport now on
main. Keep the one-slot request queue, download-owned request deadline, and 32-second data-write deadline. Serve sequentially with one response per authenticated identity and 64 per node, backed by the owned state-read API. Remote closes and write timeouts retain download cooldowns and repeated-stall disconnects after buffered responses are validated, including when closure precedes coordinator startup. Connection shutdown and fatal request errors interrupt pending validation. Local body backpressure stays neutral. Inbound setup preserves an outbound slot, and teardown removes only its exact session generation. The previous native version is no longer selected. Other services and legacy fallback remain available.Testing
At
49963c0c4, the merge withmainpreserves paired serving and includes the final batched ownership check. All 510 selected block-sync, transport, and handler tests pass without retries on Rust 1.97. Network all-target Clippy with warnings denied, formatting, Markdown lint, and changelog checks pass. The long transport qualification gates were not rerun for this merge.At
d682a81cf, all 429 selected block-sync, session, and transport tests plus all eight paired-download checks pass without retries. The startup-cancellation regression fails before its fix. Connection shutdown and fatal request errors still interrupt blocked validation. Network all-target Clippy with warnings denied, formatting, Markdown lint, and changelog checks pass.At
d6831f340, all 113 selected handler and block-sync session tests pass without retries, including duplicate rejection, capacity accounting, cleanup, reopening, and paired downloads. Network all-target Clippy with warnings denied, formatting, Markdown lint, and changelog checks pass.Earlier qualification at
06fdcce37passed 3,484 tests under the workspace CI profile, excluding three macOS address-binding tests. Workspace Clippy with warnings denied, formatting, and changelog checks pass. All six transport qualification gates passed at that commit, including twenty actual session replacements on one connection with 50 ms RTT and 1% packet loss. Those downloads took 200–205 seconds against the 240-second limit. Twenty saturation, cleanup, and retry cycles also pass. Five-run comparisons on matching Iroh 1.1 dependencies and download policy retain 98.4–99.1% of the original serving path's useful throughput. Peak process memory across qualification is below 233 MiB. Two live-network sync tests time out locally and are excluded by the CI profile. Earlier measurements remain in the archived results. Prepared with Codex assistance.Changelog
Includes the serving security fragment. The serving design explains behavior, limits, and qualification criteria. The stream specification defines the wire contract.