Skip to content

Comments

fix: add WASM-compatible retry mechanism for RPC requests#481

Closed
DeVikingMark wants to merge 9 commits intoa16z:masterfrom
DeVikingMark:shmixer
Closed

fix: add WASM-compatible retry mechanism for RPC requests#481
DeVikingMark wants to merge 9 commits intoa16z:masterfrom
DeVikingMark:shmixer

Conversation

@DeVikingMark
Copy link
Contributor

Fixes #407

Added WASM-compatible retry mechanism for RPC requests to replace non-working Alloy retry implementation.

Changes made:

  • Implemented custom retry logic using wasmtimer::tokio::sleep
  • Added RetryConfig for configurable retry parameters
  • Added exponential backoff with configurable initial and max delays
  • Added proper error handling for different failure types
  • Added comprehensive tests using mockito

This fixes the issue where RPC retries would fail when compiled to WebAssembly.

@@ -0,0 +1,76 @@
use std::time::Duration;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this is not in the right directory so isn't even being compiled? Should be in src/execution/rpc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ncitron redone it, like this?

@DeVikingMark DeVikingMark requested a review from ncitron February 26, 2025 02:05
@ncitron
Copy link
Collaborator

ncitron commented Feb 26, 2025

This has been resolved as of #484 since alloy's retries work in wasm as of the latest updates.

@ncitron ncitron closed this Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: support retries when execution rpc fails in wasm

2 participants