diff --git a/core/chains/evm/client/errors.go b/core/chains/evm/client/errors.go index 0203b00ab30..a037c865632 100644 --- a/core/chains/evm/client/errors.go +++ b/core/chains/evm/client/errors.go @@ -167,13 +167,16 @@ var klaytn = ClientErrors{ // Nethermind // All errors: https://github.com/NethermindEth/nethermind/blob/master/src/Nethermind/Nethermind.TxPool/AcceptTxResult.cs // All filters: https://github.com/NethermindEth/nethermind/tree/9b68ec048c65f4b44fb863164c0dec3f7780d820/src/Nethermind/Nethermind.TxPool/Filters -var nethermindFatal = regexp.MustCompile(`(: |^)(SenderIsContract|Invalid|Int256Overflow|FailedToResolveSender|GasLimitExceeded)$`) +var nethermindFatal = regexp.MustCompile(`(: |^)(SenderIsContract|Invalid(, transaction Hash is null)?|Int256Overflow|FailedToResolveSender|GasLimitExceeded(, Gas limit: \d+, gas limit of rejected tx: \d+)?|NonceGap(, Future nonce. Expected nonce: \d+)?)$`) var nethermind = ClientErrors{ // OldNonce: The EOA (externally owned account) that signed this transaction (sender) has already signed and executed a transaction with the same nonce. - NonceTooLow: regexp.MustCompile(`(: |^)OldNonce$`), + NonceTooLow: regexp.MustCompile(`(: |^)OldNonce(, Current nonce: \d+, nonce of rejected tx: \d+)?$`), // FeeTooLow/FeeTooLowToCompete: Fee paid by this transaction is not enough to be accepted in the mempool. - TerminallyUnderpriced: regexp.MustCompile(`(: |^)(FeeTooLow|FeeTooLowToCompete)$`), + TerminallyUnderpriced: regexp.MustCompile(`(: |^)(FeeTooLow(, MaxFeePerGas too low. MaxFeePerGas: \d+, BaseFee: \d+, MaxPriorityFeePerGas:\d+, Block number: \d+|` + + `, EffectivePriorityFeePerGas too low \d+ < \d+, BaseFee: \d+|` + + `, FeePerGas needs to be higher than \d+ to be added to the TxPool. Affordable FeePerGas of rejected tx: \d+.)?|` + + `FeeTooLowToCompete)$`), // AlreadyKnown: A transaction with the same hash has already been added to the pool in the past. // OwnNonceAlreadyUsed: A transaction with same nonce has been signed locally already and is awaiting in the pool. diff --git a/core/chains/evm/client/errors_test.go b/core/chains/evm/client/errors_test.go index f4a206272f4..a16c616ab1c 100644 --- a/core/chains/evm/client/errors_test.go +++ b/core/chains/evm/client/errors_test.go @@ -40,6 +40,7 @@ func Test_Eth_Errors(t *testing.T) { {"invalid transaction: nonce too low", true, "Optimism"}, {"call failed: nonce too low: address 0x0499BEA33347cb62D79A9C0b1EDA01d8d329894c current nonce (5833) > tx nonce (5511)", true, "Avalanche"}, {"call failed: OldNonce", true, "Nethermind"}, + {"call failed: OldNonce, Current nonce: 22, nonce of rejected tx: 17", true, "Nethermind"}, } for _, test := range tests { @@ -128,6 +129,9 @@ func Test_Eth_Errors(t *testing.T) { {"Transaction gas price is too low. It does not satisfy your node's minimal gas price (minimal: 100 got: 50). Try increasing the gas price.", true, "Parity"}, {"gas price too low", true, "Arbitrum"}, {"FeeTooLow", true, "Nethermind"}, + {"FeeTooLow, MaxFeePerGas too low. MaxFeePerGas: 50, BaseFee: 100, MaxPriorityFeePerGas:200, Block number: 5", true, "Nethermind"}, + {"FeeTooLow, EffectivePriorityFeePerGas too low 10 < 20, BaseFee: 30", true, "Nethermind"}, + {"FeeTooLow, FeePerGas needs to be higher than 100 to be added to the TxPool. Affordable FeePerGas of rejected tx: 50.", true, "Nethermind"}, {"FeeTooLowToCompete", true, "Nethermind"}, {"transaction underpriced", true, "Klaytn"}, {"intrinsic gas too low", true, "Klaytn"}, @@ -307,9 +311,13 @@ func Test_Eth_Errors_Fatal(t *testing.T) { {"call failed: SenderIsContract", true, "Nethermind"}, {"call failed: Invalid", true, "Nethermind"}, + {"call failed: Invalid, transaction Hash is null", true, "Nethermind"}, {"call failed: Int256Overflow", true, "Nethermind"}, {"call failed: FailedToResolveSender", true, "Nethermind"}, {"call failed: GasLimitExceeded", true, "Nethermind"}, + {"call failed: GasLimitExceeded, Gas limit: 100, gas limit of rejected tx: 150", true, "Nethermind"}, + {"call failed: NonceGap", true, "Nethermind"}, + {"call failed: NonceGap, Future nonce. Expected nonce: 10", true, "Nethermind"}, {"invalid shard", true, "Harmony"}, {"`to` address of transaction in blacklist", true, "Harmony"},