Skip to content

Commit

Permalink
Override RpcDefaultBatchSize for Polygon (#11962)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
reductionista and makramkd authored Feb 8, 2024
1 parent 484011f commit aab449c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Polygon_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Polygon_Mumbai.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ LogPollInterval = '1s'
MinIncomingConfirmations = 5
NoNewHeadsThreshold = '30s'
RPCBlockQueryDelay = 10
RPCDefaultBatchSize = 100

[Transactions]
ResendAfterThreshold = '1m'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FinalityDepth = 1
NoNewHeadsThreshold = '12m'
MinIncomingConfirmations = 1
LogPollInterval = '30s'
RPCDefaultBatchSize = 100

[OCR]
ContractConfirmations = 1
Expand All @@ -19,4 +20,4 @@ BumpMin = '20 mwei'
BlockHistorySize = 12

[HeadTracker]
HistoryDepth = 50
HistoryDepth = 50
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ NoNewHeadsThreshold = '6m'
MinIncomingConfirmations = 1
LogPollInterval = '30s'
RPCBlockQueryDelay = 15
RPCDefaultBatchSize = 100

[OCR]
ContractConfirmations = 1
Expand All @@ -20,4 +21,4 @@ BumpMin = '100 mwei'
BlockHistorySize = 12

[HeadTracker]
HistoryDepth = 50
HistoryDepth = 50
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ MinIncomingConfirmations = 5
MinContractPayment = '0.00001 link'
NonceAutoSync = true
NoNewHeadsThreshold = '30s'
RPCDefaultBatchSize = 250
RPCDefaultBatchSize = 100
RPCBlockQueryDelay = 10

[EVM.Transactions]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ MinIncomingConfirmations = 5
MinContractPayment = '0.00001 link'
NonceAutoSync = true
NoNewHeadsThreshold = '30s'
RPCDefaultBatchSize = 250
RPCDefaultBatchSize = 100
RPCBlockQueryDelay = 10

[EVM.Transactions]
Expand Down
8 changes: 4 additions & 4 deletions docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2743,7 +2743,7 @@ MinIncomingConfirmations = 5
MinContractPayment = '0.00001 link'
NonceAutoSync = true
NoNewHeadsThreshold = '30s'
RPCDefaultBatchSize = 250
RPCDefaultBatchSize = 100
RPCBlockQueryDelay = 10

[Transactions]
Expand Down Expand Up @@ -3471,7 +3471,7 @@ MinIncomingConfirmations = 1
MinContractPayment = '0.00001 link'
NonceAutoSync = true
NoNewHeadsThreshold = '6m0s'
RPCDefaultBatchSize = 250
RPCDefaultBatchSize = 100
RPCBlockQueryDelay = 15

[Transactions]
Expand Down Expand Up @@ -3793,7 +3793,7 @@ MinIncomingConfirmations = 1
MinContractPayment = '0.00001 link'
NonceAutoSync = true
NoNewHeadsThreshold = '12m0s'
RPCDefaultBatchSize = 250
RPCDefaultBatchSize = 100
RPCBlockQueryDelay = 1

[Transactions]
Expand Down Expand Up @@ -4763,7 +4763,7 @@ MinIncomingConfirmations = 5
MinContractPayment = '0.00001 link'
NonceAutoSync = true
NoNewHeadsThreshold = '30s'
RPCDefaultBatchSize = 250
RPCDefaultBatchSize = 100
RPCBlockQueryDelay = 10

[Transactions]
Expand Down

0 comments on commit aab449c

Please sign in to comment.