refactor(network): generalize paired streams into service sessions - #956
Conversation
d908fe7 to
a5b40f2
Compare
0c11b10 to
680a8d2
Compare
680a8d2 to
09bfd72
Compare
Analyzed 12 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. |
Motivation
A service with several required persistent streams should start only after every stream is ready. #943 implements that guarantee for a data/request pair, but hardcodes the role count, request queue, and write policies in the transport.
This draft targets #943 (
adam/getblocks-paired-transport).Solution
Session*policies and resources, and rename the persistent mode fromOrderedtoPersistent. Services declare opening policy once and supply each stream's queue limits, message bounds, and write policy.Single-stream cancellation now resets an unfinished frame. A persistent write timeout retires only its service session, preserving unrelated services on the connection. These changes also apply to existing single-stream services.
See the service-session guide for declarations, negotiation, and migration details. The later #945 activation must remove its pair hook and declare its request queue and 32-second data write deadline through the service hooks.
Testing
cargo +1.97.0 test -p zakura-network --lib zakura:: --locked: 894 passed, 3 ignored.cargo +1.97.0 clippy -p zakura-network --all-targets --locked -- -D warnings.Changelog
Added
docs/changelog/unreleased/956.mdfor service-local write timeout handling../scripts/changelog.py checkpasses.