@@ -24,6 +24,8 @@ FLASHBOTS_MEV_BOOST_PORT = 18550
2424MEV_BOOST_SERVICE_NAME_PREFIX = "mev-boost-"
2525
2626
27+ package_io = import_module ("github.com/kurtosis-tech/eth-network-package/package_io/constants.star" )
28+
2729def parse_input (input_args ):
2830 result = default_input_args ()
2931 for attr in input_args :
@@ -35,6 +37,10 @@ def parse_input(input_args):
3537 for sub_attr in input_args ["network_params" ]:
3638 sub_value = input_args ["network_params" ][sub_attr ]
3739 result ["network_params" ][sub_attr ] = sub_value
40+ elif attr == "mev_params" :
41+ for sub_attr in input_args ["mev_params" ]:
42+ sub_value = input_args ["mev_params" ]["sub_attr" ]
43+ result ["mev_params" ][sub_attr ] = sub_value
3844 elif attr == "participants" :
3945 participants = []
4046 for participant in input_args ["participants" ]:
@@ -139,6 +145,15 @@ def parse_input(input_args):
139145 deneb_fork_epoch = result ["network_params" ]["deneb_fork_epoch" ],
140146 genesis_delay = result ["network_params" ]["genesis_delay" ]
141147 ),
148+ mev_params = struct (
149+ mev_relay_image = result ["mev_params" ]["mev_relay_image" ],
150+ mev_relay_api_extra_args = result ["mev_params" ]["mev_relay_api_extra_args" ],
151+ mev_relay_housekeeper_extra_args = result ["mev_params" ]["mev_relay_housekeeper_extra_args" ],
152+ mev_relay_website_extra_args = result ["mev_params" ]["mev_relay_website_extra_args" ],
153+ mev_builder_extra_args = result ["mev_params" ]["mev_builder_extra_args" ],
154+ mev_flood_image = result ["mev_params" ]["mev_flood_image" ],
155+ mev_flood_extra_args = result ["mev_params" ]["mev_flood_extra_args" ]
156+ ),
142157 launch_additional_services = result ["launch_additional_services" ],
143158 wait_for_finalization = result ["wait_for_finalization" ],
144159 wait_for_verifications = result ["wait_for_verifications" ],
@@ -158,6 +173,7 @@ def get_client_log_level_or_default(participant_log_level, global_log_level, cli
158173def default_input_args ():
159174 network_params = default_network_params ()
160175 participants = [default_participant ()]
176+ mev_params = get_default_mev_params ()
161177 return {
162178 "mev_type" : None ,
163179 "participants" : participants ,
@@ -167,26 +183,26 @@ def default_input_args():
167183 "wait_for_verifications" : False ,
168184 "verifications_epoch_limit" : 5 ,
169185 "global_client_log_level" : "info" ,
186+ "mev_params" : mev_params ,
170187 "snooper_enabled" : False ,
171188 }
172189
173190def default_network_params ():
174191 # this is temporary till we get params working
175192 return {
176193 "preregistered_validator_keys_mnemonic" : "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete" ,
177- "num_validator_keys_per_node" : 64 ,
178- "network_id" : "3151908" ,
179- "deposit_contract_address" : "0x4242424242424242424242424242424242424242" ,
180- "seconds_per_slot" : 12 ,
181- "slots_per_epoch" : 32 ,
182- "genesis_delay" : 120 ,
183- "capella_fork_epoch" : 1 ,
184- # arbitrarily large while we sort out https://github.com/kurtosis-tech/eth-network-package/issues/42
185- # this will take 53~ hoours for now
186- "deneb_fork_epoch" : 500 ,
194+ "num_validator_keys_per_node" : 64 ,
195+ "network_id" : "3151908" ,
196+ "deposit_contract_address" : "0x4242424242424242424242424242424242424242" ,
197+ "seconds_per_slot" : 12 ,
198+ "slots_per_epoch" : 32 ,
199+ "genesis_delay" : 120 ,
200+ "capella_fork_epoch" : 1 ,
201+ "deneb_fork_epoch" : 500
187202 }
188203
189204def default_participant ():
205+ # TODO(now) add support for mev boost image and extra parameters
190206 return {
191207 "el_client_type" : "geth" ,
192208 "el_client_image" : "" ,
@@ -201,6 +217,18 @@ def default_participant():
201217 "count" : 1
202218 }
203219
220+ def get_default_mev_params ():
221+ return {
222+ # TODO fix this when Capella Signature verification works - change it to flashbots/
223+ "mev_relay_image" : "h4ck3rk3y/mev-boost-relay" ,
224+ "mev_relay_api_extra_args" : [],
225+ "mev_relay_housekeeper_extra_args" : [],
226+ "mev_relay_website_extra_args" : [],
227+ "mev_builder_extra_args" : [],
228+ "mev_flood_image" : "flashbots/mev-flood" ,
229+ "mev_flood_extra_args" : []
230+ }
231+
204232
205233# TODO perhaps clean this up into a map
206234def enrich_mev_extra_params (parsed_arguments_dict , mev_prefix , mev_port ):
@@ -220,4 +248,27 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port):
220248 if participant ["cl_client_type" ] == "prysm" :
221249 participant ["validator_extra_params" ].append ("--enable-builder" )
222250 participant ["beacon_extra_params" ].append ("--http-mev-relay={0}" .format (mev_url ))
251+
252+ num_participants = len (parsed_arguments_dict ["participants" ])
253+
254+ mev_url = "http://{0}{1}:{2}" .format (mev_prefix , num_participants , mev_port )
255+
256+ mev_participant = {
257+ "el_client_type" : "geth" ,
258+ # TODO replace with actual when flashbots/builder is published
259+ "el_client_image" : "h4ck3rk3y/builder" ,
260+ "el_client_log_level" : "" ,
261+ "cl_client_type" : "lighthouse" ,
262+ # THIS overrides the beacon image
263+ "cl_client_image" : "sigp/lighthouse" ,
264+ "cl_client_log_level" : "" ,
265+ "beacon_extra_params" : ["--builder={0}" .format (mev_url ), "--always-prepare-payload" , "--prepare-payload-lookahead" , "12000" ],
266+ # TODO(maybe) make parts of this more passable like the mev-relay-endpoint & forks
267+ "el_extra_params" : ["--builder" , "--builder.remote_relay_endpoint=http://mev-relay-api:9062" , "--builder.beacon_endpoints=http://cl-{0}-lighthouse-geth:4000" .format (num_participants + 1 ), "--builder.bellatrix_fork_version=0x30000038" , "--builder.genesis_fork_version=0x10000038" , "--builder.genesis_validators_root={0}" .format (package_io .GENESIS_VALIDATORS_ROOT_PLACEHOLDER ), "--miner.extradata=\" Illuminate Dmocratize Dstribute\" " , "--miner.algotype=greedy" ] + parsed_arguments_dict ["mev_params" ]["mev_builder_extra_args" ],
268+ "validator_extra_params" : ["--builder-proposals" ],
269+ "builder_network_params" : None
270+ }
271+
272+ parsed_arguments_dict ["participants" ].append (mev_participant )
273+
223274 return parsed_arguments_dict
0 commit comments