From 9b11b00cb1e8daf57209498b406a3b07da3bbd86 Mon Sep 17 00:00:00 2001 From: simsonraj Date: Wed, 12 Jun 2024 23:16:15 +0530 Subject: [PATCH] added errors & updated configs --- core/chains/evm/client/errors.go | 2 +- core/chains/evm/client/errors_test.go | 1 + core/chains/evm/config/toml/defaults/Hedera_Testnet.toml | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/chains/evm/client/errors.go b/core/chains/evm/client/errors.go index d24f084abc2..b00cd2263e9 100644 --- a/core/chains/evm/client/errors.go +++ b/core/chains/evm/client/errors.go @@ -249,7 +249,7 @@ var zkEvm = ClientErrors{ OutOfCounters: regexp.MustCompile(`(?:: |^)not enough .* counters to continue the execution$`), } -var hederaFatal = regexp.MustCompile(`(: |^)(execution reverted)(:|$) | ^Transaction gas limit '(\d+)' exceeds block gas limit '(\d+)' | ^Transaction gas limit provided '(\d+)' is insufficient of intrinsic gas required '(\d+)' | ^Oversized data:`) +var hederaFatal = regexp.MustCompile(`(: |^)(execution reverted)(:|$) | ^Transaction gas limit '(\d+)' exceeds block gas limit '(\d+)' | ^Transaction gas limit provided '(\d+)' is insufficient of intrinsic gas required '(\d+)' | ^Oversized data:|status INVALID_SIGNATURE`) var hedera = ClientErrors{ NonceTooLow: regexp.MustCompile(`Nonce too low`), NonceTooHigh: regexp.MustCompile(`Nonce too high`), diff --git a/core/chains/evm/client/errors_test.go b/core/chains/evm/client/errors_test.go index 202ab4f3acc..c7a2a590927 100644 --- a/core/chains/evm/client/errors_test.go +++ b/core/chains/evm/client/errors_test.go @@ -385,6 +385,7 @@ func Test_Eth_Errors_Fatal(t *testing.T) { {"Failed to serialize transaction: oversized data. max: 1000000; actual: 1000000", true, "zkSync"}, {"client error fatal", true, "tomlConfig"}, + {"[Request ID: d9711488-4c1e-4af2-bc1f-7969913d7b60] Error invoking RPC: transaction 0.0.4425573@1718213476.914320044 failed precheck with status INVALID_SIGNATURE", true, "hedera"}, } for _, test := range tests { diff --git a/core/chains/evm/config/toml/defaults/Hedera_Testnet.toml b/core/chains/evm/config/toml/defaults/Hedera_Testnet.toml index 23d63ac5a7d..f79773cc9e9 100644 --- a/core/chains/evm/config/toml/defaults/Hedera_Testnet.toml +++ b/core/chains/evm/config/toml/defaults/Hedera_Testnet.toml @@ -1,9 +1,9 @@ ChainID = '296' #considering the 3-5 (6 including a buffer) seconds of finality and 2 seconds block production -#we set the depth to 6/2 = 3 blocks -FinalityDepth = 3 +#we set the depth to 6/2 = 3 blocks, setting to 10 for safety +FinalityDepth = 10 #Hedera has high TPS, so polling less often -LogPollInterval = '20s' +LogPollInterval = '10s' MinIncomingConfirmations = 1 #turning off the liveness detection, since the Websocket connection is not reliable, can be turned on if needed NoNewHeadsThreshold = '0' @@ -29,4 +29,4 @@ ResendAfterThreshold = '10s' [NodePool] #increasing to 3x the default polling interval to allow some buffer before decalring out-of-sync & since Hedera has high TPS -SyncThreshold = 30 \ No newline at end of file +SyncThreshold = 0 \ No newline at end of file