Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit 4ae8302

Browse files
SHIP-3990: improving working configs (#1533) (#1537)
## Motivation Optimizations for working configs that were tracked in https://smartcontract-it.atlassian.net/browse/SHIP-3990 relates to #1533 ## Solution ## Motivation ## Solution
1 parent 96b7ec5 commit 4ae8302

File tree

9 files changed

+53
-51
lines changed

9 files changed

+53
-51
lines changed

core/chains/evm/config/toml/defaults/BOB_Mainnet.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ ChainID = '60808'
33
ChainType = 'optimismBedrock'
44
# finality_depth was: ~850
55
FinalityDepth = 900
6-
# block_time was: 2s
7-
LogPollInterval = '5s'
6+
# block_time was: 2s, adding 1 second buffer
7+
LogPollInterval = '3s'
88

99
# finality_depth * block_time / 60 secs = ~30 min (finality time)
1010
NoNewFinalizedHeadsThreshold = '35m'
@@ -16,8 +16,8 @@ EIP1559DynamicFees = true
1616
Mode = 'FeeHistory'
1717

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

2222
[GasEstimator.BlockHistory]
2323
BlockHistorySize = 100

core/chains/evm/config/toml/defaults/BOB_Testnet.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ ChainID = '808813'
33
ChainType = 'optimismBedrock'
44
# finality_depth was: ~850
55
FinalityDepth = 900
6-
# block_time was: 2s
7-
LogPollInterval = '5s'
6+
# block_time was: 2s, adding 1 second buffer
7+
LogPollInterval = '3s'
88

99
# finality_depth * block_time / 60 secs = ~30 min (finality time)
1010
NoNewFinalizedHeadsThreshold = '35m'
@@ -16,8 +16,8 @@ EIP1559DynamicFees = true
1616
Mode = 'FeeHistory'
1717

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

2222
[GasEstimator.BlockHistory]
2323
BlockHistorySize = 100
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ChainID = '80084'
22
# finality_depth: instant
33
FinalityDepth = 10
4-
# block_time: 5s
5-
LogPollInterval = '10s'
4+
# block_time: 5s, adding 1 second buffer
5+
LogPollInterval = '6s'
66

77
# finality_depth * block_time / 60 secs = ~0.8 min (finality time)
88
NoNewFinalizedHeadsThreshold = '5m'
@@ -12,8 +12,8 @@ EIP1559DynamicFees = true
1212
Mode = 'FeeHistory'
1313

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

1818
[GasEstimator.BlockHistory]
1919
BlockHistorySize = 100

core/chains/evm/config/toml/defaults/Bsquared_Mainnet.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ ChainID = '223'
33
ChainType = 'optimismBedrock'
44
# finality_depth was: ~1900
55
FinalityDepth = 2000
6-
# block_time: ~2s
7-
LogPollInterval = '5s'
6+
# block_time: ~2s, adding 1 second buffer
7+
LogPollInterval = '3s'
88

99
# finality_depth * block_time / 60 secs = ~66 min (finality time)
1010
NoNewFinalizedHeadsThreshold = '70m'
@@ -16,8 +16,8 @@ EIP1559DynamicFees = true
1616
Mode = 'FeeHistory'
1717

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

2222
[GasEstimator.BlockHistory]
2323
BlockHistorySize = 100

core/chains/evm/config/toml/defaults/Bsquared_Testnet.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ ChainID = '1123'
33
ChainType = 'optimismBedrock'
44
# finality_depth was: ~1900
55
FinalityDepth = 2000
6-
# block_time: ~2s
7-
LogPollInterval = '5s'
6+
# block_time: ~2s, adding 1 second buffer
7+
LogPollInterval = '3s'
88

99
# finality_depth * block_time / 60 secs = ~66 min (finality time)
1010
NoNewFinalizedHeadsThreshold = '70m'
@@ -16,8 +16,8 @@ EIP1559DynamicFees = true
1616
Mode = 'FeeHistory'
1717

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

2222
[GasEstimator.BlockHistory]
2323
BlockHistorySize = 100

core/chains/evm/config/toml/defaults/Unichain_Testnet.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ ChainID = '1301'
33
ChainType = 'optimismBedrock'
44
# finality_depth was: ~1900
55
FinalityDepth = 2000
6-
# block_time was: ~1s
7-
LogPollInterval = '5s'
6+
# block_time was: ~1s, adding 1 second buffer
7+
LogPollInterval = '2s'
88

99
# batching_size_finalization_percentage = 30% according to the explorer batching view
10-
# ( batching_size_finalization_percentage * finality_depth) * block_time / 60 secs = ~33 min (finality time)
11-
NoNewFinalizedHeadsThreshold = '10m'
10+
# ( batching_size_finalization_percentage * finality_depth) * block_time / 60 secs = ~10 min (finality time)
11+
# 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
12+
NoNewFinalizedHeadsThreshold = '45m'
1213

1314
FinalityTagEnabled = true
1415

@@ -17,8 +18,9 @@ EIP1559DynamicFees = true
1718
Mode = 'FeeHistory'
1819

1920
[GasEstimator.FeeHistory]
20-
# block_time was: 1s
21-
CacheTimeout = '1s'
21+
# block_time was: 1s, per recommendation skip 1-2 blocks
22+
CacheTimeout = '2s'
2223

2324
[GasEstimator.BlockHistory]
25+
# 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
2426
BlockHistorySize = 100

core/chains/evm/config/toml/defaults/Worldchain_Mainnet.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ ChainID = '480'
33
ChainType = 'optimismBedrock'
44
# finality_depth was: ~2400
55
FinalityDepth = 2500
6-
# block_time was: 2s
7-
LogPollInterval = '5s'
6+
# block_time was: 2s, adding 1 second buffer
7+
LogPollInterval = '3s'
88

99
# finality_depth * block_time / 60 secs = ~83 min (finality time)
1010
NoNewFinalizedHeadsThreshold = '90m'
@@ -16,8 +16,8 @@ EIP1559DynamicFees = true
1616
Mode = 'FeeHistory'
1717

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

2222
[GasEstimator.BlockHistory]
2323
BlockHistorySize = 100

core/chains/evm/config/toml/defaults/Worldchain_Testnet.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ ChainID = '4801'
33
ChainType = 'optimismBedrock'
44
# finality_depth was: ~2400
55
FinalityDepth = 2500
6-
# block_time was: 2s
7-
LogPollInterval = '5s'
6+
# block_time was: 2s, adding 1 second buffer
7+
LogPollInterval = '3s'
88

99
# finality_depth * block_time / 60 secs = ~83 min (finality time)
1010
NoNewFinalizedHeadsThreshold = '90m'
@@ -16,8 +16,8 @@ EIP1559DynamicFees = true
1616
Mode = 'FeeHistory'
1717

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

2222
[GasEstimator.BlockHistory]
2323
BlockHistorySize = 100

docs/CONFIG.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3582,7 +3582,7 @@ ChainType = 'optimismBedrock'
35823582
FinalityDepth = 2000
35833583
FinalityTagEnabled = true
35843584
LogBackfillBatchSize = 1000
3585-
LogPollInterval = '5s'
3585+
LogPollInterval = '3s'
35863586
LogKeepBlocksDepth = 100000
35873587
LogPrunePageSize = 10000
35883588
BackupLogPollerBlockDelay = 100
@@ -3636,7 +3636,7 @@ CheckInclusionPercentile = 90
36363636
TransactionPercentile = 60
36373637

36383638
[GasEstimator.FeeHistory]
3639-
CacheTimeout = '2s'
3639+
CacheTimeout = '4s'
36403640

36413641
[HeadTracker]
36423642
HistoryDepth = 100
@@ -4283,7 +4283,7 @@ ChainType = 'optimismBedrock'
42834283
FinalityDepth = 2500
42844284
FinalityTagEnabled = true
42854285
LogBackfillBatchSize = 1000
4286-
LogPollInterval = '5s'
4286+
LogPollInterval = '3s'
42874287
LogKeepBlocksDepth = 100000
42884288
LogPrunePageSize = 10000
42894289
BackupLogPollerBlockDelay = 100
@@ -4337,7 +4337,7 @@ CheckInclusionPercentile = 90
43374337
TransactionPercentile = 60
43384338

43394339
[GasEstimator.FeeHistory]
4340-
CacheTimeout = '2s'
4340+
CacheTimeout = '4s'
43414341

43424342
[HeadTracker]
43434343
HistoryDepth = 100
@@ -5183,7 +5183,7 @@ ChainType = 'optimismBedrock'
51835183
FinalityDepth = 2000
51845184
FinalityTagEnabled = true
51855185
LogBackfillBatchSize = 1000
5186-
LogPollInterval = '5s'
5186+
LogPollInterval = '3s'
51875187
LogKeepBlocksDepth = 100000
51885188
LogPrunePageSize = 10000
51895189
BackupLogPollerBlockDelay = 100
@@ -5237,7 +5237,7 @@ CheckInclusionPercentile = 90
52375237
TransactionPercentile = 60
52385238

52395239
[GasEstimator.FeeHistory]
5240-
CacheTimeout = '2s'
5240+
CacheTimeout = '4s'
52415241

52425242
[HeadTracker]
52435243
HistoryDepth = 100
@@ -5283,7 +5283,7 @@ ChainType = 'optimismBedrock'
52835283
FinalityDepth = 2000
52845284
FinalityTagEnabled = true
52855285
LogBackfillBatchSize = 1000
5286-
LogPollInterval = '5s'
5286+
LogPollInterval = '2s'
52875287
LogKeepBlocksDepth = 100000
52885288
LogPrunePageSize = 10000
52895289
BackupLogPollerBlockDelay = 100
@@ -5295,7 +5295,7 @@ LogBroadcasterEnabled = true
52955295
RPCDefaultBatchSize = 250
52965296
RPCBlockQueryDelay = 1
52975297
FinalizedBlockOffset = 0
5298-
NoNewFinalizedHeadsThreshold = '10m0s'
5298+
NoNewFinalizedHeadsThreshold = '45m0s'
52995299

53005300
[Transactions]
53015301
ForwardersEnabled = false
@@ -5337,7 +5337,7 @@ CheckInclusionPercentile = 90
53375337
TransactionPercentile = 60
53385338

53395339
[GasEstimator.FeeHistory]
5340-
CacheTimeout = '1s'
5340+
CacheTimeout = '2s'
53415341

53425342
[HeadTracker]
53435343
HistoryDepth = 100
@@ -5782,7 +5782,7 @@ ChainType = 'optimismBedrock'
57825782
FinalityDepth = 2500
57835783
FinalityTagEnabled = true
57845784
LogBackfillBatchSize = 1000
5785-
LogPollInterval = '5s'
5785+
LogPollInterval = '3s'
57865786
LogKeepBlocksDepth = 100000
57875787
LogPrunePageSize = 10000
57885788
BackupLogPollerBlockDelay = 100
@@ -5836,7 +5836,7 @@ CheckInclusionPercentile = 90
58365836
TransactionPercentile = 60
58375837

58385838
[GasEstimator.FeeHistory]
5839-
CacheTimeout = '2s'
5839+
CacheTimeout = '4s'
58405840

58415841
[HeadTracker]
58425842
HistoryDepth = 100
@@ -7689,7 +7689,7 @@ ChainType = 'optimismBedrock'
76897689
FinalityDepth = 900
76907690
FinalityTagEnabled = true
76917691
LogBackfillBatchSize = 1000
7692-
LogPollInterval = '5s'
7692+
LogPollInterval = '3s'
76937693
LogKeepBlocksDepth = 100000
76947694
LogPrunePageSize = 10000
76957695
BackupLogPollerBlockDelay = 100
@@ -7743,7 +7743,7 @@ CheckInclusionPercentile = 90
77437743
TransactionPercentile = 60
77447744

77457745
[GasEstimator.FeeHistory]
7746-
CacheTimeout = '2s'
7746+
CacheTimeout = '4s'
77477747

77487748
[HeadTracker]
77497749
HistoryDepth = 100
@@ -8087,7 +8087,7 @@ BlockBackfillSkip = false
80878087
FinalityDepth = 10
80888088
FinalityTagEnabled = false
80898089
LogBackfillBatchSize = 1000
8090-
LogPollInterval = '10s'
8090+
LogPollInterval = '6s'
80918091
LogKeepBlocksDepth = 100000
80928092
LogPrunePageSize = 10000
80938093
BackupLogPollerBlockDelay = 100
@@ -8141,7 +8141,7 @@ CheckInclusionPercentile = 90
81418141
TransactionPercentile = 60
81428142

81438143
[GasEstimator.FeeHistory]
8144-
CacheTimeout = '5s'
8144+
CacheTimeout = '10s'
81458145

81468146
[HeadTracker]
81478147
HistoryDepth = 100
@@ -8992,7 +8992,7 @@ ChainType = 'optimismBedrock'
89928992
FinalityDepth = 900
89938993
FinalityTagEnabled = true
89948994
LogBackfillBatchSize = 1000
8995-
LogPollInterval = '5s'
8995+
LogPollInterval = '3s'
89968996
LogKeepBlocksDepth = 100000
89978997
LogPrunePageSize = 10000
89988998
BackupLogPollerBlockDelay = 100
@@ -9046,7 +9046,7 @@ CheckInclusionPercentile = 90
90469046
TransactionPercentile = 60
90479047

90489048
[GasEstimator.FeeHistory]
9049-
CacheTimeout = '2s'
9049+
CacheTimeout = '4s'
90509050

90519051
[HeadTracker]
90529052
HistoryDepth = 100

0 commit comments

Comments
 (0)