Skip to content

Commit

Permalink
expose SUPERVISOR_ENDPOINT
Browse files Browse the repository at this point in the history
  • Loading branch information
edobry committed Dec 19, 2024
1 parent 09c62c3 commit 1cb7b33
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
9 changes: 5 additions & 4 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def run(plan, args):
global_log_level = optimism_args_with_right_defaults.global_log_level
persistent = optimism_args_with_right_defaults.persistent

interop_params = optimism_args_with_right_defaults.interop

# Deploy the L1
l1_network = ""
if external_l1_args:
Expand Down Expand Up @@ -97,15 +99,14 @@ def run(plan, args):
global_node_selectors,
global_tolerations,
persistent,
interop_params
))

if optimism_args_with_right_defaults.interop.enabled:
# deploy op-supervisor
if interop_params.enabled:
op_supervisor_launcher.launch(
plan,
"op-supervisor",
all_participants,
optimism_args_with_right_defaults.interop.supervisor_params,
interop_params.supervisor_params,
)

return
Expand Down
11 changes: 7 additions & 4 deletions src/supervisor/op-supervisor/op_supervisor_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ ethereum_package_constants = import_module(
"github.com/ethpandaops/ethereum-package/src/package_io/constants.star"
)

SUPERVISOR_SERVICE_NAME = "op-supervisor"

# Port IDs
SUPERVISOR_RPC_PORT_ID = "rpc"

# Port nums
SUPERVISOR_RPC_PORT_NUM = 8545

SUPERVISOR_ENDPOINT = "http://{0}:{1}".format(
SUPERVISOR_SERVICE_NAME, SUPERVISOR_RPC_PORT_NUM
)

def get_used_ports():
used_ports = {
SUPERVISOR_RPC_PORT_ID: ethereum_package_shared_utils.new_port_spec(
Expand All @@ -29,7 +35,6 @@ DEPENDENCY_SET_FILE_NAME = "dependency_set.json"

def launch(
plan,
service_name,
all_participants,
supervisor_params,
):
Expand All @@ -42,19 +47,17 @@ def launch(

config = get_supervisor_config(
plan,
service_name,
all_participants,
dependency_set_artifact,
supervisor_params,
)

supervisor_service = plan.add_service(service_name, config)
supervisor_service = plan.add_service(SUPERVISOR_SERVICE_NAME, config)

return "op_supervisor"

def get_supervisor_config(
plan,
service_name,
all_participants,
dependency_set_artifact,
supervisor_params,
Expand Down

0 comments on commit 1cb7b33

Please sign in to comment.