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: minor fixes #90

Merged
merged 2 commits into from
Apr 26, 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
56 changes: 39 additions & 17 deletions cdk_blutgang.star
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
},
)

Expand All @@ -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",
)
)
4 changes: 3 additions & 1 deletion main.star
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -198,4 +200,4 @@ def run(
blutgang_args = dict(args)
blutgang_package.run(plan, blutgang_args)
else:
plan.print("Skipping the deployment of blutgang")
plan.print("Skipping the deployment of blutgang")
Loading