From 4c3f5f59ce02ba9986c42d58fd65df46a8ea9d9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Friedemann=20F=C3=BCrst?=
Date: Tue, 20 Aug 2024 14:40:36 +0200
Subject: [PATCH 1/9] Change Polygon zkEVM to use SuggestedPriceEstimator
(SHIP-2885)
---
.changeset/tender-lemons-obey.md | 5 +++++
.../config/toml/defaults/Polygon_Zkevm_Cardona.toml | 2 +-
.../config/toml/defaults/Polygon_Zkevm_Goerli.toml | 2 +-
.../config/toml/defaults/Polygon_Zkevm_Mainnet.toml | 2 +-
docs/CONFIG.md | 12 ++++++------
5 files changed, 14 insertions(+), 9 deletions(-)
create mode 100644 .changeset/tender-lemons-obey.md
diff --git a/.changeset/tender-lemons-obey.md b/.changeset/tender-lemons-obey.md
new file mode 100644
index 00000000000..6435acdd97a
--- /dev/null
+++ b/.changeset/tender-lemons-obey.md
@@ -0,0 +1,5 @@
+---
+"chainlink": patch
+---
+
+Enable SuggestedPriceEstimator for Polygon zkEVM #nops
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
index cd91465dae6..08c3cfd83b5 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
@@ -13,7 +13,7 @@ ContractConfirmations = 1
ResendAfterThreshold = '3m'
[GasEstimator]
-PriceMin = '1 mwei'
+Mode = 'SuggestedPrice'
BumpPercent = 40
BumpMin = '20 mwei'
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml
index 6a9b47190fd..27343d59fc3 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml
@@ -13,7 +13,7 @@ ContractConfirmations = 1
ResendAfterThreshold = '3m'
[GasEstimator]
-PriceMin = '50 mwei'
+Mode = 'SuggestedPrice'
BumpPercent = 40
BumpMin = '20 mwei'
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
index 79e0cb0fce5..bc4e0e914e6 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
@@ -14,7 +14,7 @@ ContractConfirmations = 1
ResendAfterThreshold = '3m'
[GasEstimator]
-PriceMin = '100 mwei'
+Mode = 'SuggestedPrice'
BumpPercent = 40
BumpMin = '100 mwei'
diff --git a/docs/CONFIG.md b/docs/CONFIG.md
index 74afcec7400..dbe2a53111c 100644
--- a/docs/CONFIG.md
+++ b/docs/CONFIG.md
@@ -4255,10 +4255,10 @@ Enabled = false
Enabled = true
[GasEstimator]
-Mode = 'BlockHistory'
+Mode = 'SuggestedPrice'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
-PriceMin = '100 mwei'
+PriceMin = '1 gwei'
LimitDefault = 500000
LimitMax = 500000
LimitMultiplier = '1'
@@ -4630,10 +4630,10 @@ Enabled = false
Enabled = true
[GasEstimator]
-Mode = 'BlockHistory'
+Mode = 'SuggestedPrice'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
-PriceMin = '50 mwei'
+PriceMin = '1 gwei'
LimitDefault = 500000
LimitMax = 500000
LimitMultiplier = '1'
@@ -4818,10 +4818,10 @@ Enabled = false
Enabled = true
[GasEstimator]
-Mode = 'BlockHistory'
+Mode = 'SuggestedPrice'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
-PriceMin = '1 mwei'
+PriceMin = '1 gwei'
LimitDefault = 500000
LimitMax = 500000
LimitMultiplier = '1'
From 28457d2f76070f1fc78f917faaf88a9423e83cab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Friedemann=20F=C3=BCrst?=
Date: Tue, 20 Aug 2024 18:58:21 +0200
Subject: [PATCH 2/9] Set PriceMin to 1mwei for Polygon zkEVM
---
.../evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml | 1 +
.../evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml | 1 +
.../evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml | 1 +
docs/CONFIG.md | 6 +++---
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
index 08c3cfd83b5..d0986e763e0 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
@@ -14,6 +14,7 @@ ResendAfterThreshold = '3m'
[GasEstimator]
Mode = 'SuggestedPrice'
+PriceMin = '1 mwei'
BumpPercent = 40
BumpMin = '20 mwei'
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml
index 27343d59fc3..0bde46893f9 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml
@@ -14,6 +14,7 @@ ResendAfterThreshold = '3m'
[GasEstimator]
Mode = 'SuggestedPrice'
+PriceMin = '1 mwei'
BumpPercent = 40
BumpMin = '20 mwei'
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
index bc4e0e914e6..04dbe96a635 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
@@ -15,6 +15,7 @@ ResendAfterThreshold = '3m'
[GasEstimator]
Mode = 'SuggestedPrice'
+PriceMin = '1 mwei'
BumpPercent = 40
BumpMin = '100 mwei'
diff --git a/docs/CONFIG.md b/docs/CONFIG.md
index dbe2a53111c..753e9cf05e8 100644
--- a/docs/CONFIG.md
+++ b/docs/CONFIG.md
@@ -4258,7 +4258,7 @@ Enabled = true
Mode = 'SuggestedPrice'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
-PriceMin = '1 gwei'
+PriceMin = '1 mwei'
LimitDefault = 500000
LimitMax = 500000
LimitMultiplier = '1'
@@ -4633,7 +4633,7 @@ Enabled = true
Mode = 'SuggestedPrice'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
-PriceMin = '1 gwei'
+PriceMin = '1 mwei'
LimitDefault = 500000
LimitMax = 500000
LimitMultiplier = '1'
@@ -4821,7 +4821,7 @@ Enabled = true
Mode = 'SuggestedPrice'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
-PriceMin = '1 gwei'
+PriceMin = '1 mwei'
LimitDefault = 500000
LimitMax = 500000
LimitMultiplier = '1'
From c1adcd3277e77332ddb75dd8bfc3253a4490c181 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Friedemann=20F=C3=BCrst?=
Date: Wed, 4 Sep 2024 18:47:56 +0200
Subject: [PATCH 3/9] Remove Polygon zkEVM Goerli
---
.../toml/defaults/Polygon_Zkevm_Goerli.toml | 25 -----
docs/CONFIG.md | 101 ------------------
2 files changed, 126 deletions(-)
delete mode 100644 core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml
deleted file mode 100644
index 0bde46893f9..00000000000
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml
+++ /dev/null
@@ -1,25 +0,0 @@
-ChainID = '1442'
-ChainType = 'zkevm'
-FinalityDepth = 500
-NoNewHeadsThreshold = '12m'
-MinIncomingConfirmations = 1
-LogPollInterval = '30s'
-RPCDefaultBatchSize = 100
-
-[OCR]
-ContractConfirmations = 1
-
-[Transactions]
-ResendAfterThreshold = '3m'
-
-[GasEstimator]
-Mode = 'SuggestedPrice'
-PriceMin = '1 mwei'
-BumpPercent = 40
-BumpMin = '20 mwei'
-
-[GasEstimator.BlockHistory]
-BlockHistorySize = 12
-
-[HeadTracker]
-HistoryDepth = 2000
diff --git a/docs/CONFIG.md b/docs/CONFIG.md
index edecbcee482..5df0632bada 100644
--- a/docs/CONFIG.md
+++ b/docs/CONFIG.md
@@ -4863,107 +4863,6 @@ GasLimitDefault = 400000
-Polygon Zkevm Goerli (1442)
-
-```toml
-AutoCreateKey = true
-BlockBackfillDepth = 10
-BlockBackfillSkip = false
-ChainType = 'zkevm'
-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
-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 = 'SuggestedPrice'
-PriceDefault = '20 gwei'
-PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
-PriceMin = '1 mwei'
-LimitDefault = 500000
-LimitMax = 500000
-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
-
-[Workflow]
-GasLimitDefault = 400000
-```
-
-
-
Kroma Sepolia (2358)
```toml
From 06721e0f009794fb12b030af26dce95c0251158e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Friedemann=20F=C3=BCrst?=
Date: Wed, 4 Sep 2024 18:48:58 +0200
Subject: [PATCH 4/9] Enable FeeHistory estimator for Polygon zkEVM
---
.../config/toml/defaults/Polygon_Zkevm_Cardona.toml | 6 ++----
.../config/toml/defaults/Polygon_Zkevm_Mainnet.toml | 6 ++----
docs/CONFIG.md | 12 ++++++------
3 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
index d0986e763e0..1a2f1fa3178 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
@@ -13,13 +13,11 @@ ContractConfirmations = 1
ResendAfterThreshold = '3m'
[GasEstimator]
-Mode = 'SuggestedPrice'
+Mode = 'FeeHistory'
+Feehistory.CacheTimeout = '5s'
PriceMin = '1 mwei'
BumpPercent = 40
BumpMin = '20 mwei'
-[GasEstimator.BlockHistory]
-BlockHistorySize = 12
-
[HeadTracker]
HistoryDepth = 2000
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
index 04dbe96a635..60a4592cc77 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
@@ -14,14 +14,12 @@ ContractConfirmations = 1
ResendAfterThreshold = '3m'
[GasEstimator]
-Mode = 'SuggestedPrice'
+Mode = 'FeeHistory'
+Feehistory.CacheTimeout = '5s'
PriceMin = '1 mwei'
BumpPercent = 40
BumpMin = '100 mwei'
-[GasEstimator.BlockHistory]
-BlockHistorySize = 12
-
[HeadTracker]
# Polygon suffers from a tremendous number of re-orgs, we need to set this to something very large to be conservative enough
HistoryDepth = 2000
diff --git a/docs/CONFIG.md b/docs/CONFIG.md
index 5df0632bada..c780142e9c5 100644
--- a/docs/CONFIG.md
+++ b/docs/CONFIG.md
@@ -4498,7 +4498,7 @@ Enabled = false
Enabled = true
[GasEstimator]
-Mode = 'SuggestedPrice'
+Mode = 'FeeHistory'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
PriceMin = '1 mwei'
@@ -4517,13 +4517,13 @@ TipCapMin = '1 wei'
[GasEstimator.BlockHistory]
BatchSize = 25
-BlockHistorySize = 12
+BlockHistorySize = 8
CheckInclusionBlocks = 12
CheckInclusionPercentile = 90
TransactionPercentile = 60
[GasEstimator.FeeHistory]
-CacheTimeout = '10s'
+CacheTimeout = '5s'
[HeadTracker]
HistoryDepth = 2000
@@ -5002,7 +5002,7 @@ Enabled = false
Enabled = true
[GasEstimator]
-Mode = 'SuggestedPrice'
+Mode = 'FeeHistory'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
PriceMin = '1 mwei'
@@ -5021,13 +5021,13 @@ TipCapMin = '1 wei'
[GasEstimator.BlockHistory]
BatchSize = 25
-BlockHistorySize = 12
+BlockHistorySize = 8
CheckInclusionBlocks = 12
CheckInclusionPercentile = 90
TransactionPercentile = 60
[GasEstimator.FeeHistory]
-CacheTimeout = '10s'
+CacheTimeout = '5s'
[HeadTracker]
HistoryDepth = 2000
From 43f3b10feebd5c15d7bcdf77bac0cf1656271409 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Friedemann=20F=C3=BCrst?=
Date: Wed, 4 Sep 2024 18:57:40 +0200
Subject: [PATCH 5/9] Update PriceMin
---
core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml | 2 +-
docs/CONFIG.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
index 60a4592cc77..c47a125ad43 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
@@ -16,7 +16,7 @@ ResendAfterThreshold = '3m'
[GasEstimator]
Mode = 'FeeHistory'
Feehistory.CacheTimeout = '5s'
-PriceMin = '1 mwei'
+PriceMin = '100 mwei'
BumpPercent = 40
BumpMin = '100 mwei'
diff --git a/docs/CONFIG.md b/docs/CONFIG.md
index c780142e9c5..9296fe73a4b 100644
--- a/docs/CONFIG.md
+++ b/docs/CONFIG.md
@@ -4501,7 +4501,7 @@ Enabled = true
Mode = 'FeeHistory'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
-PriceMin = '1 mwei'
+PriceMin = '100 mwei'
LimitDefault = 500000
LimitMax = 500000
LimitMultiplier = '1'
From e57339cfcd20023c69c27f6919987589a6d0d30a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Friedemann=20F=C3=BCrst?=
Date: Wed, 4 Sep 2024 19:56:45 +0200
Subject: [PATCH 6/9] apply suggestions
---
.changeset/tender-lemons-obey.md | 2 +-
.../evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml | 4 +++-
.../evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml | 4 +++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/.changeset/tender-lemons-obey.md b/.changeset/tender-lemons-obey.md
index 6435acdd97a..2d6cb774b0c 100644
--- a/.changeset/tender-lemons-obey.md
+++ b/.changeset/tender-lemons-obey.md
@@ -2,4 +2,4 @@
"chainlink": patch
---
-Enable SuggestedPriceEstimator for Polygon zkEVM #nops
+Enable FeeHistory estimator for Polygon zkEVM #nops
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
index 1a2f1fa3178..c6ee9ed8ef2 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
@@ -14,10 +14,12 @@ ResendAfterThreshold = '3m'
[GasEstimator]
Mode = 'FeeHistory'
-Feehistory.CacheTimeout = '5s'
PriceMin = '1 mwei'
BumpPercent = 40
BumpMin = '20 mwei'
+[GasEstimator.FeeHistory]
+CacheTimeout = '5s'
+
[HeadTracker]
HistoryDepth = 2000
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
index c47a125ad43..ffcc6266e30 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
@@ -15,11 +15,13 @@ ResendAfterThreshold = '3m'
[GasEstimator]
Mode = 'FeeHistory'
-Feehistory.CacheTimeout = '5s'
PriceMin = '100 mwei'
BumpPercent = 40
BumpMin = '100 mwei'
+[GasEstimator.FeeHistory]
+CacheTimeout = '5s'
+
[HeadTracker]
# Polygon suffers from a tremendous number of re-orgs, we need to set this to something very large to be conservative enough
HistoryDepth = 2000
From dbbbbc5eca507717faca71cf140d043c0b9d2563 Mon Sep 17 00:00:00 2001
From: joaoluisam
Date: Wed, 11 Sep 2024 14:33:07 +0100
Subject: [PATCH 7/9] Set CacheTimeout to 2 seconds
---
core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml | 2 +-
core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
index c6ee9ed8ef2..26d1e3a426a 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
@@ -19,7 +19,7 @@ BumpPercent = 40
BumpMin = '20 mwei'
[GasEstimator.FeeHistory]
-CacheTimeout = '5s'
+CacheTimeout = '2s'
[HeadTracker]
HistoryDepth = 2000
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
index ffcc6266e30..93160dd71b1 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
@@ -20,7 +20,7 @@ BumpPercent = 40
BumpMin = '100 mwei'
[GasEstimator.FeeHistory]
-CacheTimeout = '5s'
+CacheTimeout = '2s'
[HeadTracker]
# Polygon suffers from a tremendous number of re-orgs, we need to set this to something very large to be conservative enough
From 80585de6beb187889b70b3e33464386698ce0ed2 Mon Sep 17 00:00:00 2001
From: joaoluisam
Date: Wed, 18 Sep 2024 23:33:43 +0100
Subject: [PATCH 8/9] Revert back to 5s cachetimeout
---
core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml | 2 +-
core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
index 26d1e3a426a..c6ee9ed8ef2 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
@@ -19,7 +19,7 @@ BumpPercent = 40
BumpMin = '20 mwei'
[GasEstimator.FeeHistory]
-CacheTimeout = '2s'
+CacheTimeout = '5s'
[HeadTracker]
HistoryDepth = 2000
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
index 93160dd71b1..ffcc6266e30 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
@@ -20,7 +20,7 @@ BumpPercent = 40
BumpMin = '100 mwei'
[GasEstimator.FeeHistory]
-CacheTimeout = '2s'
+CacheTimeout = '5s'
[HeadTracker]
# Polygon suffers from a tremendous number of re-orgs, we need to set this to something very large to be conservative enough
From 2f8475972800bdf765331ff80b163d78bf4ca870 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Friedemann=20F=C3=BCrst?=
Date: Mon, 23 Sep 2024 15:31:17 +0200
Subject: [PATCH 9/9] Change timeout to 4 seconds
---
.../config/toml/defaults/Polygon_Zkevm_Cardona.toml | 7 ++++---
.../config/toml/defaults/Polygon_Zkevm_Mainnet.toml | 7 ++++---
docs/CONFIG.md | 12 ++++++------
3 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
index c6ee9ed8ef2..46ce80e29fc 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Cardona.toml
@@ -14,12 +14,13 @@ ResendAfterThreshold = '3m'
[GasEstimator]
Mode = 'FeeHistory'
-PriceMin = '1 mwei'
+# 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.FeeHistory]
-CacheTimeout = '5s'
+# Refresh the suggested price every 4 seconds, to stay slightly below their polling rate of 5s
+CacheTimeout = '4s'
[HeadTracker]
HistoryDepth = 2000
diff --git a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
index ffcc6266e30..2fef7874d17 100644
--- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
+++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml
@@ -15,12 +15,13 @@ ResendAfterThreshold = '3m'
[GasEstimator]
Mode = 'FeeHistory'
-PriceMin = '100 mwei'
+# 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.FeeHistory]
-CacheTimeout = '5s'
+# 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
diff --git a/docs/CONFIG.md b/docs/CONFIG.md
index 9296fe73a4b..da17dbfe6e5 100644
--- a/docs/CONFIG.md
+++ b/docs/CONFIG.md
@@ -4501,13 +4501,13 @@ Enabled = true
Mode = 'FeeHistory'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
-PriceMin = '100 mwei'
+PriceMin = '0'
LimitDefault = 500000
LimitMax = 500000
LimitMultiplier = '1'
LimitTransfer = 21000
EstimateLimit = false
-BumpMin = '100 mwei'
+BumpMin = '5 gwei'
BumpPercent = 40
BumpThreshold = 3
EIP1559DynamicFees = false
@@ -4523,7 +4523,7 @@ CheckInclusionPercentile = 90
TransactionPercentile = 60
[GasEstimator.FeeHistory]
-CacheTimeout = '5s'
+CacheTimeout = '4s'
[HeadTracker]
HistoryDepth = 2000
@@ -5005,13 +5005,13 @@ Enabled = true
Mode = 'FeeHistory'
PriceDefault = '20 gwei'
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
-PriceMin = '1 mwei'
+PriceMin = '0'
LimitDefault = 500000
LimitMax = 500000
LimitMultiplier = '1'
LimitTransfer = 21000
EstimateLimit = false
-BumpMin = '20 mwei'
+BumpMin = '5 gwei'
BumpPercent = 40
BumpThreshold = 3
EIP1559DynamicFees = false
@@ -5027,7 +5027,7 @@ CheckInclusionPercentile = 90
TransactionPercentile = 60
[GasEstimator.FeeHistory]
-CacheTimeout = '5s'
+CacheTimeout = '4s'
[HeadTracker]
HistoryDepth = 2000