Skip to content
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

BCI-3842 custom timeouts for Hedera #13876

Merged
merged 5 commits into from
Jul 31, 2024

Conversation

dhaidashenko
Copy link
Collaborator

@dhaidashenko dhaidashenko commented Jul 17, 2024

Added custom 30s timeout for Hedera
Ticket
Discussion

@dhaidashenko dhaidashenko changed the title BCI-3842 allow to configure timeout for RPC requests BCI-3842 custom timeouts for Hedera Jul 18, 2024
@dhaidashenko dhaidashenko marked this pull request as ready for review July 18, 2024 17:41
@dhaidashenko dhaidashenko requested review from a team as code owners July 18, 2024 17:41
@@ -37,3 +39,11 @@ func NewEvmClient(cfg evmconfig.NodePool, chainCfg commonclient.ChainConfig, cli
return NewChainClient(lggr, cfg.SelectionMode(), cfg.LeaseDuration(), chainCfg.NodeNoNewHeadsThreshold(),
primaries, sendonlys, chainID, chainType, clientErrors, cfg.DeathDeclarationDelay())
}

func getRPCTimeouts(chainType chaintype.ChainType) (largePayload, defaultTimeout time.Duration) {
if chaintype.ChainHedera == chainType {
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of this strategy, isn't it more scalable, if we create 2 configs:
under ChainClient:
[ChainClient]
RPCTimeout = 10 seconds
LargeRPCTimeout = 10 seconds

Keep these default for all chains, except we set the LargeRPCTimeout = 30 for Hedera.

In future, updating these are just config changes not needing code fixes.

dimriou
dimriou previously approved these changes Jul 19, 2024
simsonraj
simsonraj previously approved these changes Jul 19, 2024
amit-momin
amit-momin previously approved these changes Jul 29, 2024
# Conflicts:
#	core/chains/evm/client/evm_client.go
#	core/chains/evm/client/helpers_test.go
#	core/chains/evm/client/rpc_client.go
#	core/chains/evm/client/rpc_client_test.go
@dimriou dimriou added this pull request to the merge queue Jul 31, 2024
Merged via the queue into develop with commit 15dc74c Jul 31, 2024
119 checks passed
@dimriou dimriou deleted the feature/BCI-3842-configure-rpc-timeout branch July 31, 2024 18:20
Tofel pushed a commit that referenced this pull request Aug 2, 2024
* allow to configure RPCTimeouts

* Custom (30s) timeout for Hedera RPC requests with large payloads (SendTransaction, CallContext, etc.)

* fix linter
friedemannf added a commit to smartcontractkit/ccip that referenced this pull request Aug 20, 2024
asoliman92 pushed a commit that referenced this pull request Aug 28, 2024
* allow to configure RPCTimeouts

* Custom (30s) timeout for Hedera RPC requests with large payloads (SendTransaction, CallContext, etc.)

* fix linter
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.

5 participants