Repository navigation
feat(minter): say which providers disagree in inconsistent RPC results - #268
Draft
mbjorkqvist wants to merge 1 commit into
Draft
mbjorkqvist wants to merge 1 commit into
mbjorkqvist wants to merge 1 commit into
Conversation
When the SOL RPC providers do not agree, the minter only logged "Inconsistent RPC results for <method>", which does not tell a provider that fails apart from one that answers differently, e.g. one that is behind or has a shorter transaction history. The inconsistent-results errors of every RPC call now carry which providers returned the same answer and why the others failed, so the existing failure log lines include it without adding any log line. Providers are named by id only, never by a custom endpoint's URL or headers, and their errors are shortened. DEFI-3031 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The diagnostics are consistently propagated, bounded, privacy-conscious, and adequately tested.
0 open findings
What changed in this PR
Adds provider-level diagnostics when Solana RPC responses disagree.
Changes:
- Groups providers by matching answers and reports provider-specific errors.
- Truncates errors and hides custom endpoint details.
- Propagates diagnostics through RPC errors, logs, and deposit errors.
| File | Description |
|---|---|
minter/src/rpc/mod.rs |
Implements and propagates provider breakdowns. |
minter/src/rpc/tests.rs |
Tests grouping, truncation, privacy, and formatting. |
minter/src/withdraw/nonce/mod.rs |
Updates inconsistent-result matching. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
When the SOL RPC providers disagree, the minter's logs only say "Inconsistent RPC results for ". During the recent ckETH withdrawal incident, knowing which provider failed and which ones still agreed was what identified the cause (a disabled API key, providers whose replicas could not agree, a provider with a shorter history). ckSOL could not tell that from its own logs.
The existing failure log lines now also say which providers returned the same answer and why the others failed, e.g.:
No log line is added, so the
/logsbuffer does not fill up faster during an outage, and the answers themselves are not logged, which keeps the lines short. Providers are named by id only, never by a custom endpoint's URL or headers, and their errors are shortened.The breakdown also appears in the
TemporarilyUnavailableerror thatdeposit_solreturns when the balance check is inconsistent.DEFI-3031
🤖 Generated with Claude Code