Skip to content

Commit

Permalink
bringing changes from EVM/FW team members in chainlink to ccip
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandezlautaro committed Nov 6, 2024
1 parent 8f33788 commit 6f3236a
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 25 deletions.
6 changes: 1 addition & 5 deletions core/chains/evm/client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,6 @@ var mantle = ClientErrors{
NonceTooLow: regexp.MustCompile(`(: |^)'*nonce too low`),
}

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

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 @@ -293,7 +289,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, berachain, aStar, hedera, gnosis, internal}
var clients = []ClientErrors{parity, geth, arbitrum, metis, substrate, avalanche, nethermind, harmony, besu, erigon, klaytn, celo, zkSync, zkEvm, treasure, mantle, 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: 0 additions & 2 deletions core/chains/evm/client/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,6 @@ 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 0.0.4425573@1718213476.914320044 failed precheck with status INVALID_SIGNATURE", true, "hedera"},
{"invalid chain id for signer", true, "Treasure"},
Expand Down
6 changes: 5 additions & 1 deletion core/chains/evm/config/toml/defaults/BOB_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ChainType = 'optimismBedrock'
# finality_depth was: ~850
FinalityDepth = 900
# block_time was: 2s
LogPollInterval = '5s'
LogPollInterval = '5s'

# finality_depth * block_time / 60 secs = ~30 min (finality time)
NoNewFinalizedHeadsThreshold = '35m'
Expand All @@ -21,3 +21,7 @@ CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
4 changes: 4 additions & 0 deletions core/chains/evm/config/toml/defaults/BOB_Testnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
4 changes: 4 additions & 0 deletions core/chains/evm/config/toml/defaults/Berachain_Testnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ FinalityDepth = 10
# block_time: 5s
LogPollInterval = '10s'

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


FinalityTagEnabled = true

[GasEstimator]
Expand Down
6 changes: 5 additions & 1 deletion core/chains/evm/config/toml/defaults/Bsquared_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ Mode = 'FeeHistory'
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
12 changes: 8 additions & 4 deletions core/chains/evm/config/toml/defaults/Bsquared_Testnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ ChainType = 'optimismBedrock'
# finality_depth was: ~1900
FinalityDepth = 2000
# block_time: ~2s
LogPollInterval = '5s'
LogPollInterval = '5s'

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

FinalityTagEnabled = true
FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Expand All @@ -20,4 +20,8 @@ Mode = 'FeeHistory'
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
13 changes: 9 additions & 4 deletions core/chains/evm/config/toml/defaults/Unichain_Testnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ ChainType = 'optimismBedrock'
# finality_depth was: ~1900
FinalityDepth = 2000
# block_time was: ~1s
LogPollInterval = '5s'
LogPollInterval = '5s'

# finality_depth * block_time / 60 secs = ~33 min (finality time)
NoNewFinalizedHeadsThreshold = '35m'
# batching_size_finalization_percentage = 30% according to the explorer batching view
# ( batching_size_finalization_percentage * finality_depth) * block_time / 60 secs = ~33 min (finality time)
NoNewFinalizedHeadsThreshold = '10m'

FinalityTagEnabled = true

Expand All @@ -20,4 +21,8 @@ Mode = 'FeeHistory'
CacheTimeout = '1s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100
BlockHistorySize = 100

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

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

FinalityTagEnabled = true
FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Expand All @@ -20,4 +20,8 @@ Mode = 'FeeHistory'
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100
BlockHistorySize = 100

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

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

FinalityTagEnabled = true
FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Expand All @@ -20,4 +20,8 @@ Mode = 'FeeHistory'
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100
BlockHistorySize = 100

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

0 comments on commit 6f3236a

Please sign in to comment.