@@ -9,6 +9,9 @@ ethereum_package_constants = import_module(
9
9
observability = import_module ("../../observability/observability.star" )
10
10
prometheus = import_module ("../../observability/prometheus/prometheus_launcher.star" )
11
11
12
+ interop_constants = import_module ("../../interop/constants.star" )
13
+ util = import_module ("../../util.star" )
14
+
12
15
#
13
16
# ---------------------------------- Challenger client -------------------------------------
14
17
CHALLENGER_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/data/op-challenger/op-challenger-data"
@@ -22,32 +25,32 @@ def get_used_ports():
22
25
23
26
def launch (
24
27
plan ,
28
+ l2_num ,
25
29
service_name ,
26
30
image ,
27
31
el_context ,
28
32
cl_context ,
29
33
l1_config_env_vars ,
30
- gs_challenger_private_key ,
31
- game_factory_address ,
32
34
deployment_output ,
33
35
network_params ,
34
36
challenger_params ,
37
+ interop_params ,
35
38
observability_helper ,
36
39
):
37
40
challenger_service_name = "{0}" .format (service_name )
38
41
39
42
config = get_challenger_config (
40
43
plan ,
44
+ l2_num ,
41
45
service_name ,
42
46
image ,
43
47
el_context ,
44
48
cl_context ,
45
49
l1_config_env_vars ,
46
- gs_challenger_private_key ,
47
- game_factory_address ,
48
50
deployment_output ,
49
51
network_params ,
50
52
challenger_params ,
53
+ interop_params ,
51
54
observability_helper ,
52
55
)
53
56
@@ -62,20 +65,33 @@ def launch(
62
65
63
66
def get_challenger_config (
64
67
plan ,
68
+ l2_num ,
65
69
service_name ,
66
70
image ,
67
71
el_context ,
68
72
cl_context ,
69
73
l1_config_env_vars ,
70
- gs_challenger_private_key ,
71
- game_factory_address ,
72
74
deployment_output ,
73
75
network_params ,
74
76
challenger_params ,
77
+ interop_params ,
75
78
observability_helper ,
76
79
):
77
80
ports = dict (get_used_ports ())
78
81
82
+ game_factory_address = util .read_network_config_value (
83
+ plan ,
84
+ deployment_output ,
85
+ "state" ,
86
+ ".opChainDeployments[{0}].disputeGameFactoryProxyAddress" .format (l2_num ),
87
+ )
88
+ challenger_key = util .read_network_config_value (
89
+ plan ,
90
+ deployment_output ,
91
+ "challenger-{0}" .format (network_params .network_id ),
92
+ ".privateKey" ,
93
+ )
94
+
79
95
cmd = [
80
96
"op-challenger" ,
81
97
"--cannon-l2-genesis="
@@ -93,9 +109,9 @@ def get_challenger_config(
93
109
"--l1-beacon=" + l1_config_env_vars ["CL_RPC_URL" ],
94
110
"--l1-eth-rpc=" + l1_config_env_vars ["L1_RPC_URL" ],
95
111
"--l2-eth-rpc=" + el_context .rpc_http_url ,
96
- "--private-key=" + gs_challenger_private_key ,
112
+ "--private-key=" + challenger_key ,
97
113
"--rollup-rpc=" + cl_context .beacon_http_url ,
98
- "--trace-type=" + "cannon,permissioned" ,
114
+ "--trace-type=" + "," . join ( challenger_params . cannon_trace_types ) ,
99
115
]
100
116
101
117
# configure files
@@ -109,6 +125,9 @@ def get_challenger_config(
109
125
if observability_helper .enabled :
110
126
observability .configure_op_service_metrics (cmd , ports )
111
127
128
+ if interop_params .enabled :
129
+ cmd .append ("--supervisor-rpc=" + interop_constants .SUPERVISOR_ENDPOINT )
130
+
112
131
if (
113
132
challenger_params .cannon_prestate_path
114
133
and challenger_params .cannon_prestates_url
0 commit comments