-
Notifications
You must be signed in to change notification settings - Fork 807
Add retry logic on top of ledger dependency update #4348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Update invalid state sync test case to use an object {} instead of number 1234 to properly test the "failed to cast to bool" error path.
Changes the test case from using numeric value 1234 to an empty object {} to properly trigger the "failed to cast to bool" error in the test chain. This fixes the TestStateSyncEnabledFromEnvVars/invalid_state_sync_value test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds retry logic to handle intermittent failures when communicating with Ledger hardware wallets, specifically addressing "hidapi: unknown failure" and APDU 0x6987 errors that occur sporadically with the ledger-avalanche-go module.
- Implements a bounded retry mechanism with linear backoff for Ledger device operations
- Wraps critical Ledger calls (app discovery, key derivation, signing, version reads, disconnect) with retry logic
- Uses up to 5 retry attempts with 200ms incremental delays to improve hardware wallet stability
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Depends on #4347
Why this should be merged
How this works
How this was tested
After the fix, the program executes many times with no issues.
Need to be documented in RELEASES.md?