Skip to content

Conversation

@0xNeshi
Copy link
Collaborator

@0xNeshi 0xNeshi commented Oct 28, 2025

Towards #112

@0xNeshi 0xNeshi self-assigned this Oct 28, 2025
where
F: Fn() -> Fut,
Fut: Future<Output = Result<T, RobustProviderError>>,
Fut: Future<Output = Result<T, RpcError<TransportErrorKind>>>,
Copy link
Collaborator Author

@0xNeshi 0xNeshi Oct 28, 2025

Choose a reason for hiding this comment

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

Reverting the change asked for in #135 (comment).
Why? Since we know we're working only with alloys providers, it is safe to specify the RpcError as the expected one for all operations.

Comment on lines -282 to +263
Err::<i32, RobustProviderError>(RobustProviderError::Timeout)
Err(TransportErrorKind::BackendGone.into())
Copy link
Collaborator Author

@0xNeshi 0xNeshi Oct 28, 2025

Choose a reason for hiding this comment

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

Presumably Error::Timeout was returned for simplicity, but to avoid future confusion about this retry... timing out, better for the inner error to be something else.

Comment on lines -49 to +50
#[error("Retry failed after {0} tries")]
RetryFail(usize),
#[error("RPC call failed after exhausting all retry attempts: {0}")]
RetryFailure(Arc<RpcError<TransportErrorKind>>),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should be safe to assume that the lib user already knows the max retry count, so we should only notify them that retries have failed and with what error

@LeoPatOZ LeoPatOZ merged commit 435dee3 into retry-logic Oct 28, 2025
4 of 7 checks passed
@LeoPatOZ LeoPatOZ deleted the retry-updates branch October 28, 2025 10:14
@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants