diff --git a/cdk_central_environment.star b/cdk_central_environment.star index 236bd3d1..e315343a 100644 --- a/cdk_central_environment.star +++ b/cdk_central_environment.star @@ -26,9 +26,11 @@ def run(plan, args): ) }, ) - zkevm_prover_package.start_prover( - plan, args, prover_config_artifact, "zkevm_prover_start_port" - ) + + if not args["zkevm_use_real_verifier"] and not args["enable_normalcy"]: + zkevm_prover_package.start_prover( + plan, args, prover_config_artifact, "zkevm_prover_start_port" + ) # Get the genesis file artifact. # TODO: Retrieve the genesis file artifact once it is available in Kurtosis. diff --git a/cdk_erigon.star b/cdk_erigon.star index f567a7a8..adee8397 100644 --- a/cdk_erigon.star +++ b/cdk_erigon.star @@ -31,6 +31,7 @@ def run_sequencer(plan, args): template=cdk_erigon_chain_spec_template, data={ "chain_id": args["zkevm_rollup_chain_id"], + "enable_normalcy": args["enable_normalcy"], }, ), }, @@ -125,6 +126,7 @@ def run_rpc(plan, args): template=cdk_erigon_chain_spec_template, data={ "chain_id": args["zkevm_rollup_chain_id"], + "enable_normalcy": args["enable_normalcy"], }, ), }, diff --git a/input_parser.star b/input_parser.star index f61aabf4..1ddc2789 100644 --- a/input_parser.star +++ b/input_parser.star @@ -227,6 +227,9 @@ DEFAULT_ROLLUP_ARGS = { # Docker/Kubernetes cluster". # https://docs.kurtosis.com/advanced-concepts/public-and-private-ips-and-ports/ "use_dynamic_ports": True, + # Set this to true to disable all special logics in hermez and only enable bridge update in pre-block execution + # https://hackmd.io/@4cbvqzFdRBSWMHNeI8Wbwg/r1hKHp_S0 + "enable_normalcy": False, } DEFAULT_PLESS_ZKEVM_NODE_ARGS = { @@ -301,6 +304,9 @@ def parse_args(plan, args): deploy_cdk_erigon_node = deployment_stages.get("deploy_cdk_erigon_node", False) l2_rpc_name = get_l2_rpc_name(deploy_cdk_erigon_node) + if args["enable_normalcy"] and args["erigon_strict_mode"]: + fail("normalcy and strict mode cannot be enabled together") + # Determine static ports, if specified. if not args.get("use_dynamic_ports", True): plan.print("Using static ports.") diff --git a/templates/cdk-erigon/chainspec.json b/templates/cdk-erigon/chainspec.json index 9716333f..bd58dcb2 100644 --- a/templates/cdk-erigon/chainspec.json +++ b/templates/cdk-erigon/chainspec.json @@ -12,13 +12,14 @@ "istanbulBlock": 0, "muirGlacierBlock": 0, "berlinBlock": 0, - "londonBlock": 9999999999999999999999999999999999999999999999999, + "londonBlock": {{if .enable_normalcy}}0{{else}}9999999999999999999999999999999999999999999999999{{end}}, "arrowGlacierBlock": 9999999999999999999999999999999999999999999999999, "grayGlacierBlock": 9999999999999999999999999999999999999999999999999, - "terminalTotalDifficulty": 58750000000000000000000, + {{if not .enable_normalcy}}"terminalTotalDifficulty": 58750000000000000000000,{{end}} "terminalTotalDifficultyPassed": false, - "shanghaiTime": 9999999999999999999999999999999999999999999999999, - "cancunTime": 9999999999999999999999999999999999999999999999999, + "shanghaiTime": {{if .enable_normalcy}}0{{else}}9999999999999999999999999999999999999999999999999{{end}}, + "cancunTime": {{if .enable_normalcy}}0{{else}}9999999999999999999999999999999999999999999999999{{end}}, + "normalcyBlock": {{if .enable_normalcy}}0{{else}}9999999999999999999999999999999999999999999999999{{end}}, "pragueTime": 9999999999999999999999999999999999999999999999999, "ethash": {} -} \ No newline at end of file +} diff --git a/templates/cdk-erigon/config.yml b/templates/cdk-erigon/config.yml index c147c22e..fba46d3f 100644 --- a/templates/cdk-erigon/config.yml +++ b/templates/cdk-erigon/config.yml @@ -149,7 +149,12 @@ zkevm.reject-smart-contract-deployments: false # Disables virtual counters, which are used by sequencer nodes when external execution is not enabled. # This can impact performance and transaction processing capabilities. # Default: false +# {{if .enable_normalcy}} +zkevm.disable-virtual-counters: true +# {{else}} zkevm.disable-virtual-counters: false +# {{end}} + # Multiplier used to reduce the depth of SMT when calculating virtual counters. # A value less than 1 will decrease SMT depth, potentially improving performance but may affect accuracy.