Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding TOML configs for B^2, BoB, Berachain, Unichain, Worldchain and… #15121

Merged
merged 18 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion core/chains/evm/client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ var mantle = ClientErrors{
NonceTooLow: regexp.MustCompile(`(: |^)'*nonce too low`),
}

var berachain = ClientErrors{
Fatal: regexp.MustCompile(`(: |^)'*invalid chain ID`),
fernandezlautaro marked this conversation as resolved.
Show resolved Hide resolved
}

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`),
Expand All @@ -289,7 +293,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, treasure, mantle, aStar, hedera, gnosis, internal}
var clients = []ClientErrors{parity, geth, arbitrum, metis, substrate, avalanche, nethermind, harmony, besu, erigon, klaytn, celo, zkSync, zkEvm, treasure, mantle, berachain, aStar, hedera, 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 @@ -422,6 +422,8 @@ func Test_Eth_Errors_Fatal(t *testing.T) {

{"failed to forward tx to sequencer, please try again. Error message: 'invalid sender'", true, "Mantle"},

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

{"client error fatal", true, "tomlConfig"},
{"[Request ID: d9711488-4c1e-4af2-bc1f-7969913d7b60] Error invoking RPC: transaction [email protected] failed precheck with status INVALID_SIGNATURE", true, "hedera"},
{"invalid chain id for signer", true, "Treasure"},
Expand Down
27 changes: 27 additions & 0 deletions core/chains/evm/config/toml/defaults/BOB_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ChainID = '60808'
# OP stack https://docs.gobob.xyz/learn/introduction/op-stack
fernandezlautaro marked this conversation as resolved.
Show resolved Hide resolved
ChainType = 'optimismBedrock'
# finality_depth was: ~850
FinalityDepth = 900
fernandezlautaro marked this conversation as resolved.
Show resolved Hide resolved
# block_time was: 2s
LogPollInterval = '5s'

# finality_depth * block_time / 60 secs = ~30 min (finality time)
NoNewFinalizedHeadsThreshold = '35m'
fernandezlautaro marked this conversation as resolved.
Show resolved Hide resolved

FinalityTagEnabled = true

[GasEstimator]
simsonraj marked this conversation as resolved.
Show resolved Hide resolved
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 2s
CacheTimeout = '2s'
fernandezlautaro marked this conversation as resolved.
Show resolved Hide resolved

[GasEstimator.BlockHistory]
BlockHistorySize = 100
friedemannf marked this conversation as resolved.
Show resolved Hide resolved

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
27 changes: 27 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,27 @@
ChainID = '808813'
# OP stack https://docs.gobob.xyz/learn/introduction/op-stack
fernandezlautaro marked this conversation as resolved.
Show resolved Hide resolved
ChainType = 'optimismBedrock'
# finality_depth was: ~850
FinalityDepth = 900
# block_time was: 2s
LogPollInterval = '5s'

# finality_depth * block_time / 60 secs = ~30 min (finality time)
NoNewFinalizedHeadsThreshold = '35m'

FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 2s
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
18 changes: 18 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,18 @@
ChainID = '80084'
# finality_depth: instant
FinalityDepth = 10
fernandezlautaro marked this conversation as resolved.
Show resolved Hide resolved
# block_time: 5s
LogPollInterval = '10s'
fernandezlautaro marked this conversation as resolved.
Show resolved Hide resolved

FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 5s
fernandezlautaro marked this conversation as resolved.
Show resolved Hide resolved
CacheTimeout = '5s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100
27 changes: 27 additions & 0 deletions core/chains/evm/config/toml/defaults/Bsquared_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ChainID = '223'
# OP stack from questionnaire https://docs.google.com/spreadsheets/d/1l8dx1GzxEnjgwH5x3vB60FUr5iFALzPcs6W_wOAiuDs/edit?gid=625078687#gid=625078687
ChainType = 'optimismBedrock'
# finality_depth was: ~1900
FinalityDepth = 2000
# block_time: ~2s
LogPollInterval = '5s'

# finality_depth * block_time / 60 secs = ~66 min (finality time)
NoNewFinalizedHeadsThreshold = '70m'

FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 2s
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
27 changes: 27 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,27 @@
ChainID = '1123'
# OP stack from questionnaire https://docs.google.com/spreadsheets/d/1l8dx1GzxEnjgwH5x3vB60FUr5iFALzPcs6W_wOAiuDs/edit?gid=625078687#gid=625078687
ChainType = 'optimismBedrock'
# finality_depth was: ~1900
FinalityDepth = 2000
# block_time: ~2s
LogPollInterval = '5s'

# finality_depth * block_time / 60 secs = ~66 min (finality time)
NoNewFinalizedHeadsThreshold = '70m'

FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 2s
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
27 changes: 27 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,27 @@
ChainID = '1301'
# OP stack: https://docs.unichain.org/docs/getting-started/set-up-a-node#overview
ChainType = 'optimismBedrock'
# finality_depth was: ~1900
FinalityDepth = 2000
# block_time was: ~1s
LogPollInterval = '5s'

# finality_depth * block_time / 60 secs = ~33 min (finality time)
NoNewFinalizedHeadsThreshold = '35m'

FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 1s
CacheTimeout = '1s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
27 changes: 27 additions & 0 deletions core/chains/evm/config/toml/defaults/Worldchain_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ChainID = '480'
# OP stack: https://worldcoin.notion.site/World-Chain-Developer-Preview-Guide-23c94a67683f4e71986e5303ab88c9f3
ChainType = 'optimismBedrock'
# finality_depth was: ~2400
FinalityDepth = 2500
# block_time was: 2s
LogPollInterval = '5s'

# finality_depth * block_time / 60 secs = ~83 min (finality time)
NoNewFinalizedHeadsThreshold = '90m'

FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 2s
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
27 changes: 27 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,27 @@
ChainID = '4801'
# OP stack: https://worldcoin.notion.site/World-Chain-Developer-Preview-Guide-23c94a67683f4e71986e5303ab88c9f3
ChainType = 'optimismBedrock'
# finality_depth was: ~2400
FinalityDepth = 2500
# block_time was: 2s
LogPollInterval = '5s'

# finality_depth * block_time / 60 secs = ~83 min (finality time)
NoNewFinalizedHeadsThreshold = '90m'

FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 2s
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
Loading