From aab449cb53a4eda68bbb2565572593719ca4afec Mon Sep 17 00:00:00 2001 From: Domino Valdano <2644901+reductionista@users.noreply.github.com> Date: Thu, 8 Feb 2024 05:17:51 -0800 Subject: [PATCH] Override RpcDefaultBatchSize for Polygon (#11962) * Override RpcDefaultBatchSize for Polygon Default batch size setting in geth is 250, but for polygon's client bor it's 100 Setting it to 250 on our side causes bor to give invalid responses back * fix test * fix more tests --------- Co-authored-by: Makram Kamaleddine --- core/chains/evm/config/toml/defaults/Polygon_Mainnet.toml | 1 + core/chains/evm/config/toml/defaults/Polygon_Mumbai.toml | 1 + .../evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml | 3 ++- .../evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml | 3 ++- .../chainlink/testdata/config-multi-chain-effective.toml | 2 +- .../resolver/testdata/config-multi-chain-effective.toml | 2 +- docs/CONFIG.md | 8 ++++---- 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/core/chains/evm/config/toml/defaults/Polygon_Mainnet.toml b/core/chains/evm/config/toml/defaults/Polygon_Mainnet.toml index 3602de6d037..c4246bb82be 100644 --- a/core/chains/evm/config/toml/defaults/Polygon_Mainnet.toml +++ b/core/chains/evm/config/toml/defaults/Polygon_Mainnet.toml @@ -8,6 +8,7 @@ MinIncomingConfirmations = 5 NoNewHeadsThreshold = '30s' # Must be set to something large here because Polygon has so many re-orgs that otherwise we are constantly refetching RPCBlockQueryDelay = 10 +RPCDefaultBatchSize = 100 [Transactions] # Matic nodes under high mempool pressure are liable to drop txes, we need to ensure we keep sending them diff --git a/core/chains/evm/config/toml/defaults/Polygon_Mumbai.toml b/core/chains/evm/config/toml/defaults/Polygon_Mumbai.toml index 8cd42ccd034..e3dd2f6c689 100644 --- a/core/chains/evm/config/toml/defaults/Polygon_Mumbai.toml +++ b/core/chains/evm/config/toml/defaults/Polygon_Mumbai.toml @@ -5,6 +5,7 @@ LogPollInterval = '1s' MinIncomingConfirmations = 5 NoNewHeadsThreshold = '30s' RPCBlockQueryDelay = 10 +RPCDefaultBatchSize = 100 [Transactions] ResendAfterThreshold = '1m' 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 f42391964bd..58451679558 100644 --- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml +++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Goerli.toml @@ -3,6 +3,7 @@ FinalityDepth = 1 NoNewHeadsThreshold = '12m' MinIncomingConfirmations = 1 LogPollInterval = '30s' +RPCDefaultBatchSize = 100 [OCR] ContractConfirmations = 1 @@ -19,4 +20,4 @@ BumpMin = '20 mwei' BlockHistorySize = 12 [HeadTracker] -HistoryDepth = 50 \ No newline at end of file +HistoryDepth = 50 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 248a521f94b..6be91b0e2cc 100644 --- a/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml +++ b/core/chains/evm/config/toml/defaults/Polygon_Zkevm_Mainnet.toml @@ -4,6 +4,7 @@ NoNewHeadsThreshold = '6m' MinIncomingConfirmations = 1 LogPollInterval = '30s' RPCBlockQueryDelay = 15 +RPCDefaultBatchSize = 100 [OCR] ContractConfirmations = 1 @@ -20,4 +21,4 @@ BumpMin = '100 mwei' BlockHistorySize = 12 [HeadTracker] -HistoryDepth = 50 \ No newline at end of file +HistoryDepth = 50 diff --git a/core/services/chainlink/testdata/config-multi-chain-effective.toml b/core/services/chainlink/testdata/config-multi-chain-effective.toml index 7d38b3ac456..03990b02a50 100644 --- a/core/services/chainlink/testdata/config-multi-chain-effective.toml +++ b/core/services/chainlink/testdata/config-multi-chain-effective.toml @@ -413,7 +413,7 @@ MinIncomingConfirmations = 5 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '30s' -RPCDefaultBatchSize = 250 +RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 10 [EVM.Transactions] diff --git a/core/web/resolver/testdata/config-multi-chain-effective.toml b/core/web/resolver/testdata/config-multi-chain-effective.toml index 7d38b3ac456..03990b02a50 100644 --- a/core/web/resolver/testdata/config-multi-chain-effective.toml +++ b/core/web/resolver/testdata/config-multi-chain-effective.toml @@ -413,7 +413,7 @@ MinIncomingConfirmations = 5 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '30s' -RPCDefaultBatchSize = 250 +RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 10 [EVM.Transactions] diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 03337d15dae..af25ea18e50 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -2743,7 +2743,7 @@ MinIncomingConfirmations = 5 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '30s' -RPCDefaultBatchSize = 250 +RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 10 [Transactions] @@ -3471,7 +3471,7 @@ MinIncomingConfirmations = 1 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '6m0s' -RPCDefaultBatchSize = 250 +RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 15 [Transactions] @@ -3793,7 +3793,7 @@ MinIncomingConfirmations = 1 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '12m0s' -RPCDefaultBatchSize = 250 +RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 1 [Transactions] @@ -4763,7 +4763,7 @@ MinIncomingConfirmations = 5 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '30s' -RPCDefaultBatchSize = 250 +RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 10 [Transactions]