Repository navigation
fix(node): batch fix for #2328, #2340, #2330, #2320 - #2343
Merged
Merged
Conversation
The test opened a bi stream and never wrote to it. noq announces a stream to the peer only on its first write, so the server stayed in accept_bi and ACCEPT_BI_TIMEOUT fired instead; the client saw the implicit code-0, empty-reason close of a dropped connection, which the code-only assertion accepted. The client now writes one unfinished varint length byte, which parks read_frame, and keeps the stream open. The handshake and write run on the real clock; the test pauses only to fast-forward past PROBE_READ_TIMEOUT and resumes at once. It asserts the (0, "probe-error") application close, the accept task's Ok(()), and decdn_probe_read_faults_total == 1. The close wait is bounded on the real clock so a handler that never times out fails fast. Closes #2320 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ve ended its serve leg A payer that disappears without a CONNECTION_CLOSE ends its serve leg only at the QUIC idle timeout (30 s) or the proof-wait ceiling (30 s). The last serve leg's end then cancels the pull, so teardown works, but the 30 s PULL_WAIT_WARN_AFTER fired before that could happen and logged a false "stalled payer or pacing regression" on every SIGINT'd client. PULL_WAIT_WARN_AFTER is now 45 s. A compile-time assertion keeps it at least PULL_WAIT_WARN_MARGIN (10 s) above both QUIC_MAX_IDLE_TIMEOUT and PROOF_WAIT_CEILING, which become pub(crate) for it. A pause that reaches the warning now means a live serve leg holds the pull. Closes #2330 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ext sweep submit_chunk, reconcile_onchain_watermarks and redeem_planned_lanes now report a chain fault (a failed watermark read or any non-landed redeemMany), and redeem_one passes it to redeemer_loop. The loop parks the lane and drops its later hints (decdn_redeem_hints_parked_total) until the next tick or serve-cutoff sweep, so an RPC outage costs one attempt per lane per interval. Closes #2340 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e before a pull fault The gap-fill loop computed its delivered frontier as the gap end minus the missing byte COUNT. With a hole mid-gap and present bytes after it, that frontier landed past the hole: the next leg re-paid the present tail, moved neither frontier, and ended the gap with LegNoProgress. The delivered frontier is now the start of the gap's first missing range, so the next leg opens at the hole and fills it. On the serve side, a pull fault no longer cuts the downstream stream short of bytes the node holds. The encoder's data reader re-checks the store before it fails a read after a failed pull, and the session outboard reader reads a node no live fill will capture from the store's outboard (one chunk group's proof path per node) before it fails. A client stream that ends with an error after payment now logs the wire bytes its vouchers credited (paid_wire_bytes). Closes #2328 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Stale presence data can still discard durable bytes, and failed sweeps allow an extra per-lane RPC retry each interval.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Fixes four testnet-discovered issues across node serving, settlement, timeout diagnostics, and probe testing.
Changes:
- Corrects gap-frontier calculation and improves partial serving after failed pulls.
- Parks redemption hints after chain faults and adds observability.
- Adjusts pull warnings and accurately tests probe read timeouts.
| File | Description |
|---|---|
crates/client/src/driver.rs |
Resumes delivery from the first hole. |
crates/cache/src/fill_session.rs |
Adds store-backed outboard fallback. |
crates/cache/src/engine.rs |
Tests fallback proof loading. |
crates/node/src/handlers/client/serve_encoder.rs |
Serves stored data after pull faults. |
crates/node/src/handlers/client/wire.rs |
Records credited bytes in payment markers. |
crates/node/src/handlers/client/dispatch.rs |
Logs credited bytes on stream errors. |
crates/node/src/payment_settlement.rs |
Parks redemption hints after chain faults. |
crates/node/src/metrics.rs |
Adds the parked-hint counter. |
adr/appendix-observability.md |
Documents the new metric. |
crates/node/src/node_origin/pull_leg.rs |
Raises and guards the pause-warning threshold. |
crates/node/src/runtime/mod.rs |
Exposes the QUIC timeout internally. |
crates/node/src/handlers/client/proof_wait.rs |
Exposes the proof timeout internally. |
crates/node/src/handlers/client/mod.rs |
Re-exports the proof timeout. |
crates/node/tests/probe_loopback.rs |
Exercises the actual probe read-timeout path. |
crates/node/src/admin.rs |
Corrects the settlement eligibility reference. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code Coverage OverviewLanguages: Rust Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit 254d562 in the Show a line coverage summary of the most impacted files.
Updated |
- Correct docs: the pull-pause warning fires past 45 s (PULL_WAIT_WARN_AFTER), the paid-frontier clamp also bites on a hole before present bytes, lane parking costs at most one hint-path attempt per sweep plus the sweep's retry (reverts park too), the held prefix streams less the encoded chunks still buffered at a fault, and a read with no live fill settles from the store rather than always failing. - Store-fallback visibility: StoreFallback::capture reports whether it exported pairs; an export that misses the node fails with its own error, and a fallback hit logs at debug (warn after a clean pull). - The driver warns once per distinct hole that leaves present bytes after it, since the next leg pays for them again. - A failed store presence check after a failed pull keeps the pull's error in the combined message. - PaidProgress.wire_bytes is a NonZeroU64. - Pull the redeemMany outcome-to-chain-fault mapping into is_chain_fault, and log a lane park at debug. - Tests: a chain fault parks only its own lane, every non-landed outcome is a chain fault, a failed strict flush adds no chain fault (and a failed read survives one), a hole the store never keeps ends the gap after two opens; the sweep-release test runs on a paused clock; rename the probe read-timeout test to match what it checks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s parked past a failed sweep After a failed pull, the serve encoder's data reader checks the takedown gate and then reads the range straight from the store. The store read checks its own current bitfield and fails on absent bytes, so the reader no longer gates on the observed present bitfield, which can lag a durable admit. The redeemer clears its parked lanes only after a sweep that runs and reports no chain fault. A failed lane load or a faulted sweep keeps the set, so an RPC outage costs each lane one failed attempt per interval. redeem_sweep now returns the chain-fault flag. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Batch fix for four node bugs from the 2026-10-05/06 testnet runs. One commit per issue.
#2328: a mid-gap hole ended a paid serve-miss stream
Root cause:
fill_gapcomputeddelivered_frontier = gap_end - missing_byte_count. That is a byte count, not the contiguous present frontier. If the gap had a hole in the middle and its tail was present, the frontier landed past the hole. In the fra1 incident,1131757568 − 49152 = 1131708416, which is exactly the logged leg offset. The next leg re-paid the already-present tail (paid_wire50176 is exactly that leg).missingstayed the same, soLegNoProgressended the gap. The serve encoder was parked at the real hole and then failed the whole paid client stream. The store did not drop anything.paid_wire_bytes.#2340: a failed
redeemManywas retried on every voucher hintsubmit_chunk, the reconcile read andredeem_planned_lanesnow report chain faults.redeemer_loopparks a lane after a hint-path chain fault and drops its later hints until the next sweep. The new counter isdecdn_redeem_hints_parked_total, with a live row inadr/appendix-observability.md. During an RPC outage this costs one attempt per lane per interval instead of one per voucher.#2330: "pull still paused" WARN after the client left
Tempo shows every serve stream for that client ended 31–34 s after the SIGINT with
connection lost. That is the 30 s QUIC idle timeout. The lease then dropped and the pull was cancelled, so teardown already works. The WARN fired because its 30 s threshold was no longer than the time a serve leg needs to notice that its payer is gone.PULL_WAIT_WARN_AFTERis now 45 s. A const assert keeps it at least 10 s above bothQUIC_MAX_IDLE_TIMEOUTandPROOF_WAIT_CEILING.#2320: the probe read-timeout test hit the accept_bi timeout instead
The test now writes one unfinished varint byte, so the server blocks in
read_frame. It pauses the clock only after the handshake. It asserts theb"probe-error"close reason,Ok(())from the handler, anddecdn_probe_read_faults_total == 1. Mutation-checked: it fails with the read-timeout arm disabled, and it fails with the old no-write shape.Verification
cargo clippy --workspace --all-targets --all-features -D warnings,cargo fmt --checkandcargo doc -D warningsall pass.cargo nextest run -p decdn-client -p decdn-cache -p decdn-node: 2700/2700 pass.Closes #2328
Closes #2340
Closes #2330
Closes #2320
🤖 Generated with Claude Code