@@ -62,34 +62,17 @@ def launch(
62
62
participant_index ,
63
63
network_params ,
64
64
):
65
- image = participant .el_image
66
- participant_log_level = participant .el_log_level
67
- extra_params = participant .el_extra_params
68
- extra_env_vars = participant .el_extra_env_vars
69
- extra_labels = participant .el_extra_labels
70
- el_volume_size = participant .el_volume_size
71
-
72
- log_level = input_parser .get_client_log_level_or_default (
73
- participant_log_level , global_log_level , VERBOSITY_LEVELS
74
- )
75
-
76
65
cl_client_name = service_name .split ("-" )[3 ]
77
66
78
67
config = get_config (
79
68
plan ,
80
- launcher .el_cl_genesis_data ,
81
- launcher .jwt_file ,
82
- image ,
69
+ launcher ,
70
+ participant ,
83
71
service_name ,
84
72
existing_el_clients ,
85
73
cl_client_name ,
86
- log_level ,
87
- participant ,
88
- extra_params ,
89
- extra_env_vars ,
90
- extra_labels ,
74
+ global_log_level ,
91
75
persistent ,
92
- el_volume_size ,
93
76
tolerations ,
94
77
node_selectors ,
95
78
port_publisher ,
@@ -98,53 +81,38 @@ def launch(
98
81
)
99
82
100
83
service = plan .add_service (service_name , config )
101
-
102
- enode , enr = el_admin_node_info .get_enode_enr_for_node (plan , service_name , constants .RPC_PORT_ID )
103
-
104
- metric_url = "{0}:{1}" .format (service .ip_address , METRICS_PORT_NUM )
105
- metrics_info = node_metrics .new_node_metrics_info (
106
- service_name , METRICS_PATH , metric_url
107
- )
108
-
109
- http_url = "http://{0}:{1}" .format (service .ip_address , RPC_PORT_NUM )
110
- ws_url = "ws://{0}:{1}" .format (service .ip_address , WS_PORT_NUM )
111
-
112
- return el_context .new_el_context (
113
- client_name = "ethrex" ,
114
- enode = enode ,
115
- ip_addr = service .ip_address ,
116
- rpc_port_num = RPC_PORT_NUM ,
117
- ws_port_num = WS_PORT_NUM ,
118
- engine_rpc_port_num = ENGINE_RPC_PORT_NUM ,
119
- rpc_http_url = http_url ,
120
- ws_url = ws_url ,
121
- enr = enr ,
122
- service_name = service_name ,
123
- el_metrics_info = [metrics_info ],
84
+
85
+ return get_el_context (
86
+ plan ,
87
+ service_name ,
88
+ service ,
89
+ launcher ,
124
90
)
125
91
126
92
127
93
def get_config (
128
94
plan ,
129
- el_cl_genesis_data ,
130
- jwt_file ,
131
- image ,
95
+ launcher ,
96
+ participant ,
132
97
service_name ,
133
98
existing_el_clients ,
134
99
cl_client_name ,
135
- verbosity_level ,
136
- participant ,
137
- extra_params ,
138
- extra_env_vars ,
139
- extra_labels ,
100
+ global_log_level ,
140
101
persistent ,
141
- el_volume_size ,
142
102
tolerations ,
143
103
node_selectors ,
144
104
port_publisher ,
145
105
participant_index ,
146
106
network_params ,
147
107
):
108
+ extra_params = participant .el_extra_params
109
+ extra_env_vars = participant .el_extra_env_vars
110
+ extra_labels = participant .el_extra_labels
111
+ el_volume_size = participant .el_volume_size
112
+
113
+ log_level = input_parser .get_client_log_level_or_default (
114
+ participant .el_log_level , global_log_level , VERBOSITY_LEVELS
115
+ )
148
116
network = network_params .network
149
117
public_ports = {}
150
118
discovery_port = DISCOVERY_PORT_NUM
@@ -167,6 +135,7 @@ def get_config(
167
135
used_ports = get_used_ports (discovery_port )
168
136
cmd = [
169
137
"ethrex" ,
138
+ "--log.level=" + log_level ,
170
139
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER ,
171
140
"--network={0}" .format (
172
141
network
@@ -197,7 +166,7 @@ def get_config(
197
166
cmd .append (
198
167
"--bootnodes="
199
168
+ shared_utils .get_devnet_enodes (
200
- plan , el_cl_genesis_data .files_artifact_uuid
169
+ plan , launcher . el_cl_genesis_data .files_artifact_uuid
201
170
)
202
171
)
203
172
@@ -209,12 +178,12 @@ def get_config(
209
178
command_str = " && " .join ([cmd_str ])
210
179
211
180
files = {
212
- constants .GENESIS_DATA_MOUNTPOINT_ON_CLIENTS : el_cl_genesis_data .files_artifact_uuid ,
213
- constants .JWT_MOUNTPOINT_ON_CLIENTS : jwt_file ,
181
+ constants .GENESIS_DATA_MOUNTPOINT_ON_CLIENTS : launcher . el_cl_genesis_data .files_artifact_uuid ,
182
+ constants .JWT_MOUNTPOINT_ON_CLIENTS : launcher . jwt_file ,
214
183
}
215
184
216
185
config_args = {
217
- "image" : image ,
186
+ "image" : participant . el_image ,
218
187
"ports" : used_ports ,
219
188
"public_ports" : public_ports ,
220
189
"cmd" : [command_str ],
@@ -225,7 +194,7 @@ def get_config(
225
194
"labels" : shared_utils .label_maker (
226
195
constants .EL_TYPE .ethrex ,
227
196
constants .CLIENT_TYPES .el ,
228
- image ,
197
+ participant . el_image ,
229
198
cl_client_name ,
230
199
extra_labels ,
231
200
),
@@ -244,6 +213,36 @@ def get_config(
244
213
245
214
return ServiceConfig (** config_args )
246
215
216
+ def get_el_context (
217
+ plan ,
218
+ service_name ,
219
+ service ,
220
+ launcher ,
221
+ ):
222
+ enode , enr = el_admin_node_info .get_enode_enr_for_node (plan , service_name , constants .RPC_PORT_ID )
223
+
224
+ metric_url = "{0}:{1}" .format (service .ip_address , METRICS_PORT_NUM )
225
+ metrics_info = node_metrics .new_node_metrics_info (
226
+ service_name , METRICS_PATH , metric_url
227
+ )
228
+
229
+ http_url = "http://{0}:{1}" .format (service .ip_address , RPC_PORT_NUM )
230
+ ws_url = "ws://{0}:{1}" .format (service .ip_address , WS_PORT_NUM )
231
+
232
+ return el_context .new_el_context (
233
+ client_name = "ethrex" ,
234
+ enode = enode ,
235
+ ip_addr = service .ip_address ,
236
+ rpc_port_num = RPC_PORT_NUM ,
237
+ ws_port_num = WS_PORT_NUM ,
238
+ engine_rpc_port_num = ENGINE_RPC_PORT_NUM ,
239
+ rpc_http_url = http_url ,
240
+ ws_url = ws_url ,
241
+ enr = enr ,
242
+ service_name = service_name ,
243
+ el_metrics_info = [metrics_info ],
244
+ )
245
+
247
246
248
247
def new_ethrex_launcher (el_cl_genesis_data , jwt_file ):
249
248
return struct (el_cl_genesis_data = el_cl_genesis_data , jwt_file = jwt_file )
0 commit comments