Skip to content

Commit

Permalink
Cherry-Pick: Change Polygon zkEVM to use FeeHistory estimator (#1462)
Browse files Browse the repository at this point in the history
  • Loading branch information
RensR committed Sep 25, 2024
2 parents 85eebef + 94ab7f2 commit 79eeba4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 140 deletions.
5 changes: 5 additions & 0 deletions .changeset/tender-lemons-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Enable FeeHistory estimator for Polygon zkEVM #nops
10 changes: 6 additions & 4 deletions core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ ContractConfirmations = 1
ResendAfterThreshold = '3m'

[GasEstimator]
PriceMin = '1 mwei'
Mode = 'FeeHistory'
# The FeeHistory estimator does not enforce PriceMin, setting it to 0 to not place any limits on the price
PriceMin = '0'
BumpPercent = 40
BumpMin = '20 mwei'

[GasEstimator.BlockHistory]
BlockHistorySize = 12
[GasEstimator.FeeHistory]
# Refresh the suggested price every 4 seconds, to stay slightly below their polling rate of 5s
CacheTimeout = '4s'

[HeadTracker]
HistoryDepth = 2000
24 changes: 0 additions & 24 deletions core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml

This file was deleted.

10 changes: 6 additions & 4 deletions core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ ContractConfirmations = 1
ResendAfterThreshold = '3m'

[GasEstimator]
PriceMin = '100 mwei'
Mode = 'FeeHistory'
# The FeeHistory estimator does not enforce PriceMin, setting it to 0 to not place any limits on the price
PriceMin = '0'
BumpPercent = 40
BumpMin = '100 mwei'

[GasEstimator.BlockHistory]
BlockHistorySize = 12
[GasEstimator.FeeHistory]
# Refresh the suggested price every 4 seconds, to stay slightly below their polling rate of 5s
CacheTimeout = '4s'

[HeadTracker]
# Polygon suffers from a tremendous number of re-orgs, we need to set this to something very large to be conservative enough
Expand Down
118 changes: 10 additions & 108 deletions docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4652,16 +4652,16 @@ Enabled = false
Enabled = true

[GasEstimator]
Mode = 'BlockHistory'
Mode = 'FeeHistory'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
PriceMin = '100 mwei'
PriceMin = '0'
LimitDefault = 8000000
LimitMax = 8000000
LimitMultiplier = '1'
LimitTransfer = 21000
EstimateLimit = false
BumpMin = '100 mwei'
BumpMin = '5 gwei'
BumpPercent = 40
BumpThreshold = 3
EIP1559DynamicFees = false
Expand All @@ -4671,13 +4671,13 @@ TipCapMin = '1 wei'

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

[GasEstimator.FeeHistory]
CacheTimeout = '10s'
CacheTimeout = '4s'

[HeadTracker]
HistoryDepth = 2000
Expand Down Expand Up @@ -5005,104 +5005,6 @@ GasLimit = 5400000

</p></details>

<details><summary>Polygon Zkevm Goerli (1442)</summary><p>

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

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

[Transactions.AutoPurge]
Enabled = false

[BalanceMonitor]
Enabled = true

[GasEstimator]
Mode = 'BlockHistory'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
PriceMin = '50 mwei'
LimitDefault = 8000000
LimitMax = 8000000
LimitMultiplier = '1'
LimitTransfer = 21000
EstimateLimit = false
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

[GasEstimator.FeeHistory]
CacheTimeout = '10s'

[HeadTracker]
HistoryDepth = 2000
MaxBufferSize = 3
SamplingInterval = '1s'
MaxAllowedFinalityDepth = 10000
FinalityTagBypass = true

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

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

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

</p></details>

<details><summary>Kroma Sepolia (2358)</summary><p>

```toml
Expand Down Expand Up @@ -5239,16 +5141,16 @@ Enabled = false
Enabled = true

[GasEstimator]
Mode = 'BlockHistory'
Mode = 'FeeHistory'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
PriceMin = '1 mwei'
PriceMin = '0'
LimitDefault = 8000000
LimitMax = 8000000
LimitMultiplier = '1'
LimitTransfer = 21000
EstimateLimit = false
BumpMin = '20 mwei'
BumpMin = '5 gwei'
BumpPercent = 40
BumpThreshold = 3
EIP1559DynamicFees = false
Expand All @@ -5258,13 +5160,13 @@ TipCapMin = '1 wei'

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

[GasEstimator.FeeHistory]
CacheTimeout = '10s'
CacheTimeout = '4s'

[HeadTracker]
HistoryDepth = 2000
Expand Down

0 comments on commit 79eeba4

Please sign in to comment.