Skip to content

Commit

Permalink
chore: break down zkevm configs
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Sep 26, 2024
1 parent f3f0bcd commit 0b2f9cc
Showing 1 changed file with 142 additions and 39 deletions.
181 changes: 142 additions & 39 deletions templates/cdk-erigon/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# _ ___ ____
# | | / _ \ / ___|
# | | | | | | | _
# | |__| |_| | |_| |
# |_____\___/ \____|

# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# Format logs with JSON.
# TODO: What's the diff between log.json and log.console.json?
# Default: false
Expand Down Expand Up @@ -37,14 +37,14 @@ log.dir.path: /tmp/cdk-erigon.log
log.dir.verbosity: {{.global_log_level}}


# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# ____ _____ _ _ _____ ____ _ _
# / ___| ____| \ | | ____| _ \ / \ | |
# | | _| _| | \| | _| | |_) | / _ \ | |
# | |_| | |___| |\ | |___| _ < / ___ \| |___
# \____|_____|_| \_|_____|_| \_\/_/ \_\_____|

# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# The data directory for the databases.
datadir: ./data/dynamic-kurtosis-sequencer

Expand Down Expand Up @@ -83,14 +83,129 @@ chain: dynamic-kurtosis
# override.shanghaiTime:


# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# ______ _________ ____ __
# |__ / |/ / ____\ \ / / \/ |
# / /| ' /| _| \ \ / /| |\/| |
# / /_| . \| |___ \ V / | | | |
# /____|_|\_\_____| \_/ |_| |_|
#
# --------------------------------------------------------------------------------------------------
# Rebuild the state tree after this many block behind.
# Default: 10_000
zkevm.rebuild-tree-after": 10_000

# Increment the state tree but never rebuild it.
# Default: false
zkevm.increment-tree-always: false

# Regenerate the SMT in memory.
# This requires a lot of RAM for most chains.
# Default: false
zkevm.smt-regenerate-in-memory: false

# TODO


# --------------------------------------------------------------------------------------------------
# ______ _________ ____ __ ____ _ _____ _ ____ _____ ____ _____ _ __ __
# |__ / |/ / ____\ \ / / \/ | | _ \ / \|_ _|/ \ / ___|_ _| _ \| ____| / \ | \/ |
# / /| ' /| _| \ \ / /| |\/| | _____ | | | |/ _ \ | | / _ \ \___ \ | | | |_) | _| / _ \ | |\/| |
# / /_| . \| |___ \ V / | | | | |_____| | |_| / ___ \| |/ ___ \ ___) || | | _ <| |___ / ___ \| | | |
# /____|_|\_\_____| \_/ |_| |_| |____/_/ \_\_/_/ \_\____/ |_| |_| \_\_____/_/ \_\_| |_|
#
# --------------------------------------------------------------------------------------------------
# The stream version indicator.
# Options:
# - 1: PreBigEndian
# - 2: BigEndian
# - 3: TODO: explain
# fork12 {{if eq .zkevm_rollup_fork_id "12"}}
zkevm.datastream-version: 3
# <fork12 {{else}}
zkevm.datastream-version: 2
# {{end}}

# The timeout for a datastreamer new block request.
# Default: 500ms
zkevm.datastream-new-block-timeout: 500ms


# --------------------------------------------------------------------------------------------------
# ______ _________ ____ __ ____ _____ ___ _ _ _____ _ _ ____ _____ ____
# |__ / |/ / ____\ \ / / \/ | / ___|| ____/ _ \| | | | ____| \ | |/ ___| ____| _ \
# / /| ' /| _| \ \ / /| |\/| | _____ \___ \| _|| | | | | | | _| | \| | | | _| | |_) |
# / /_| . \| |___ \ V / | | | | |_____| ___) | |__| |_| | |_| | |___| |\ | |___| |___| _ <
# /____|_|\_\_____| \_/ |_| |_| |____/|_____\__\_\\___/|_____|_| \_|\____|_____|_| \_\
#
# --------------------------------------------------------------------------------------------------
# The block seal time.
# Default: 6s
zkevm.sequencer-block-seal-time: 6s

# The batch seal time.
# Default: 12s
zkevm.sequencer-batch-seal-time: 12s

# The maximum time a batch verification could take, including retries.
# This could be interpreted as maximum that that the sequencer can run without executor.
# Setting it to 0s will remove the verification check and can create an infinite timeout.
# Defaults: 30m
zkevm.sequencer-batch-verification-timeout: 30m

# Timeout before requesting txs from the txpool if none were found before.
# Default: 250ms
zkevm.sequencer-timeout-on-empty-tx-pool: 250ms

# Halt the sequencer on this batch number.
# This setting is useful when performing an upgrade of the stack.
# Default: 0
zkevm.sequencer-halt-on-batch-number: 0

# When enabled, the sequencer will automatically resequence unseen batches stored in data stream.
# Default: false
zkevm.sequencer-resequence: false

# Strictly resequence the rolledback batches.
# Default: true
zkevm.sequencer-resequence-strict: true

# Reuse the L1 info index for resequencing.
# Default: true
zkevm.sequencer-resequence-reuse-l1-info-index: true


# --------------------------------------------------------------------------------------------------
# ______ _________ ____ __ _______ _______ ____ _ _ _____ ___ ____
# |__ / |/ / ____\ \ / / \/ | | ____\ \/ / ____/ ___| | | |_ _/ _ \| _ \
# / /| ' /| _| \ \ / /| |\/| | _____ | _| \ /| _|| | | | | | | || | | | |_) |
# / /_| . \| |___ \ V / | | | | |_____| | |___ / \| |__| |___| |_| | | || |_| | _ <
# /____|_|\_\_____| \_/ |_| |_| |_____/_/\_\_____\____|\___/ |_| \___/|_| \_\
#
# --------------------------------------------------------------------------------------------------
# Ensure that an executor URL has been set.
# Set to false to bypass the restriction.
zkevm.executor-strict: {{.erigon_strict_mode}}

# A comma separated list of grpc addresses that host executors
# Default: ""
# {{if .erigon_strict_mode}}
zkevm.executor-urls: zkevm-stateless-executor{{.deployment_suffix}}:{{.zkevm_executor_port}}
# else

# The timeout for the executor request
# Default: 60s
zkevm.executor-request-timeout: 60s


# --------------------------------------------------------------------------------------------------
# ______ _________ ____ __ _ ____ ____ ____ _____ ____ ____ _____ ____
# |__ / |/ / ____\ \ / / \/ | / \ | _ \| _ \| _ \| ____/ ___/ ___|| ____/ ___|
# / /| ' /| _| \ \ / /| |\/| | _____ / _ \ | | | | | | | |_) | _| \___ \___ \| _| \___ \
# / /_| . \| |___ \ V / | | | | |_____| / ___ \| |_| | |_| | _ <| |___ ___) |__) | |___ ___) |
# /____|_|\_\_____| \_/ |_| |_| /_/ \_\____/|____/|_| \_\_____|____/____/|_____|____/
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# The address of the sequencer EOA.
# Default: ""
zkevm.address-sequencer: "{{.zkevm_l2_sequencer_address}}"
Expand All @@ -112,14 +227,14 @@ zkevm.address-zkevm: "{{.zkevm_rollup_address}}"
zkevm.address-ger-manager: "{{.zkevm_global_exit_root_address}}"


# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# ______ _________ ____ __ _ _
# |__ / |/ / ____\ \ / / \/ | | | / |
# / /| ' /| _| \ \ / /| |\/| | _____ | | | |
# / /_| . \| |___ \ V / | | | | |_____| | |___| |
# /____|_|\_\_____| \_/ |_| |_| |_____|_|

# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# Designed for recovery of the network from the L1 batch data, slower mode of operation than the datastream.
# If set the datastream will not be used.
# Default: 0
Expand Down Expand Up @@ -182,49 +297,37 @@ zkevm.l1-finalized-block-requirement: 0
zkevm.l1-contract-address-check: true


# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# ______ _________ ____ __ _ ____
# |__ / |/ / ____\ \ / / \/ | | | |___ \
# / /| ' /| _| \ \ / /| |\/| | _____ | | __) |
# / /_| . \| |___ \ V / | | | | |_____| | |___ / __/
# /____|_|\_\_____| \_/ |_| |_| |_____|_____|
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# The L2 chain identifier.
# Default: 0
zkevm.l2-chain-id: {{.zkevm_rollup_chain_id}}

{{if not .is_sequencer}}
#{{if not .is_sequencer}}
# The upstream L2 node RPC endpoint.
# Default: ""
zkevm.l2-sequencer-rpc-url: {{.zkevm_sequencer_url}}

# The L2 datastreamer endpoint.
zkevm.l2-datastreamer-url: {{.zkevm_datastreamer_url}}
{{end}}
#{{end}}

# The time to wait for data to arrive from the stream before reporting an error.
# Set to 0s to remove the check.
zkevm.l2-datastreamer-timeout: 0s

# fork12 {{if eq .zkevm_rollup_fork_id "12"}}
zkevm.datastream-version: 3
# fork9 {{else}}
zkevm.datastream-version: 2
# end {{end}}


# strict mode {{if .erigon_strict_mode}}
zkevm.executor-strict: true
zkevm.executor-urls: zkevm-stateless-executor{{.deployment_suffix}}:{{.zkevm_executor_port}}
# default mode {{else}}
zkevm.executor-strict: false
# end {{end}}

zkevm.sequencer-batch-seal-time: 12s
zkevm.sequencer-block-seal-time: 6s


zkevm.rpc-ratelimit: 250
zkevm.disable-virtual-counters: false
zkevm.allow-pre-eip155-transactions: {{.erigon_pre_eip155_transactions}}
Expand All @@ -239,14 +342,14 @@ zkevm.pool-manager-url: {{.pool_manager_url}}



# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# _____ _____ _ _ _ _ _ ____ _ _
# | ____|_ _| | | | | | | / \ / ___|| | | |
# | _| | | | |_| | |_| | / _ \ \___ \| |_| |
# | |___ | | | _ | _ |/ ___ \ ___) | _ |
# |_____| |_| |_| |_|_| |_/_/ \_\____/|_| |_|
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# The number of recent ethash caches to keep in memory (16MB each).
# Default: 2
ethash.cachesinmem: 2
Expand All @@ -272,14 +375,14 @@ snapshots: false
externalcl: true


# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# _______ __ ____ ___ ___ _
# |_ _\ \/ / | _ \ / _ \ / _ \| |
# | | \ / | |_) | | | | | | | |
# | | / \ | __/| |_| | |_| | |___
# |_| /_/\_\ |_| \___/ \___/|_____|
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# Disable the internal transaction pool and block producer.
# Default: false
txpool.disable: {{not .is_sequencer}}
Expand Down Expand Up @@ -337,14 +440,14 @@ txpool.commit.every: 15s
# txpool.api.addr: localhost:9092


# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# _ _ _____ _______ _____ ____ _ __
# | \ | | ____|_ _\ \ / / _ \| _ \| |/ /
# | \| | _| | | \ \ /\ / / | | | |_) | ' /
# | |\ | |___ | | \ V V /| |_| | _ <| . \
# |_| \_|_____| |_| \_/\_/ \___/|_| \_\_|\_\
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# The maximum number of network peers
# The network will be disabled if set to 0.
# Default: 100
Expand All @@ -362,7 +465,7 @@ nodiscover: true
# | __/| _ < | | \ V / ___ \| | | |___
# |_| |_| \_\___| \_/_/ \_\_| |_____|
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# The address of Erigon's internal GRPC API.
# Default: 127.0.0.1:9090
private.api.addr: localhost:9092
Expand All @@ -380,7 +483,7 @@ private.api.ratelimit: 31872
# | || |_| | _ <| _ <| |___| |\ | | |
# |_| \___/|_| \_\_| \_\_____|_| \_| |_|
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# The listening port of the BitTorrent server.
# Default: 42069
torrent.port: 42070
Expand Down Expand Up @@ -453,7 +556,7 @@ rpc.txfeecap: 0 # no cap
# | _ | | | | | | __/ | _ <| __/| |___
# |_| |_| |_| |_| |_| |_| \_\_| \____|
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# Enable the HTTP RPC server.
# Default: true
http: true
Expand Down Expand Up @@ -500,7 +603,7 @@ http.rpcprefix: ""
# \ V V / ___) | | _ <| __/| |___
# \_/\_/ |____/ |_| \_\_| \____|
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# Enable the WS RPC server.
# Default: false
ws: true
Expand Down Expand Up @@ -537,7 +640,7 @@ ws.compression: false
# / ___ \ |_| | | | | _ | | _ <| __/| |___
# /_/ \_\___/ |_| |_| |_| |_| \_\_| \____|
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# The listening interface of the engine API.
# Default: localhost
#authrpc.addr: 0.0.0.0
Expand All @@ -561,7 +664,7 @@ ws.compression: false
# | | | | |___ | | | _ < | | |___ ___) |
# |_| |_|_____| |_| |_| \_\___\____|____/
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# Enable the metrics HTTP server.
# Default: false
metrics: true
Expand All @@ -582,7 +685,7 @@ metrics.port: 9090
# | __/| __/| _ <| |_| | _|
# |_| |_| |_| \_\\___/|_|
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# Enable the pprof HTTP server.
# Default: false
pprof: true
Expand All @@ -599,14 +702,14 @@ pprof.port: 6060
pprof.cpuprofile: /tmp/cdk-erigon.cpuprofile


# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# __ __ ___ _ _ _____ ____
# | \/ |_ _| \ | | ____| _ \
# | |\/| || || \| | _| | |_) |
# | | | || || |\ | |___| _ <
# |_| |_|___|_| \_|_____|_| \_\
#
# ------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# Enable mining.
# Default: false
mine: false
Expand Down

0 comments on commit 0b2f9cc

Please sign in to comment.