diff --git a/core/chains/evm/config/toml/defaults/zkSync_Mainnet.toml b/core/chains/evm/config/toml/defaults/zkSync_Mainnet.toml index 02ce2b0f18..a434cd3815 100644 --- a/core/chains/evm/config/toml/defaults/zkSync_Mainnet.toml +++ b/core/chains/evm/config/toml/defaults/zkSync_Mainnet.toml @@ -1,14 +1,28 @@ ChainID = '324' ChainType = 'zksync' -FinalityDepth = 10 +# 1200block ~ 20min concurrent with the l1_committed tag +FinalityDepth = 1200 +# block rate is ~2-5sec, so this ensures blocks are polled correctly LogPollInterval = '5s' -MinIncomingConfirmations = 1 +# sufficient time for RPC to be labelled out of sync, since blockRate is pretty fast NoNewHeadsThreshold = '1m' [GasEstimator] -LimitDefault = 100_000_000 -PriceMax = 18446744073709551615 -PriceMin = 0 +# no EIP1559 to ensure our estimator doesnot estimate gas with MaxPriorityFee which will break minFunding requirement +EIP1559DynamicFees = false +# high LimitDefault for worst case pubdata bytes with BatchGasLimit reduced to 4M in OCR2Config +LimitDefault = 2_500_000_000 +FeeCapDefault = '500 mwei' +PriceDefault = '25 mwei' +# p999 value for gasPrice based on historical data +PriceMax = '500 mwei' +# avg gasPrices are at 0.025 gwei +PriceMin = '25 mwei' + +[GasEstimator.BlockHistory] +# increasing this to smooth out gas estimation +BlockHistorySize = 200 [HeadTracker] -HistoryDepth = 50 +# tracks top N blocks to keep in heads database table. Should store atleast the same # of blocks as finalityDepth +HistoryDepth = 1500 \ No newline at end of file diff --git a/core/chains/evm/config/toml/defaults/zkSync_Sepolia.toml b/core/chains/evm/config/toml/defaults/zkSync_Sepolia.toml index b4e957a6c9..f3bc594886 100644 --- a/core/chains/evm/config/toml/defaults/zkSync_Sepolia.toml +++ b/core/chains/evm/config/toml/defaults/zkSync_Sepolia.toml @@ -1,14 +1,28 @@ ChainID = '300' ChainType = 'zksync' -FinalityDepth = 10 +# 200block ~ 20min concurrent with the l1_committed tag +FinalityDepth = 200 +# block rate is ~2-5sec, so this ensures blocks are polled correctly LogPollInterval = '5s' -MinIncomingConfirmations = 1 +# sufficient time for RPC to be labelled out of sync, since blockRate is pretty fast NoNewHeadsThreshold = '1m' [GasEstimator] -LimitDefault = 100_000_000 -PriceMax = 18446744073709551615 -PriceMin = 0 +# no EIP1559 to ensure our estimator doesnot estimate gas with MaxPriorityFee which will break minFunding requirement +EIP1559DynamicFees = false +# high LimitDefault for worst case pubdata bytes with BatchGasLimit reduced to 4M in OCR2Config +LimitDefault = 2_500_000_000 +FeeCapDefault = '500 mwei' +PriceDefault = '25 mwei' +# p999 value for gasPrice based on historical data +PriceMax = '500 mwei' +# avg gasPrices are at 0.025 gwei +PriceMin = '25 mwei' + +[GasEstimator.BlockHistory] +# increasing this to smooth out gas estimation +BlockHistorySize = 200 [HeadTracker] -HistoryDepth = 50 +# tracks top N blocks to keep in heads database table. Should store atleast the same # of blocks as finalityDepth +HistoryDepth = 250 \ No newline at end of file diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 03af3e44e6..d94edbd2d4 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -3631,14 +3631,14 @@ AutoCreateKey = true BlockBackfillDepth = 10 BlockBackfillSkip = false ChainType = 'zksync' -FinalityDepth = 10 +FinalityDepth = 200 FinalityTagEnabled = false LogBackfillBatchSize = 1000 LogPollInterval = '5s' LogKeepBlocksDepth = 100000 LogPrunePageSize = 10000 BackupLogPollerBlockDelay = 100 -MinIncomingConfirmations = 1 +MinIncomingConfirmations = 3 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '1m0s' @@ -3662,10 +3662,10 @@ Enabled = true [GasEstimator] Mode = 'BlockHistory' -PriceDefault = '20 gwei' -PriceMax = '18.446744073709551615 ether' -PriceMin = '0' -LimitDefault = 100000000 +PriceDefault = '25 mwei' +PriceMax = '500 mwei' +PriceMin = '25 mwei' +LimitDefault = 2500000000 LimitMax = 8000000 LimitMultiplier = '1' LimitTransfer = 21000 @@ -3673,19 +3673,19 @@ BumpMin = '5 gwei' BumpPercent = 20 BumpThreshold = 3 EIP1559DynamicFees = false -FeeCapDefault = '100 gwei' +FeeCapDefault = '500 mwei' TipCapDefault = '1 wei' TipCapMin = '1 wei' [GasEstimator.BlockHistory] BatchSize = 25 -BlockHistorySize = 8 +BlockHistorySize = 200 CheckInclusionBlocks = 12 CheckInclusionPercentile = 90 TransactionPercentile = 60 [HeadTracker] -HistoryDepth = 50 +HistoryDepth = 250 MaxBufferSize = 3 SamplingInterval = '1s' MaxAllowedFinalityDepth = 10000 @@ -3724,14 +3724,14 @@ AutoCreateKey = true BlockBackfillDepth = 10 BlockBackfillSkip = false ChainType = 'zksync' -FinalityDepth = 10 +FinalityDepth = 1200 FinalityTagEnabled = false LogBackfillBatchSize = 1000 LogPollInterval = '5s' LogKeepBlocksDepth = 100000 LogPrunePageSize = 10000 BackupLogPollerBlockDelay = 100 -MinIncomingConfirmations = 1 +MinIncomingConfirmations = 3 MinContractPayment = '0.00001 link' NonceAutoSync = true NoNewHeadsThreshold = '1m0s' @@ -3755,10 +3755,10 @@ Enabled = true [GasEstimator] Mode = 'BlockHistory' -PriceDefault = '20 gwei' -PriceMax = '18.446744073709551615 ether' -PriceMin = '0' -LimitDefault = 100000000 +PriceDefault = '25 mwei' +PriceMax = '500 mwei' +PriceMin = '25 mwei' +LimitDefault = 2500000000 LimitMax = 8000000 LimitMultiplier = '1' LimitTransfer = 21000 @@ -3766,19 +3766,19 @@ BumpMin = '5 gwei' BumpPercent = 20 BumpThreshold = 3 EIP1559DynamicFees = false -FeeCapDefault = '100 gwei' +FeeCapDefault = '500 mwei' TipCapDefault = '1 wei' TipCapMin = '1 wei' [GasEstimator.BlockHistory] BatchSize = 25 -BlockHistorySize = 8 +BlockHistorySize = 200 CheckInclusionBlocks = 12 CheckInclusionPercentile = 90 TransactionPercentile = 60 [HeadTracker] -HistoryDepth = 50 +HistoryDepth = 1500 MaxBufferSize = 3 SamplingInterval = '1s' MaxAllowedFinalityDepth = 10000