Repository navigation
fix(node): bound admit-path chain reads and keep the RPC failure class in logs - #2278
Merged
Merged
Conversation
…s in logs The admit-path getPool and getAuthorization reads in ResolvingPoolView now run under chain_events::timed, so a hung RPC times out and takes the fault path (negative-cached refusal, or the cached-registration fallback). Add redact::sanitize_error_sources, which walks a typed error's source() chain so a URL-stripped transport error keeps its failure class. Log typed alloy errors in crates/node/src through it, and anyhow errors through sanitize_err_chain. Closes #2271 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Coverage OverviewLanguages: Rust Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit b79a7fa in the Show a line coverage summary of the most impacted files.
Updated |
9 tasks done
… pin admit-cache invariants sanitize_err_chain now walks the chain through sanitize_error_sources, so alloy's repeated transport layers print once and each layer is stripped before the join. The relay last_error warning logs its source chain. The admit getPool WARN names the negative-cache window. Tests pin that a timed-out getAuthorization caches nothing and does not refresh a stale entry, that the admit bound is the default, and that the RPC probe keeps the failure class of a real reqwest error without the URL. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…meouts # Conflicts: # crates/node/src/payment_settlement.rs
…meouts # Conflicts: # crates/node/src/buyer_channel.rs
…with it
sanitize_error_sources skipped any layer whose text appeared anywhere in
the text built so far, so a short cause such as "timeout" under "request
timeout exceeded" was dropped. A layer is now skipped only when the
previous non-empty layer's raw Display ends with it at a non-alphanumeric
boundary, which is the shape of a "{0}" or "transport: {0}" wrapper.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The getPool hang test makes a second request and asserts it is refused from the negative cache without another read or wait. All three admit hang tests capture tracing output and assert the WARN carries the timeout and, for getPool, the suppression window. Co-Authored-By: Claude Opus 5.5 <[email protected]>
.config/nextest.toml terminates a decdn-node test after 180s and retries it twice; the doc said the repo had no nextest config. Co-Authored-By: Claude Opus 5.5 <[email protected]>
thiras
approved these changes
Oct 5, 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.
Summary
getPoolandgetAuthorizationreads inResolvingPoolViewhad no timeout, and the alloy HTTP provider has none of its own, so a hanging RPC stalled admission with no log line and the stale-registration fallback (fix(node): batch fix for RPC URL redaction, signer-auth fallback, pull-through loop, watcher flapping #2270) never ran. Both reads now go throughchain_events::timed(default 10 s): a hang becomes a fault and takes the existing path — a negative-cached refusal forgetPool, the cached-registration fallback or a refusal forgetAuthorization. ThegetPoolWARN names the negative-cache window it starts.redact::sanitize_error_sourceswalks a typed error'ssource()chain, strips URLs from each layer before the join (so a URL token cannot swallow the:separator), and skips a layer only when the previous layer's message ends with it at a non-alphanumeric boundary — the shape of a"{0}"or"transport: {0}"wrapper. A short cause such astimeoutthat merely appears inside an earlier message is still printed. A stripped reqwest error therefore keeps its class (timeout / connection refused / DNS / TLS).sanitize_err_chaindelegates tosanitize_error_sources, soanyhowerrors (including everytimedresult) get the same dedupe and per-layer strip instead of alloy's doubled transport text.anyhowerrors in the settlement path (plan_lane, post-redeemgetAuthorizations, pre-redeemgetWatermarks) were logged withsanitize_rpc_display, which prints only the outer context; they now usesanitize_err_chain. Typed alloy, reqwest, store and iroh relay errors acrosscrates/node/srclog throughsanitize_error_sources. Theredactmodule doc names which helper keeps the class.decdnCLI anddecdn-clientsites is cli, client: log typed RPC errors through sanitize_error_sources so the failure class survives #2277 (client/src/discovery.rsis in flight in fix(client,cli): keep the bundle task polled while records and fsyncs run #2274); a shorter negative-cache TTL for agetPoolfault than for an absent/closed verdict is node: a getPool fault negative-caches a live pool for the full 60 s verdict TTL #2318.Test plan
admit_getpool_hang_refuses_within_the_bound: elapsed equalsDEFAULT_RPC_CALL_TIMEOUT; a second request is refused from the negative cache with no further wait and no second WARN; the WARN carriesadmit getPool timed out after 10sandsuppressed_for=60sadmit_getauthorization_hang_falls_back_to_the_cached_registration: the fallback leaves the entry's age; the WARN carries the timeoutadmit_getauthorization_hang_with_no_cached_read_refuses: caches nothing; the WARN carries the timeouttimedwrap. The WARN checks capture tracing output with a local writer (no new dependency).preflight_transient_keeps_the_class_and_drops_the_url: a real reqwest connection-refused error keepsconnectand drops therpc_urlsecretsanitize_error_sources/sanitize_err_chainunit tests indecdn-common, including a repeated-wrapper chain and a cause that only appears inside the outer messagecargo nextest run -p decdn-node,-p decdn-commoncargo clippy --workspace --all-targets -- -D warnings,cargo fmt -- --check,cargo docwith-D warningsCloses #2271
🤖 Generated with Claude Code