Conversation
Manual Deploy AvailableYou can trigger a manual deploy of this PR branch to testnet: Alternative: Comment
Comment updated automatically when the PR is synchronized. |
📝 WalkthroughWalkthroughThis pull request updates error handling and retry logic across three files. The fetch_cloner module's error logging is reformatted from Display to Debug style. The RemoteAccountProviderError enum is extended with additional String fields in two variants to track limit information. The try_get_multi_until_slots_match function is refactored to halt retries when either the maximum retry count or overall time limit is reached, with the termination reason propagated into error variants and tests adjusted accordingly. Minor formatting changes include using integer seconds instead of fractional seconds in error messages. Suggested reviewers
✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@magicblock-chainlink/src/remote_account_provider/errors.rs`:
- Around line 65-69: The error strings for SlotsDidNotMatch and
MatchingSlotsNotSatisfyingMinContextSlot need a separator before the appended
"hit limit:" clause; update the #[error(...)] messages for the enum variants
SlotsDidNotMatch and MatchingSlotsNotSatisfyingMinContextSlot to insert a comma
(or other suitable punctuation) just before "hit limit:" so the rendered
messages read naturally (e.g., "... to track slots, hit limit: ..." and "... min
required context slot 43, hit limit: ...").
* master: fix: wait for valid blockhash (#992)
Summary
Improve error messages for unresolved delegations and fetch failures by providing better insight into what caused the timeout or retry limit to be hit.
Helps Triage: #988
Details
Error Message Improvements
Enhanced error diagnostics in the remote account provider to distinguish between two timeout failure modes:
This allows operators to quickly understand which limit was hit and adjust configuration accordingly.
fetch_cloner
Changed error logging format from Display (
%) to Debug (?) for better error introspection when delegation record fetch fails.remote_account_provider
Updated error variants to include the specific limit that was hit:
SlotsDidNotMatch: Added limit string parameterMatchingSlotsNotSatisfyingMinContextSlot: Added limit string parameterThe timeout/retry logic now checks both conditions simultaneously and includes the appropriate limit description in error messages.
Summary by CodeRabbit
Release Notes