11_cl_launcher = import_module ("/src/cl/launcher.star" )
22_el_launcher = import_module ("/src/el/launcher.star" )
33_da_server_launcher = import_module ("/src/da/da-server/launcher.star" )
4+ _op_signer_launcher = import_module ("/src/signer/op-signer/launcher.star" )
45_rollup_boost_launcher = import_module ("/src/mev/rollup-boost/launcher.star" )
56
67_selectors = import_module ("./selectors.star" )
@@ -21,6 +22,7 @@ def launch(
2122 tolerations ,
2223 node_selectors ,
2324 observability_helper ,
25+ registry ,
2426):
2527 network_params = params .network_params
2628 network_name = network_params .name
@@ -36,6 +38,54 @@ def launch(
3638 plan = plan , da_params = params .da_params , log_prefix = network_log_prefix
3739 )
3840
41+ # We'll need batcher private key for the batcher as well as for the signer
42+ batcher_private_key = _util .read_network_config_value (
43+ plan ,
44+ deployment_output ,
45+ "batcher-{0}" .format (network_params .network_id ),
46+ ".privateKey" ,
47+ )
48+
49+ # We'll need proposer private key for the proposer as well as for the signer
50+ proposer_private_key = _util .read_network_config_value (
51+ plan ,
52+ deployment_output ,
53+ "proposer-{0}" .format (network_params .network_id ),
54+ ".privateKey" ,
55+ )
56+
57+ sequencer_private_key = _util .read_network_config_value (
58+ plan ,
59+ deployment_output ,
60+ "sequencer-{0}" .format (network_params .network_id ),
61+ ".privateKey" ,
62+ )
63+
64+ signer = _launch_signer_maybe (
65+ plan = plan ,
66+ signer_params = params .signer_params ,
67+ network_params = network_params ,
68+ clients = [
69+ struct (
70+ hostname = params .batcher_params .service_name ,
71+ private_key = batcher_private_key ,
72+ ),
73+ struct (
74+ hostname = params .proposer_params .service_name ,
75+ private_key = proposer_private_key ,
76+ ),
77+ ]
78+ + [
79+ struct (
80+ hostname = participant_params .cl .service_name ,
81+ private_key = sequencer_private_key ,
82+ )
83+ for participant_params in params .participants
84+ ],
85+ registry = registry ,
86+ log_prefix = network_log_prefix ,
87+ )
88+
3989 #
4090 # Launch CL & EL clients
4191 #
@@ -112,6 +162,7 @@ def launch(
112162 da_params = params .da_params ,
113163 el_context = el .context ,
114164 cl_contexts = cl_contexts ,
165+ signer_context = signer ,
115166 jwt_file = jwt_file ,
116167 deployment_output = deployment_output ,
117168 l1_config_env_vars = l1_config_env_vars ,
@@ -146,6 +197,7 @@ def launch(
146197 if sidecar_and_builders and sidecar_and_builders .el_builder
147198 else el .context ,
148199 cl_contexts = cl_contexts ,
200+ signer_context = signer ,
149201 jwt_file = jwt_file ,
150202 deployment_output = deployment_output ,
151203 l1_config_env_vars = l1_config_env_vars ,
@@ -171,6 +223,7 @@ def launch(
171223 network_id = network_params .network_id ,
172224 participants = participants ,
173225 da = da ,
226+ signer = signer ,
174227 )
175228
176229
@@ -197,6 +250,7 @@ def _launch_sidecar_maybe(
197250 is_sequencer ,
198251 el_context ,
199252 cl_contexts ,
253+ signer_context ,
200254 jwt_file ,
201255 deployment_output ,
202256 l1_config_env_vars ,
@@ -291,6 +345,7 @@ def _launch_sidecar_maybe(
291345 is_sequencer = True ,
292346 el_context = el_builder_context ,
293347 cl_contexts = cl_contexts ,
348+ signer_context = signer_context ,
294349 jwt_file = jwt_file ,
295350 deployment_output = deployment_output ,
296351 l1_config_env_vars = l1_config_env_vars ,
@@ -323,3 +378,20 @@ def _launch_sidecar(
323378 )
324379 else :
325380 fail ("Invalid MEV type: {}" .format (mev_params .type ))
381+
382+
383+ def _launch_signer_maybe (
384+ plan , signer_params , network_params , clients , registry , log_prefix
385+ ):
386+ if signer_params :
387+ plan .print ("{}: Launching signer" .format (log_prefix ))
388+
389+ _op_signer_launcher .launch (
390+ plan = plan ,
391+ params = signer_params ,
392+ network_params = network_params ,
393+ clients = clients ,
394+ registry = registry ,
395+ )
396+
397+ plan .print ("{}: Successfully launched signer" .format (log_prefix ))
0 commit comments