Skip to content

Commit

Permalink
Increase FinalityDepth & HistoryDepth defaults to match Polygon mainn…
Browse files Browse the repository at this point in the history
…et (#12348)

* Increase FinalityDepth & HistoryDepth defaults to match Polygon mainnet

We have verified that finality tags on zkevm polygon are just as far
behind latest as they are on other polygon chains (often 300-500
blocks). HistoryDepth needs to be larger for the same reason, and allow
room for uncles.

* Add Cardona defaults based on Goerli

and increase FinalityDepth & BlockHistoryDepth for both chains

* make config-docs

* pnpm changeset

* Re-run "make config-docs"
  • Loading branch information
reductionista authored Mar 8, 2024
1 parent 6fa1f5d commit efead72
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-pugs-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Update config for zkevm polygon chains
23 changes: 23 additions & 0 deletions core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ChainID = '2442'
FinalityDepth = 500
NoNewHeadsThreshold = '12m'
MinIncomingConfirmations = 1
LogPollInterval = '30s'
RPCDefaultBatchSize = 100

[OCR]
ContractConfirmations = 1

[Transactions]
ResendAfterThreshold = '3m'

[GasEstimator]
PriceMin = '50 mwei'
BumpPercent = 40
BumpMin = '20 mwei'

[GasEstimator.BlockHistory]
BlockHistorySize = 12

[HeadTracker]
HistoryDepth = 2000
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ChainID = '1442'
FinalityDepth = 1
FinalityDepth = 500
NoNewHeadsThreshold = '12m'
MinIncomingConfirmations = 1
LogPollInterval = '30s'
Expand All @@ -20,4 +20,4 @@ BumpMin = '20 mwei'
BlockHistorySize = 12

[HeadTracker]
HistoryDepth = 50
HistoryDepth = 2000
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ChainID = '1101'
FinalityDepth = 1
FinalityDepth = 500
NoNewHeadsThreshold = '6m'
MinIncomingConfirmations = 1
LogPollInterval = '30s'
Expand All @@ -21,4 +21,5 @@ BumpMin = '100 mwei'
BlockHistorySize = 12

[HeadTracker]
HistoryDepth = 50
# Polygon suffers from a tremendous number of re-orgs, we need to set this to something very large to be conservative enough
HistoryDepth = 2000
91 changes: 87 additions & 4 deletions docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3615,7 +3615,7 @@ GasLimit = 5400000
AutoCreateKey = true
BlockBackfillDepth = 10
BlockBackfillSkip = false
FinalityDepth = 1
FinalityDepth = 500
FinalityTagEnabled = false
LogBackfillBatchSize = 1000
LogPollInterval = '30s'
Expand Down Expand Up @@ -3665,7 +3665,7 @@ CheckInclusionPercentile = 90
TransactionPercentile = 60

[HeadTracker]
HistoryDepth = 50
HistoryDepth = 2000
MaxBufferSize = 3
SamplingInterval = '1s'

Expand Down Expand Up @@ -3949,7 +3949,7 @@ GasLimit = 5400000
AutoCreateKey = true
BlockBackfillDepth = 10
BlockBackfillSkip = false
FinalityDepth = 1
FinalityDepth = 500
FinalityTagEnabled = false
LogBackfillBatchSize = 1000
LogPollInterval = '30s'
Expand Down Expand Up @@ -3999,7 +3999,7 @@ CheckInclusionPercentile = 90
TransactionPercentile = 60

[HeadTracker]
HistoryDepth = 50
HistoryDepth = 2000
MaxBufferSize = 3
SamplingInterval = '1s'

Expand Down Expand Up @@ -4110,6 +4110,89 @@ GasLimit = 5400000

</p></details>

<details><summary>Polygon Zkevm Cardona (2442)</summary><p>

```toml
AutoCreateKey = true
BlockBackfillDepth = 10
BlockBackfillSkip = false
FinalityDepth = 500
FinalityTagEnabled = false
LogBackfillBatchSize = 1000
LogPollInterval = '30s'
LogKeepBlocksDepth = 100000
LogPrunePageSize = 0
BackupLogPollerBlockDelay = 100
MinIncomingConfirmations = 1
MinContractPayment = '0.00001 link'
NonceAutoSync = true
NoNewHeadsThreshold = '12m0s'
RPCDefaultBatchSize = 100
RPCBlockQueryDelay = 1

[Transactions]
ForwardersEnabled = false
MaxInFlight = 16
MaxQueued = 250
ReaperInterval = '1h0m0s'
ReaperThreshold = '168h0m0s'
ResendAfterThreshold = '3m0s'

[BalanceMonitor]
Enabled = true

[GasEstimator]
Mode = 'BlockHistory'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
PriceMin = '50 mwei'
LimitDefault = 500000
LimitMax = 500000
LimitMultiplier = '1'
LimitTransfer = 21000
BumpMin = '20 mwei'
BumpPercent = 40
BumpThreshold = 3
EIP1559DynamicFees = false
FeeCapDefault = '100 gwei'
TipCapDefault = '1 wei'
TipCapMin = '1 wei'

[GasEstimator.BlockHistory]
BatchSize = 25
BlockHistorySize = 12
CheckInclusionBlocks = 12
CheckInclusionPercentile = 90
TransactionPercentile = 60

[HeadTracker]
HistoryDepth = 2000
MaxBufferSize = 3
SamplingInterval = '1s'

[NodePool]
PollFailureThreshold = 5
PollInterval = '10s'
SelectionMode = 'HighestHead'
SyncThreshold = 5
LeaseDuration = '0s'
NodeIsSyncingEnabled = false

[OCR]
ContractConfirmations = 1
ContractTransmitterTransmitTimeout = '10s'
DatabaseTimeout = '10s'
DeltaCOverride = '168h0m0s'
DeltaCJitterOverride = '1h0m0s'
ObservationGracePeriod = '1s'

[OCR2]
[OCR2.Automation]
GasLimit = 5400000
```

</p></details>

<details><summary>Fantom Testnet (4002)</summary><p>

```toml
Expand Down

0 comments on commit efead72

Please sign in to comment.