Repository navigation
fix(node): log the full error chain when the capacity-bond registry resync fails - #2259
Merged
Merged
Conversation
…esync fails The resync WARN rendered the anyhow error with plain Display, which prints only the outer getRegisteredNodes(offset=…, limit=…) context and drops the RPC cause. Log sanitize_err_chain(&err) instead, matching the nodeIdOf warning in the same file. Closes #2255 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Review: approve with nitsThe fix is correct: Findings
Nits
|
Contributor
Decisions on the review findings
Redaction follow-up: #2264 |
The LocalFault and outside-the-task pool-open warnings rendered the anyhow error with plain Display, which prints only the outermost context (the LocalPullFault marker or the PoolOpenFailureReason) and drops the cause. Log sanitize_err_chain instead. The registry test stub builds its page context from PAGE_SIZE so it tracks the constant. Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 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.
Summary
error = %err, which prints only the outergetRegisteredNodes(offset=…, limit=…)context. It now logssanitize_err_chain(&err), like thenodeIdOfwarning in the same file, so the RPC cause (timeout, dRPC code 19, decode error) reaches Loki.node_origin/mod.rs(theLocalFaultarm and both outside-the-task arms) had the same loss: the outermost context is theLocalPullFaultmarker or thePoolOpenFailureReason. They now logsanitize_err_chain(err)too.full_snapshoterror carries the same page context the real reader adds, built fromPAGE_SIZE, so the cause sits below the outermost message as it does in production.crates/node/src/dht/,crates/node/src/*watcher*.rs, andcrates/node/src/chain_events/: no further changes.slash_watcher.rs,blacklist_watcher.rs,multiplexed_poller.rs, andboot_retry.rsalready usesanitize_err_chain. The remaining plain%errsites are sol log-decode errors,JoinErrors, local checkpoint-store errors, DHT RPC errors, or non-anyhow errors (fee_shares_watcher.rs).payment_settlement.rs(owned by node: service-level test that the shutdown redeem sweep applies the configured floor #2235). RPC URL redaction for raw alloy errors is tracked in fix(node): redact RPC URLs in chain-read warnings #2264.Test plan
resync_failure_logs_the_full_error_chainasserts the WARN carries both the context and the cause (fails before the fix: the line ends aterror=getRegisteredNodes(offset=0, limit=100))cargo nextest run -p decdn-node capacity_bond_registry node_origincargo clippy --workspace --all-targets -- -D warnings,cargo fmt -- --check,cargo docwith-D warningsCloses #2255
🤖 Generated with Claude Code