1- ADMIN_KEY = "0xef5177cd0b6b21c87db5a0bf35d4084a8a57a9d6a064f86d51ac85f2b873a4e2"
2- USER_KEY = "0x7988b3a148716ff800414935b305436493e1f25237a2a03e5eebc343735e2f31"
1+ ADMIN_KEY_INDEX = 0
2+ USER_KEY_INDEX = 2
33
4- def launch_mev_flood (plan , image , el_uri ):
4+ def prefixed_address (address ):
5+ return "0x" + address
6+
7+ def launch_mev_flood (plan , image , el_uri , genesis_accounts ):
58 plan .add_service (
69 name = "mev-flood" ,
710 config = ServiceConfig (
@@ -13,15 +16,16 @@ def launch_mev_flood(plan, image, el_uri):
1316 plan .exec (
1417 service_name = "mev-flood" ,
1518 recipe = ExecRecipe (
16- command = ["/bin/sh" , "-c" , "./run init -r {0} -k {1} -u {2} -s deployment.json" .format (el_uri , ADMIN_KEY , USER_KEY )]
19+ command = ["/bin/sh" , "-c" , "./run init -r {0} -k {1} -u {2} -s deployment.json" .format (el_uri , prefixed_address ( genesis_accounts [ 0 ]. private_key ), prefixed_address ( genesis_accounts [ 2 ]. private_key ) )]
1720 )
1821 )
1922
20- def spam_in_background (plan , el_uri , mev_flood_extra_args , seconds_per_bundle ):
21- command = ["/bin/sh" , "-c" , "nohup ./run spam -r {0} -k {1} -u {2} -l deployment.json --secondsPerBundle {3} >main.log 2>&1 &" .format (el_uri , ADMIN_KEY , USER_KEY , seconds_per_bundle )]
23+ def spam_in_background (plan , el_uri , mev_flood_extra_args , seconds_per_bundle , genesis_accounts ):
24+ admin_key , user_key = prefixed_address (genesis_accounts [0 ].private_key ), prefixed_address (genesis_accounts [2 ].private_key )
25+ command = ["/bin/sh" , "-c" , "nohup ./run spam -r {0} -k {1} -u {2} -l deployment.json --secondsPerBundle {3} >main.log 2>&1 &" .format (el_uri , admin_key , user_key , seconds_per_bundle )]
2226 if mev_flood_extra_args :
2327 joined_extra_args = " " .join (mev_flood_extra_args )
24- command = ["/bin/sh" , "-c" , "nohup ./run spam -r {0} -k {1} -u {2} -l deployment.json --secondsPerBundle {3} {4} >main.log 2>&1 &" .format (el_uri , ADMIN_KEY , USER_KEY , seconds_per_bundle , joined_extra_args )]
28+ command = ["/bin/sh" , "-c" , "nohup ./run spam -r {0} -k {1} -u {2} -l deployment.json --secondsPerBundle {3} {4} >main.log 2>&1 &" .format (el_uri , admin_key , user_key , seconds_per_bundle , joined_extra_args )]
2529 plan .exec (
2630 service_name = "mev-flood" ,
2731 recipe = ExecRecipe (
0 commit comments