Skip to content

Commit

Permalink
feat: deploy_optimism_rollup always deploys isolated op stack
Browse files Browse the repository at this point in the history
Signed-off-by: Ji Hwan <jkim@polygon.technology>
  • Loading branch information
jhkimqd committed Feb 25, 2025
1 parent 2a65450 commit 8da1c89
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 25 deletions.
1 change: 1 addition & 0 deletions aggkit.star
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def create_bridge_config_artifact(
"zkevm_bridge_grpc_port": args["zkevm_bridge_grpc_port"],
"zkevm_bridge_rpc_port": args["zkevm_bridge_rpc_port"],
"zkevm_rpc_http_port": args["zkevm_rpc_http_port"],
"zkevm_bridge_metrics_port": args["zkevm_bridge_metrics_port"],
}
| contract_setup_addresses
| sovereign_contract_setup_addresses
Expand Down
28 changes: 6 additions & 22 deletions input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ DEFAULT_DEPLOYMENT_STAGES = {
# Deploy cdk-erigon node.
# TODO: Remove this parameter to incorporate cdk-erigon inside the central environment.
"deploy_cdk_erigon_node": True,
# Deploy only the OP sovereign stack.
"deploy_optimism_sovereign_isolated": False,
# Deploy Optimism rollup.
# Note the default behavior will only deploy the OP Stack without CDK Erigon stack.
# Setting to True will deploy the Aggkit components and Sovereign contracts as well.
# Requires consensus_contract_type to be "pessimistic".
"deploy_optimism_rollup": False,
"deploy_optimism_rollup": True,
# Deploy contracts on L2 (as well as fund accounts).
"deploy_l2_contracts": False,
}
Expand Down Expand Up @@ -337,19 +336,11 @@ DEFAULT_OP_STACK_ARGS = {
"count": 1,
},
],
# "batcher_params": {
# "image": "us-docker.pkg.dev/oplabs-tools-artifacts/images/op-batcher",
# },
# "proposer_params": {
# "image": "us-docker.pkg.dev/oplabs-tools-artifacts/images/op-proposer",
# },
},
],
# "op_contract_deployer_params": {
# "image": "us-docker.pkg.dev/oplabs-tools-artifacts/images/op-deployer:v0.0.7",
# "l1_artifacts_locator": "https://storage.googleapis.com/oplabs-contract-artifacts/artifacts-v1-9af7366a7102f51e8dbe451dcfa22971131d89e218915c91f420a164cc48be65.tar.gz",
# "l2_artifacts_locator": "https://storage.googleapis.com/oplabs-contract-artifacts/artifacts-v1-9af7366a7102f51e8dbe451dcfa22971131d89e218915c91f420a164cc48be65.tar.gz",
# },
"observability": {
"enabled": False,
},
}

DEFAULT_PLESS_ZKEVM_NODE_ARGS = {
Expand Down Expand Up @@ -387,7 +378,7 @@ DEFAULT_ARGS = (
# - 'rollup': Transaction data is stored on-chain on L1.
# - 'cdk-validium': Transaction data is stored off-chain using the CDK DA layer and a DAC.
# - 'pessimistic': deploy with pessmistic consensus
"consensus_contract_type": "cdk-validium",
"consensus_contract_type": "pessimistic",
# Additional services to run alongside the network.
# Options:
# - arpeggio
Expand Down Expand Up @@ -662,13 +653,6 @@ def args_sanity_check(plan, deployment_stages, args, op_stack_args):
"OP Stack rollup requires pessimistic consensus contract type. Change the consensus_contract_type parameter"
)

# If only isolated OP Stack is deployed, make sure the deploy_optimism_rollup parameter is set
if deployment_stages.get("deploy_optimism_sovereign_isolated", False):
if not deployment_stages.get("deploy_optimism_rollup", False):
fail(
"Isolated OP Stack rollup requires deploy_optimism_rollup parameter to be set to True."
)

# OP rollup check L1 blocktime >= L2 blocktime
if deployment_stages.get("deploy_optimism_rollup", False):
if (
Expand Down
4 changes: 2 additions & 2 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def run(plan, args={}):
plan.print("Skipping the deployment of databases")

# Get the genesis file.
if not deployment_stages.get("deploy_optimism_sovereign_isolated", False):
if not deployment_stages.get("deploy_optimism_rollup", False):
genesis_artifact = ""
if deployment_stages.get("deploy_cdk_central_environment", False):
plan.print("Getting genesis file")
Expand All @@ -108,7 +108,7 @@ def run(plan, args={}):
else:
plan.print("Skipping the deployment of the agglayer")

if not deployment_stages.get("deploy_optimism_sovereign_isolated", False):
if not deployment_stages.get("deploy_optimism_rollup", False):
# Deploy cdk central/trusted environment.
if deployment_stages.get("deploy_cdk_central_environment", False):
# Deploy cdk-erigon sequencer node.
Expand Down
7 changes: 6 additions & 1 deletion templates/sovereign-rollup/sovereign-bridge-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,9 @@ FrequencyToMonitorTxs = "5s"
PrivateKey = {Path = "/etc/zkevm/claimtx.keystore", Password = "{{.zkevm_l2_keystore_password}}"}
Enabled = true
RetryInterval = "1s"
RetryNumber = 10
RetryNumber = 10

[Metrics]
Enabled = true
Host = "0.0.0.0"
Port = "{{.zkevm_bridge_metrics_port}}"

0 comments on commit 8da1c89

Please sign in to comment.