Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Use context with timeout for external RPC API calls #27

Conversation

Stefan-Ethernal
Copy link
Contributor

@Stefan-Ethernal Stefan-Ethernal commented Dec 11, 2023

This PR introduces context.WithTimeout for the InteropEndpoints, where we are sending requests to some external RPC endpoints. It relies on ReadTimeout from jsonrpc.Config.

It also implements unit tests for ConvertProof, to meet quality gate, since that code is affected by introducing the HashLength and ProofLength constants.

@Stefan-Ethernal Stefan-Ethernal marked this pull request as ready for review December 13, 2023 14:40
@Stefan-Ethernal Stefan-Ethernal requested a review from a team December 13, 2023 14:42
@Stefan-Ethernal Stefan-Ethernal self-assigned this Dec 13, 2023
@Stefan-Ethernal Stefan-Ethernal force-pushed the CDK-27-configure-context-with-timeout-for-all-external-rpc-calls branch from cd625b4 to 5160c3a Compare December 13, 2023 15:09
@Stefan-Ethernal Stefan-Ethernal force-pushed the CDK-27-configure-context-with-timeout-for-all-external-rpc-calls branch from 5160c3a to 875eba7 Compare December 15, 2023 12:28
common/utils.go Outdated Show resolved Hide resolved
Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM

etherman/helpers_test.go Outdated Show resolved Hide resolved
etherman/helpers_test.go Outdated Show resolved Hide resolved
Copy link

@Stefan-Ethernal Stefan-Ethernal merged commit 498b0fb into main Dec 15, 2023
6 checks passed
@Stefan-Ethernal Stefan-Ethernal deleted the CDK-27-configure-context-with-timeout-for-all-external-rpc-calls branch December 15, 2023 15:26
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.

4 participants