Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Add zksync config #1121

Merged
merged 4 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions core/chains/evm/config/toml/defaults/zkSync_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 20 additions & 6 deletions core/chains/evm/config/toml/defaults/zkSync_Sepolia.toml
Original file line number Diff line number Diff line change
@@ -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
36 changes: 18 additions & 18 deletions docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -3662,30 +3662,30 @@ 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
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
Expand Down Expand Up @@ -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'
Expand All @@ -3755,30 +3755,30 @@ 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
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
Expand Down
Loading