Skip to content
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
22 changes: 22 additions & 0 deletions .github/workflows/per-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ jobs:
- name: Run Starlark
run: kurtosis run ${{ github.workspace }} --args-file ${{ matrix.file_name }} --verbosity detailed

- name: Dump logs
run: kurtosis dump ./.kurtosis-dump && ls -al .kurtosis-dump
if: ${{ failure() }}

- name: Store logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: kurtosis-logs
path: ./.kurtosis-dump/enclaves/

# Make sure that `kurtosis run .` without an --args-file works fine (the defaults in input_parser.star are correct)
run_without_args:
name: Run kurtosis without arguments
Expand All @@ -41,6 +52,17 @@ jobs:
- name: Run Starlark
run: kurtosis run ${{ github.workspace }} --verbosity detailed

- name: Dump logs
run: kurtosis dump .kurtosis-dump && ls -al .kurtosis-dump
if: ${{ failure() }}

- name: Store logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: kurtosis-logs
path: .kurtosis-dump/

run_k8s_test:
name: Run k8s tests
uses: ./.github/workflows/reusable-run-k8s.yml
Expand Down
15 changes: 15 additions & 0 deletions src/cl/op-node/launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def launch(
network_params,
da_params,
supervisors_params,
conductor_params,
is_sequencer,
jwt_file,
deployment_output,
Expand Down Expand Up @@ -72,6 +73,7 @@ def launch(
network_params=network_params,
da_params=da_params,
supervisors_params=supervisors_params,
conductor_params=conductor_params,
is_sequencer=is_sequencer,
jwt_file=jwt_file,
deployment_output=deployment_output,
Expand Down Expand Up @@ -123,6 +125,7 @@ def get_service_config(
network_params,
da_params,
supervisors_params,
conductor_params,
jwt_file,
deployment_output,
is_sequencer,
Expand Down Expand Up @@ -253,6 +256,18 @@ def get_service_config(
"--sequencer.l1-confs=2",
]

if conductor_params:
cmd += [
"--conductor.enabled=true",
"--conductor.rpc={0}".format(
_net.service_url(
conductor_params.service_name,
conductor_params.ports[_net.RPC_PORT_NAME],
)
),
"--sequencer.stopped=true",
]

if len(cl_contexts) > 0:
cmd.append(
"--p2p.bootnodes="
Expand Down
3 changes: 2 additions & 1 deletion src/cl/op-node/op_node_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,14 @@ def get_beacon_config(

if conductor_params:
cmd += [
"--conductor.enabled={0}".format("true"),
"--conductor.enabled=true",
"--conductor.rpc={0}".format(
_net.service_url(
conductor_params.service_name,
conductor_params.ports[_net.RPC_PORT_NAME],
)
),
"--sequencer.stopped=true",
]

if len(existing_cl_clients) > 0:
Expand Down
1 change: 1 addition & 0 deletions src/l2/launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def launch(
network_params=network_params,
da_params=params.da_params,
supervisors_params=supervisors_params,
conductor_params=participant_params.conductor_params,
is_sequencer=is_sequencer,
el_context=el.context,
cl_contexts=cl_contexts,
Expand Down
14 changes: 11 additions & 3 deletions src/l2/participant/cl/launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ _hildr_launcher = import_module("/src/cl/hildr/launcher.star")
_kona_node_launcher = import_module("/src/cl/kona-node/launcher.star")
_op_node_launcher = import_module("/src/cl/op-node/launcher.star")

_filter = import_module("/src/util/filter.star")


def launch(
plan,
params,
network_params,
supervisors_params,
conductor_params,
da_params,
is_sequencer,
jwt_file,
Expand All @@ -21,8 +24,10 @@ def launch(
node_selectors,
observability_helper,
):
cl = None

if params.type == "hildr":
return _hildr_launcher.launch(
cl = _hildr_launcher.launch(
plan=plan,
params=params,
network_params=network_params,
Expand All @@ -39,7 +44,7 @@ def launch(
observability_helper=observability_helper,
)
elif params.type == "kona-node":
return _kona_node_launcher.launch(
cl = _kona_node_launcher.launch(
plan=plan,
params=params,
network_params=network_params,
Expand All @@ -56,12 +61,13 @@ def launch(
observability_helper=observability_helper,
)
elif params.type == "op-node":
return _op_node_launcher.launch(
cl = _op_node_launcher.launch(
plan=plan,
params=params,
network_params=network_params,
da_params=da_params,
supervisors_params=supervisors_params,
conductor_params=conductor_params,
is_sequencer=is_sequencer,
jwt_file=jwt_file,
deployment_output=deployment_output,
Expand All @@ -74,3 +80,5 @@ def launch(
node_selectors=node_selectors,
observability_helper=observability_helper,
)

return cl
73 changes: 35 additions & 38 deletions src/participant_network__hack.star
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
_op_batcher_launcher = import_module("./batcher/op-batcher/launcher.star")
_op_conductor_launcher = import_module("./conductor/op-conductor/launcher.star")
_op_conductor_ops_launcher = import_module("./conductor/op-conductor-ops/launcher.star")
_op_proposer_launcher = import_module("./proposer/op-proposer/launcher.star")
util = import_module("./util.star")
_net = import_module("/src/util/net.star")
Expand Down Expand Up @@ -32,29 +33,37 @@ def launch_participant_network__hack(
):
# In the legacy setup the first node is always the sequencer
sequencer_participant = original_participant_network_output__hack.participants[0]
sequencer_params = struct(
name="sequencer",
sequencer="sequencer",
el=struct(
service_name=sequencer_participant.el_context.ip_addr,
ports={
_net.RPC_PORT_NAME: _net.port(
number=sequencer_participant.el_context.rpc_port_num
)
},
),
cl=struct(
service_name=sequencer_participant.cl_context.ip_addr,
ports={
_net.RPC_PORT_NAME: _net.port(
number=sequencer_participant.cl_context.http_port
)
},
),
conductor_params=conductor_params,
)

conductor_context = (
_op_conductor_launcher.launch(
plan=plan,
params=conductor_params,
network_params=network_params,
deployment_output=deployment_output,
# FIXME We need to plumb the legacy args into the new format so that we make our lives easier when we're switching
el_params=struct(
service_name=sequencer_participant.el_context.ip_addr,
ports={
_net.RPC_PORT_NAME: _net.port(
number=sequencer_participant.el_context.rpc_port_num
)
},
),
cl_params=struct(
service_name=sequencer_participant.cl_context.ip_addr,
ports={
_net.RPC_PORT_NAME: _net.port(
number=sequencer_participant.cl_context.http_port
)
},
),
el_params=sequencer_params.el,
cl_params=sequencer_params.cl,
observability_helper=observability_helper,
supervisors_params=supervisors_params,
# Sidecar context is now deeply buried in the el_cl_launcher output
Expand All @@ -67,6 +76,15 @@ def launch_participant_network__hack(
else None
)

_op_conductor_ops_launcher.launch(
plan=plan,
l2_params=struct(
participants=[sequencer_params],
network_params=network_params,
),
registry=registry,
)

batcher_key = util.read_network_config_value(
plan,
deployment_output,
Expand All @@ -77,28 +95,7 @@ def launch_participant_network__hack(
plan=plan,
params=batcher_params,
# FIXME We need to plumb the legacy args into the new format so that we make our lives easier when we're switching
sequencers_params=[
struct(
el=struct(
service_name=sequencer_participant.el_context.ip_addr,
ports={
_net.RPC_PORT_NAME: _net.port(
number=sequencer_participant.el_context.rpc_port_num
)
},
),
cl=struct(
service_name=sequencer_participant.cl_context.ip_addr,
ports={
_net.RPC_PORT_NAME: _net.port(
number=sequencer_participant.cl_context.http_port
)
},
),
# Conductor params are not being parsed yet
conductor_params=None,
)
],
sequencers_params=[sequencer_params],
l1_config_env_vars=l1_config_env_vars,
gs_batcher_private_key=batcher_key,
network_params=network_params,
Expand Down
3 changes: 3 additions & 0 deletions test/l2/participant/cl/launcher_test.star
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def test_l2_participant_cl_launcher_hildr(plan):
params=cl_params,
network_params=l2_params.network_params,
supervisors_params=[],
conductor_params=None,
da_params=l2_params.da_params,
is_sequencer=True,
jwt_file=_default_jwt_file,
Expand Down Expand Up @@ -153,6 +154,7 @@ def test_l2_participant_cl_launcher_kona_node(plan):
params=cl_params,
network_params=l2_params.network_params,
supervisors_params=[],
conductor_params=None,
da_params=l2_params.da_params,
is_sequencer=True,
jwt_file=_default_jwt_file,
Expand Down Expand Up @@ -275,6 +277,7 @@ def test_l2_participant_cl_launcher_op_node(plan):
params=cl_params,
network_params=l2_params.network_params,
supervisors_params=[],
conductor_params=None,
da_params=l2_params.da_params,
is_sequencer=True,
jwt_file=_default_jwt_file,
Expand Down
Loading