From 0569f34c09423b0c3843270a7b11916ce6fd0ece Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Mon, 30 Mar 2026 13:02:30 +0100 Subject: [PATCH] catch-low-min-tip-error --- pkg/client/errors.go | 5 +++-- pkg/client/errors_test.go | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/client/errors.go b/pkg/client/errors.go index 38fb3bff40..e2b189e947 100644 --- a/pkg/client/errors.go +++ b/pkg/client/errors.go @@ -110,7 +110,8 @@ var geth = ClientErrors{ NonceTooHigh: regexp.MustCompile(`(: |^)nonce too high$`), ReplacementTransactionUnderpriced: regexp.MustCompile(`(: |^)replacement transaction underpriced$`), TransactionAlreadyInMempool: regexp.MustCompile(`(: |^)(?i)(known transaction|already known)`), - TerminallyUnderpriced: regexp.MustCompile(`(: |^)transaction underpriced$`), + // Bor/Polygon may use "transaction gas price below minimum" instead of stock geth "transaction underpriced". + TerminallyUnderpriced: regexp.MustCompile(`(: |^)(transaction underpriced$|transaction gas price below minimum)`), InsufficientEth: regexp.MustCompile(`(: |^)(insufficient funds for transfer|insufficient funds for gas \* price \+ value|insufficient balance for transfer|transaction would cause overdraft)$`), TxFeeExceedsCap: regexp.MustCompile(`(: |^)tx fee \([0-9\.]+ [a-zA-Z]+\) exceeds the configured cap \([0-9\.]+ [a-zA-Z]+\)$`), Fatal: gethFatal, @@ -142,7 +143,7 @@ var erigon = ClientErrors{ NonceTooHigh: regexp.MustCompile(`(: |^)nonce too high$`), ReplacementTransactionUnderpriced: regexp.MustCompile(`(: |^)replacement transaction underpriced$`), TransactionAlreadyInMempool: regexp.MustCompile(`(: |^)(block already known|already known)`), - TerminallyUnderpriced: regexp.MustCompile(`(: |^)transaction underpriced$`), + TerminallyUnderpriced: regexp.MustCompile(`(: |^)(transaction underpriced$|transaction gas price below minimum)`), InsufficientEth: regexp.MustCompile(`(: |^)(insufficient funds for transfer|insufficient funds for gas \* price \+ value|insufficient balance for transfer)$`), TxFeeExceedsCap: regexp.MustCompile(`(: |^)tx fee \([0-9\.]+ [a-zA-Z]+\) exceeds the configured cap \([0-9\.]+ [a-zA-Z]+\)$`), Fatal: erigonFatal, diff --git a/pkg/client/errors_test.go b/pkg/client/errors_test.go index 47eb2f3fe2..5a8bf69c60 100644 --- a/pkg/client/errors_test.go +++ b/pkg/client/errors_test.go @@ -163,9 +163,11 @@ func Test_Eth_Errors(t *testing.T) { tests := []errorCase{ {"transaction underpriced", true, "geth"}, + {"transaction gas price below minimum: gas tip cap 25000000000 wei, minimum needed 26000000000 wei", true, "geth"}, {"replacement transaction underpriced", false, "geth"}, {"Gas price below configured minimum gas price", true, "Besu"}, {"transaction underpriced", true, "Erigon"}, + {"transaction gas price below minimum: gas tip cap 1 gwei, minimum needed 25 gwei", true, "Erigon"}, {"There are too many transactions in the queue. Your transaction was dropped due to limit. Try increasing the fee.", false, "Parity"}, {"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"},