Skip to content

Commit 81038b9

Browse files
fix: Support multiple sequencers: Pass supervisors params to conductor [29/N] (#322)
**Description** `op-conductor` needs to know about the supervisors, hence this. We also need to pass the `rollup-boost` context to the conductor but it's buried so deep in the `el_cl_launcher` that we'd need to go through with the full refactor to support it (sad face). Fixes ethereum-optimism/optimism#16366
1 parent d0db99c commit 81038b9

7 files changed

Lines changed: 34 additions & 4 deletions

File tree

network_params.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ optimism_package:
3939
batcher_params:
4040
extra_params: []
4141
conductor_params:
42-
enabled: True
42+
enabled: true
43+
bootstrap: true
4344
additional_services: ["rollup-boost"]
4445
tx_fuzzer_params:
4546
enabled: true

src/conductor/input_parser.star

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ _DEFAULT_ARGS = {
99
"admin": True,
1010
"proxy": True,
1111
"paused": False,
12+
"bootstrap": False,
1213
}
1314

1415

src/conductor/op-conductor/launcher.star

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ _observability = import_module("/src/observability/observability.star")
22
_ethereum_package_constants = import_module(
33
"github.com/ethpandaops/ethereum-package/src/package_io/constants.star"
44
)
5+
6+
_filter = import_module("/src/util/filter.star")
57
_net = import_module("/src/util/net.star")
68

79
#
@@ -17,6 +19,8 @@ def launch(
1719
plan,
1820
params,
1921
network_params,
22+
supervisors_params,
23+
sidecar_context,
2024
deployment_output,
2125
el_params,
2226
cl_params,
@@ -26,6 +30,8 @@ def launch(
2630
plan=plan,
2731
params=params,
2832
network_params=network_params,
33+
supervisors_params=supervisors_params,
34+
sidecar_context=sidecar_context,
2935
deployment_output=deployment_output,
3036
el_params=el_params,
3137
cl_params=cl_params,
@@ -61,6 +67,8 @@ def get_service_config(
6167
plan,
6268
params,
6369
network_params,
70+
supervisors_params,
71+
sidecar_context,
6472
deployment_output,
6573
el_params,
6674
cl_params,
@@ -82,16 +90,18 @@ def get_service_config(
8290
env_vars = {
8391
"OP_CONDUCTOR_CONSENSUS_ADDR": "0.0.0.0",
8492
"OP_CONDUCTOR_CONSENSUS_ADVERTISED": "{}:{}".format(
85-
_ethereum_package_constants.PRIVATE_IP_ADDRESS_PLACEHOLDER,
86-
consensus_port.number,
93+
params.service_name, consensus_port.number
8794
),
8895
"OP_CONDUCTOR_CONSENSUS_PORT": str(consensus_port.number),
89-
"OP_CONDUCTOR_EXECUTION_RPC": _net.service_url(
96+
"OP_CONDUCTOR_EXECUTION_RPC": sidecar_context.rpc_http_url
97+
if sidecar_context
98+
else _net.service_url(
9099
el_params.service_name, el_params.ports[_net.RPC_PORT_NAME]
91100
),
92101
"OP_CONDUCTOR_NODE_RPC": _net.service_url(
93102
cl_params.service_name, cl_params.ports[_net.RPC_PORT_NAME]
94103
),
104+
"OP_CONDUCTOR_ROLLUP_BOOST_ENABLED": "true" if sidecar_context else "false",
95105
# This might also become a parameter
96106
"OP_CONDUCTOR_HEALTHCHECK_INTERVAL": str(_CONDUCTOR_HEALTH_CHECK_INTERVAL),
97107
# This might also become a parameter
@@ -111,12 +121,20 @@ def get_service_config(
111121
network_params.network_id,
112122
),
113123
"OP_CONDUCTOR_PAUSED": "true" if params.paused else "false",
124+
"OP_CONDUCTOR_RAFT_BOOTSTRAP": "true" if params.bootstrap else "false",
114125
"OP_CONDUCTOR_RAFT_SERVER_ID": params.service_name,
115126
"OP_CONDUCTOR_RAFT_STORAGE_DIR": _CONDUCTOR_DATA_DIRPATH_ON_SERVICE_CONTAINER,
116127
"OP_CONDUCTOR_RPC_ADDR": "0.0.0.0",
117128
"OP_CONDUCTOR_RPC_PORT": str(rpc_port.number),
118129
"OP_CONDUCTOR_RPC_ENABLE_ADMIN": "true" if params.admin else "false",
119130
"OP_CONDUCTOR_RPC_ENABLE_PROXY": "true" if params.proxy else "false",
131+
"OP_CONDUCTOR_SUPERVISOR_RPC": _filter.first(
132+
[
133+
_net.service_url(s.service_name, s.ports[_net.RPC_PORT_NAME])
134+
for s in supervisors_params
135+
]
136+
)
137+
or "",
120138
}
121139

122140
if observability_helper.enabled:

src/package_io/sanity_check.star

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ SUBCATEGORY_PARAMS = {
152152
"admin",
153153
"proxy",
154154
"paused",
155+
"bootstrap",
155156
],
156157
"da_params": [
157158
"enabled",

src/participant_network__hack.star

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ def launch_participant_network__hack(
5656
},
5757
),
5858
observability_helper=observability_helper,
59+
supervisors_params=supervisors_params,
60+
# Sidecar context is now deeply buried in the el_cl_launcher output
61+
# and we cannot dig it out without risking breaking well everything
62+
#
63+
# FIXME After refactoring, this should be passed in
64+
sidecar_context=None,
5965
).context
6066
if conductor_params
6167
else None

test/conductor/input_parser_test.star

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def test_conductor_input_parser_default_args_enabled(plan):
6161
admin=True,
6262
proxy=True,
6363
paused=False,
64+
bootstrap=False,
6465
)
6566

6667
expect.eq(
@@ -109,6 +110,7 @@ def test_conductor_input_parser_custom_params(plan):
109110
admin=True,
110111
proxy=True,
111112
paused=False,
113+
bootstrap=False,
112114
),
113115
)
114116

test/l2/participant/input_parser_test.star

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ def test_l2_participant_input_parser_defaults_conductor_enabled(plan):
322322
admin=True,
323323
proxy=True,
324324
paused=False,
325+
bootstrap=False,
325326
),
326327
)
327328

0 commit comments

Comments
 (0)