diff --git a/cdk_blutgang.star b/cdk_blutgang.star index 1fcbc272..48c0ad5d 100644 --- a/cdk_blutgang.star +++ b/cdk_blutgang.star @@ -4,27 +4,49 @@ def run(plan, args): src="./templates/blutgang/blutgang-config.toml" ) - zkevm_sequencer_service = plan.get_service(name="zkevm-node-sequencer" + args["deployment_suffix"]) - zkevm_sequencer_http_url = "http://{}:{}".format(zkevm_sequencer_service.ip_address, zkevm_sequencer_service.ports["rpc"].number) + zkevm_sequencer_service = plan.get_service( + name="zkevm-node-sequencer" + args["deployment_suffix"] + ) + zkevm_sequencer_http_url = "http://{}:{}".format( + zkevm_sequencer_service.ip_address, zkevm_sequencer_service.ports["rpc"].number + ) - zkevm_rpc_service = plan.get_service(name="zkevm-node-rpc" + args["deployment_suffix"]) - zkevm_rpc_http_url = "http://{}:{}".format(zkevm_rpc_service.ip_address, zkevm_rpc_service.ports["http-rpc"].number) - zkevm_rpc_ws_url = "ws://{}:{}".format(zkevm_rpc_service.ip_address, zkevm_rpc_service.ports["ws-rpc"].number) + zkevm_rpc_service = plan.get_service( + name="zkevm-node-rpc" + args["deployment_suffix"] + ) + zkevm_rpc_http_url = "http://{}:{}".format( + zkevm_rpc_service.ip_address, zkevm_rpc_service.ports["http-rpc"].number + ) + zkevm_rpc_ws_url = "ws://{}:{}".format( + zkevm_rpc_service.ip_address, zkevm_rpc_service.ports["ws-rpc"].number + ) - zkevm_rpc_pless_service = plan.get_service(name="zkevm-node-rpc-pless" + args["deployment_suffix"]) - zkevm_rpc_pless_http_url = "http://{}:{}".format(zkevm_rpc_pless_service.ip_address, zkevm_rpc_pless_service.ports["http-rpc"].number) - zkevm_rpc_pless_ws_url = "ws://{}:{}".format(zkevm_rpc_pless_service.ip_address, zkevm_rpc_pless_service.ports["ws-rpc"].number) + zkevm_rpc_pless_service = plan.get_service( + name="zkevm-node-rpc-pless" + args["deployment_suffix"] + ) + zkevm_rpc_pless_http_url = "http://{}:{}".format( + zkevm_rpc_pless_service.ip_address, + zkevm_rpc_pless_service.ports["http-rpc"].number, + ) + zkevm_rpc_pless_ws_url = "ws://{}:{}".format( + zkevm_rpc_pless_service.ip_address, + zkevm_rpc_pless_service.ports["ws-rpc"].number, + ) blutgang_config_artifact = plan.render_templates( name="blutgang-config-artifact", config={ - "blutgang-config.toml": struct(template=blutgang_config_template, data={ - "l2_sequencer_url": zkevm_sequencer_http_url, - "l2_rpc_url": zkevm_rpc_http_url, - "l2_ws_url": zkevm_rpc_ws_url, - "l2_rpc_pless_url": zkevm_rpc_pless_http_url, - "l2_ws_pless_url": zkevm_rpc_pless_ws_url, - } | args) + "blutgang-config.toml": struct( + template=blutgang_config_template, + data={ + "l2_sequencer_url": zkevm_sequencer_http_url, + "l2_rpc_url": zkevm_rpc_http_url, + "l2_ws_url": zkevm_rpc_ws_url, + "l2_rpc_pless_url": zkevm_rpc_pless_http_url, + "l2_ws_pless_url": zkevm_rpc_pless_ws_url, + } + | args, + ) }, ) @@ -41,11 +63,11 @@ def run(plan, args): ] ), }, - cmd=["/app/blutgang", "-c", "/etc/blutgang/blutgang-config.toml"] + cmd=["/app/blutgang", "-c", "/etc/blutgang/blutgang-config.toml"], ) plan.add_service( name=blutgang_name, config=blutgang_service_config, description="Starting blutgang service", - ) \ No newline at end of file + ) diff --git a/main.star b/main.star index b516fd6a..bdc77925 100644 --- a/main.star +++ b/main.star @@ -7,6 +7,7 @@ zkevm_permissionless_node_package = import_module("./zkevm_permissionless_node.s observability_package = import_module("./observability.star") blutgang_package = import_module("./cdk_blutgang.star") + def run( plan, deploy_l1=True, @@ -103,6 +104,7 @@ def run( "zkevm_aggregator_host": "zkevm-node-aggregator-001", "genesis_file": "templates/permissionless-node/genesis.json", "polycli_version": "v0.1.42", + "l1_additional_services": [], "blutgang_image": "makemake1337/blutgang:latest", "blutgang_rpc_port": "55555", "blutgang_admin_port": "55556", @@ -198,4 +200,4 @@ def run( blutgang_args = dict(args) blutgang_package.run(plan, blutgang_args) else: - plan.print("Skipping the deployment of blutgang") \ No newline at end of file + plan.print("Skipping the deployment of blutgang")