Skip to content

Commit

Permalink
adding configs and error mappings for batch 1
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandezlautaro committed Nov 2, 2024
1 parent 909ecdf commit 1bb5150
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/chains/evm/client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ var aStar = ClientErrors{
TerminallyUnderpriced: regexp.MustCompile(`(?:: |^)(gas price less than block base fee)$`),
}

var berachain = ClientErrors{
Fatal: regexp.MustCompile(`(: |^)'*invalid chain ID`),
}

var mantle = ClientErrors{
InsufficientEth: regexp.MustCompile(`(: |^)'*insufficient funds for gas \* price \+ value`),
Fatal: regexp.MustCompile(`(: |^)'*invalid sender`),
Expand All @@ -271,7 +275,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, gnosis, internal}
var clients = []ClientErrors{parity, geth, arbitrum, metis, substrate, avalanche, nethermind, harmony, besu, erigon, klaytn, celo, zkSync, zkEvm, mantle, aStar, berachain, gnosis, internal}

// ClientErrorRegexes returns a map of compiled regexes for each error type
func ClientErrorRegexes(errsRegex config.ClientErrors) *ClientErrors {
Expand Down
2 changes: 2 additions & 0 deletions core/chains/evm/client/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ func Test_Eth_Errors_Fatal(t *testing.T) {
{"failed to forward tx to sequencer, please try again. Error message: 'invalid sender'", true, "Mantle"},

{"client error fatal", true, "tomlConfig"},

{"invalid chain ID", true, "Berachain"},
}

for _, test := range tests {
Expand Down
12 changes: 12 additions & 0 deletions core/chains/evm/config/toml/defaults/BOB_Testnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ChainID = '808813'
FinalityDepth = 900 # compat test finality_depth: ~850
LogPollInterval = '5s' # compat test block_time: ~0.5s

NoNewFinalizedHeadsThreshold = '10m' # with 5s threw PLENTY of [RPC's finalized state is out of sync; no new finalized heads received for 5s (last finalized head received was 4939141)]

FinalityTagEnabled = true #compat test get_logs>supports_finalized_tag: returned true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

12 changes: 12 additions & 0 deletions core/chains/evm/config/toml/defaults/Berachain_Testnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ChainID = '80084'
FinalityDepth = 10 # compat test finality_depth: 1
LogPollInterval = '5s' # compat test block_time: ~1.7s

NoNewFinalizedHeadsThreshold = '10m' # with 5s threw PLENTY of [RPC's finalized state is out of sync; no new finalized heads received for 5s (last finalized head received was 4939141)]

FinalityTagEnabled = true #compat test get_logs>supports_finalized_tag: returned true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

12 changes: 12 additions & 0 deletions core/chains/evm/config/toml/defaults/Bsquared_Testnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ChainID = '1123'
FinalityDepth = 2000 # compat test finality_depth: ~1900
LogPollInterval = '5s' # compat test block_time: ~2s

NoNewFinalizedHeadsThreshold = '10m' # with 10m threw PLENTY of [RPC's finalized state is out of sync; no new finalized heads received for 10m0s (last finalized head received was 3100170)]

FinalityTagEnabled = true #compat test get_logs>supports_finalized_tag: returned true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

11 changes: 11 additions & 0 deletions core/chains/evm/config/toml/defaults/Unichain_Testnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ChainID = '1301'
FinalityDepth = 2000 # compat test finality_depth: ~1900
LogPollInterval = '5s' # compat test block_time: ~1s

NoNewFinalizedHeadsThreshold = '10m' # not sure what to put here, from Worldchain set to 5s threw a huge amount of errors

FinalityTagEnabled = true #compat test get_logs>supports_finalized_tag: returned true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'
11 changes: 11 additions & 0 deletions core/chains/evm/config/toml/defaults/Worldchain_Testnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ChainID = '4801'
FinalityDepth = 2500 # compat test finality_depth: ~2400, but it also threw 4000 in other round, which is it?
LogPollInterval = '5s' # compat test block_time: ~0.5s

NoNewFinalizedHeadsThreshold = '10m' # with 5s threw PLENTY of [RPC's finalized state is out of sync; no new finalized heads received for 5s (last finalized head received was 4939141)]

FinalityTagEnabled = true #compat test get_logs>supports_finalized_tag: returned true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

0 comments on commit 1bb5150

Please sign in to comment.