Repository navigation
fix(node): batch fix for RPC URL redaction, signer-auth fallback, pull-through loop, watcher flapping - #2270
Merged
Merged
Conversation
Chain-read warnings logged raw alloy errors, whose Display can carry the reqwest URL and so a provider API key. Route them through sanitize_rpc_display / sanitize_err_chain, and pin it with a test that logs an owned-pool read fault whose URL holds a key. Closes #2264 Co-Authored-By: Claude Opus 5.5 <[email protected]>
A getAuthorization RPC fault at admission returned None, and the admit gate refused it as SignerCapExhausted, so a paying client was refused and the cap-exhausted counter blamed the signer. On a fault the view now answers with the last cached read whatever its age (spent raised to the projection's fold); with no earlier read the gate refuses as PoolUnconfirmed instead. Closes #2220 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…runs #2227 excludes the requester and sends ranged handshakes when a size hint exists, but without a hint the handshake is still (0, 0), and three or more partial holders can pull a blob from each other in a loop: the fill is claimed only after the open, so a node mid-open looks like it has no fill and recurses. NodeOrigin now marks each upstream open in progress, and the window pull-through path refuses a whole-blob request for that hash from an active staker as a miss (NotFound) while one runs. Ranged requests and clients are never refused for this reason. The origin-directory candidates also drop this node's own id, as the DHT lookup already does. ADR 037 states the guard. Closes #2224 Co-Authored-By: Claude Opus 5.5 <[email protected]>
dRPC code-19 failures cluster in time, so a window that fails its two in-tick retries often fails again seconds later, and each such tick marked every route down and bumped all five *_watcher_restarts_total counters, keeping DecdnChainWatcherFlapping firing fleet-wide while no event was lost. A window that fails every retry now ends the tick early: earlier windows keep their progress and the next tick resumes at the deferred window. A tick fails only when no window has completed for GET_LOGS_STALL_BUDGET (2 min, below the 180 s stalled alerts); a deferred tick that completed no window fires no hook. New counter decdn_chain_get_logs_deferred_total, wired, documented and plotted. Closes #2253 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Coverage OverviewLanguages: Rust Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit 1fc2294 in the Show a line coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Stale unregistered authorization can fail open, and sparse poller progress can mask unbounded watcher lag.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Fixes four testnet issues involving RPC secrecy, signer authorization, pull-through loops, and chain-watcher stability.
Changes:
- Redacts RPC URLs across node, client, and CLI logs.
- Adds stale signer authorization fallback and pull-loop prevention.
- Defers transient
eth_getLogsfailures with new metrics and documentation.
| File | Description |
|---|---|
monitoring/prometheus-alerts.yml |
Documents deferred windows. |
monitoring/dashboard-chain.json |
Charts deferred-window rate. |
docs/runbook.md |
Adds deferral troubleshooting. |
crates/node/tests/node_origin_pull.rs |
Tests loop and self-candidate guards. |
crates/node/src/runtime/mod.rs |
Wires the deferral metric. |
crates/node/src/pool_view.rs |
Updates authorization semantics. |
crates/node/src/payment_settlement.rs |
Adds stale authorization fallback. |
crates/node/src/node_origin/pull_leg.rs |
Tracks pending upstream opens. |
crates/node/src/node_origin/mod.rs |
Implements pending-open and self-filter logic. |
crates/node/src/metrics.rs |
Exports the deferral counter. |
crates/node/src/handlers/client/window.rs |
Refuses loop-closing requests. |
crates/node/src/handlers/client/mod.rs |
Clarifies rejection reasons. |
crates/node/src/handlers/client/dispatch.rs |
Separates unconfirmed and exhausted signers. |
crates/node/src/chain_events/multiplexed_poller.rs |
Implements deferred-window handling. |
crates/node/src/buyer_channel.rs |
Sanitizes RPC errors. |
crates/node/src/binding_check.rs |
Redacts binding-check errors. |
crates/client/src/source_set.rs |
Sanitizes discovery errors. |
crates/client/src/scheduler.rs |
Sanitizes lane-build errors. |
crates/client/src/first_open.rs |
Sanitizes first-open errors. |
crates/cli/src/commands/fetch.rs |
Sanitizes holder-resolution warnings. |
CHANGELOG.md |
Records user-visible fixes. |
adr/appendix-observability.md |
Documents deferral observability. |
adr/037-regional-proxy-warming.md |
Specifies the pull-loop guard. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A cached Unregistered read is not safe to reuse after its TTL: any provider's next redemption registers the signer, possibly with its cap already spent, so admitting on the old read fails open. The fault fallback now answers only with a cached Registered read (cap and expiry are write-once); otherwise the signer is refused as unconfirmed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Clearing the stall clock on any completed window let ticks that each complete one window and then defer the next fall behind head without bound while still stamping every watcher healthy. The clock now clears only on a tick that reaches head, and the budget applies to every deferral, with or without progress. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… docs The #2224 guard refused through FillOutcome::miss_reason(fault_seen), so after an earlier tier's backend fault it answered InternalError, which feeds the internal-error alert and makes the requester score this node degraded for a deliberate loop guard. It now refuses as ServeRejectReason::PullLoopGuard: always wire NotFound, counted in the new decdn_serve_stream_rejected_pull_loop_guard_total (listed in INBOUND_FAILURE_REASONS and both dashboards), with the requester in the debug line. The integration test also pins that a staker with no open in progress and a staker's ranged request are served. PendingOpen is now private and #[must_use]. For #2220, the pool_unconfirmed and signer_cap_exhausted metric docs no longer describe a getAuthorization fault as a cap-exhausted refusal, ADR 003 states the read-fault rule, and a test pins that the stale fallback takes the larger of the cached and projection-folded spent. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The module doc still said a long tick succeeds only if every window does, listed the stall failure as pre-route-loop, and the stall budget doc overstated its margin to the stalled alerts. Extend the stall test past the first failure: the next deferral fails at once and a tick that reaches head clears the stall and recovers every route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
4 tasks
8 tasks done
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.


What
Four node bugs from testnet triage, one commit each.
sanitize_rpc_display/sanitize_err_chain. The client's lane-build and discovery lines and the CLI's "no holder resolved yet" warning do the same.getAuthorizationfault refused a paying signer assigner_cap_exhausted. On a fault the view answers with the last cached registered read, whatever its age, withspentraised to the projection's fold. A cached unregistered read is not trusted. A signer the node has never read is refused asPoolUnconfirmed, so the cap-exhausted counter now counts only spent caps.(0, 0), so three or more partial holders could still pull a blob from each other in a loop.NodeOriginnow marks each upstream open while it runs. While one is open, the window pull-through path refuses a whole-blob request for that hash from an active staker asPullLoopGuard, which is always wireNotFoundand is counted in the newdecdn_serve_stream_rejected_pull_loop_guard_total. Ranged requests and client requests are never refused for this reason. The origin-directory candidates also drop this node's own id. ADR 037 describes the guard.*WatcherStalledthreshold. New counterdecdn_chain_get_logs_deferred_total, documented in the appendix, the runbook, the alert text and the chain dashboard.Closes #2264, Closes #2220, Closes #2224, Closes #2253
Reviewer notes
(0, 0), so a blanket guard would refuse a concurrent client's whole-blob request for a cold blob (sibling_streams_survive_a_sole_coverer_backpressure_refusalshows this). A loop made only of origin-directory nodes that are not active stakers is not covered. The bufferedOrigin::fetchpath gets no requester exclusion: production pull-through always takes the window path, and threading a requester through that path would need a change to a decdn-cache trait.ChainFreshness. Permanent errors, rate limits, a rejected one-block window and head-read failures still fail the tick at once.SignerCapExhausted's doc no longer covers "could not be confirmed". The admit-gate decision is now the puresigner_refusalfn indispatch.rs, with a unit test.Verification
cargo fmt -- --checkcargo clippy --workspace --all-targets --all-features -- -D warnings(exit 0)cargo nextest run -p decdn-node -p decdn-common -p decdn-client -p decdn-cli: 3371 passedRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items(exit 0)a_chain_read_warning_does_not_log_the_rpc_url,a_whole_blob_request_from_a_node_is_refused_while_its_upstream_open_runs,an_origin_directory_entry_for_this_node_is_not_a_candidateCHANGELOG.mdentries addedadr/appendix-observability.mdupdated🤖 Generated with Claude Code