From 1d1af81c51d78a7e1406d3e182b8740a2ae43c9c Mon Sep 17 00:00:00 2001 From: Joe Huang Date: Tue, 13 Aug 2024 13:06:12 -0500 Subject: [PATCH 1/2] fix unhandled already seen tx error for gnosis chiado (#14099) * add case for gnosis * add changeset * fix typo * typo --------- Co-authored-by: Prashant Yadav <34992934+prashantkumar1982@users.noreply.github.com> --- .changeset/chilly-cars-attend.md | 5 +++++ core/chains/evm/client/errors.go | 6 +++++- core/chains/evm/client/errors_test.go | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/chilly-cars-attend.md diff --git a/.changeset/chilly-cars-attend.md b/.changeset/chilly-cars-attend.md new file mode 100644 index 00000000000..2cb8323ab3c --- /dev/null +++ b/.changeset/chilly-cars-attend.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +add error handle for gnosis chiado for seen tx #added diff --git a/core/chains/evm/client/errors.go b/core/chains/evm/client/errors.go index da122514743..1e4a7caefe8 100644 --- a/core/chains/evm/client/errors.go +++ b/core/chains/evm/client/errors.go @@ -259,6 +259,10 @@ var mantle = ClientErrors{ Fatal: regexp.MustCompile(`(: |^)'*invalid sender`), } +var gnosis = ClientErrors{ + TransactionAlreadyInMempool: regexp.MustCompile(`(: |^)(alreadyknown)`), +} + const TerminallyStuckMsg = "transaction terminally stuck" // Tx.Error messages that are set internally so they are not chain or client specific @@ -266,7 +270,7 @@ var internal = ClientErrors{ TerminallyStuck: regexp.MustCompile(TerminallyStuckMsg), } -var clients = []ClientErrors{parity, geth, arbitrum, metis, substrate, avalanche, nethermind, harmony, besu, erigon, klaytn, celo, zkSync, zkEvm, mantle, aStar, internal} +var clients = []ClientErrors{parity, geth, arbitrum, metis, substrate, avalanche, nethermind, harmony, besu, erigon, klaytn, celo, zkSync, zkEvm, mantle, aStar, gnosis, internal} // ClientErrorRegexes returns a map of compiled regexes for each error type func ClientErrorRegexes(errsRegex config.ClientErrors) *ClientErrors { diff --git a/core/chains/evm/client/errors_test.go b/core/chains/evm/client/errors_test.go index 72fa1347ec0..a75d37f2af7 100644 --- a/core/chains/evm/client/errors_test.go +++ b/core/chains/evm/client/errors_test.go @@ -136,6 +136,7 @@ func Test_Eth_Errors(t *testing.T) { // This seems to be an erroneous message from the zkSync client, we'll have to match it anyway {"ErrorObject { code: ServerError(3), message: \\\"known transaction. transaction with hash 0xf016…ad63 is already in the system\\\", data: Some(RawValue(\\\"0x\\\")) }", true, "zkSync"}, {"client error transaction already in mempool", true, "tomlConfig"}, + {"alreadyknown", true, "Gnosis"}, } for _, test := range tests { err = evmclient.NewSendErrorS(test.message) From 6a9528db29dadd231ec592f10d655e5367301d8f Mon Sep 17 00:00:00 2001 From: Joe Huang Date: Tue, 13 Aug 2024 14:44:43 -0500 Subject: [PATCH 2/2] classify arbitrum sequencer inaccessible error as retryable (#14100) * add error handling for service unavailable for arbitrum * add changeset * update error message --------- Co-authored-by: Prashant Yadav <34992934+prashantkumar1982@users.noreply.github.com> --- .changeset/calm-badgers-jump.md | 5 +++++ core/chains/evm/client/errors.go | 2 +- core/chains/evm/client/errors_test.go | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/calm-badgers-jump.md diff --git a/.changeset/calm-badgers-jump.md b/.changeset/calm-badgers-jump.md new file mode 100644 index 00000000000..76f6e5d3121 --- /dev/null +++ b/.changeset/calm-badgers-jump.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +add error handling when arbitrum sequencer is not accessible #added diff --git a/core/chains/evm/client/errors.go b/core/chains/evm/client/errors.go index 1e4a7caefe8..83c2d9566fe 100644 --- a/core/chains/evm/client/errors.go +++ b/core/chains/evm/client/errors.go @@ -158,7 +158,7 @@ var arbitrum = ClientErrors{ Fatal: arbitrumFatal, L2FeeTooLow: regexp.MustCompile(`(: |^)max fee per gas less than block base fee(:|$)`), L2Full: regexp.MustCompile(`(: |^)(queue full|sequencer pending tx pool full, please try again)(:|$)`), - ServiceUnavailable: regexp.MustCompile(`(: |^)502 Bad Gateway: [\s\S]*$`), + ServiceUnavailable: regexp.MustCompile(`(: |^)502 Bad Gateway: [\s\S]*$|network is unreachable|i/o timeout`), } var celo = ClientErrors{ diff --git a/core/chains/evm/client/errors_test.go b/core/chains/evm/client/errors_test.go index a75d37f2af7..00bc1a9a5b4 100644 --- a/core/chains/evm/client/errors_test.go +++ b/core/chains/evm/client/errors_test.go @@ -230,6 +230,8 @@ func Test_Eth_Errors(t *testing.T) { tests := []errorCase{ {"call failed: 503 Service Unavailable: \r\n503 Service Temporarily Unavailable\r\n\r\n

503 Service Temporarily Unavailable

\r\n\r\n\r\n", true, "Nethermind"}, {"call failed: 502 Bad Gateway: \r\n502 Bad Gateway\r\n\r\n

502 Bad Gateway

\r\n
", true, "Arbitrum"}, + {"i/o timeout", true, "Arbitrum"}, + {"network is unreachable", true, "Arbitrum"}, {"client error service unavailable", true, "tomlConfig"}, } for _, test := range tests {