Skip to content

Commit

Permalink
Adding TOML configs for B^2, BoB, Berachain, Unichain, Worldchain and… (
Browse files Browse the repository at this point in the history
#15121)

* Adding TOML configs for B^2, BoB, Berachain, Unichain, Worldchain and needed error mappings

* bumping NoNewFinalizedHeadsThreshold to some chains

* Add oracle config

* adding changes from Friedemann and Simson

* adding new 'math'/algorithm to calculate NoNewFinalizedHeadsThreshold for Unichain as it has discrepancies with the data obtained from the compat tests and current testnet values

* adding changeset

* removing error mappings to berachain

* changeset missing tag

* dead link, update

* adding config docs

* changing berachain to not honor the finality tag due to possible re-orgs at depth 1

* forgot make config-docs command

* SHIP-3990: improving working configs

* error in logPollInterval

* forgot make config-docs

* BOB fixing finality depth in mainnet

* running make config-docs

---------

Co-authored-by: davidcauchi <[email protected]>
  • Loading branch information
fernandezlautaro and davidcauchi authored Nov 21, 2024
1 parent e4a2914 commit 5d22ba8
Show file tree
Hide file tree
Showing 10 changed files with 1,202 additions and 127 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-tigers-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#added Adding 5 chains (B^2, BoB, Berachain, Unichain, Worldchain configs)
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/stack-overview#rollup-layer
ChainType = 'optimismBedrock'
# FinalityDepth in mainnet showed more than 3k
FinalityDepth = 3150
# block_time was: 2s, adding 1 second buffer
LogPollInterval = '3s'

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

FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 2s, per recommendation skip 1-2 blocks
CacheTimeout = '4s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[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/stack-overview#rollup-layer
ChainType = 'optimismBedrock'
# FinalityDepth in mainnet showed more than 3k
FinalityDepth = 3150
# block_time was: 2s, adding 1 second buffer
LogPollInterval = '3s'

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

FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 2s, per recommendation skip 1-2 blocks
CacheTimeout = '4s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
19 changes: 19 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,19 @@
ChainID = '80084'
# finality_depth: instant
FinalityDepth = 10
# block_time: 5s, adding 1 second buffer
LogPollInterval = '6s'

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

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 5s, per recommendation skip 1-2 blocks
CacheTimeout = '10s'

[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, adding 1 second buffer
LogPollInterval = '3s'

# 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, per recommendation skip 1-2 blocks
CacheTimeout = '4s'

[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, adding 1 second buffer
LogPollInterval = '3s'

# 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, per recommendation skip 1-2 blocks
CacheTimeout = '4s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

[GasEstimator.DAOracle]
OracleType = 'opstack'
OracleAddress = '0x420000000000000000000000000000000000000F'
30 changes: 30 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,30 @@
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, adding 1 second buffer
LogPollInterval = '2s'

# batching_size_finalization_percentage = 30% according to the explorer batching view
# ( batching_size_finalization_percentage * finality_depth) * block_time / 60 secs = ~10 min (finality time)
# After running soak tests using 10m threw issues as there are batchs that take 35m, so we are bumping it to 45m to be sure
NoNewFinalizedHeadsThreshold = '45m'

FinalityTagEnabled = true

[GasEstimator]
EIP1559DynamicFees = true
Mode = 'FeeHistory'

[GasEstimator.FeeHistory]
# block_time was: 1s, per recommendation skip 1-2 blocks
CacheTimeout = '2s'

[GasEstimator.BlockHistory]
# As we see blocks containing between ~[8-12]tx, to get about ~1000 tx to check we would need to rougly go 100 tx back
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, adding 1 second buffer
LogPollInterval = '3s'

# 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, per recommendation skip 1-2 blocks
CacheTimeout = '4s'

[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, adding 1 second buffer
LogPollInterval = '3s'

# 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, per recommendation skip 1-2 blocks
CacheTimeout = '4s'

[GasEstimator.BlockHistory]
BlockHistorySize = 100

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

0 comments on commit 5d22ba8

Please sign in to comment.