diff --git a/README.md b/README.md index 76bbeba1c..e39d12882 100644 --- a/README.md +++ b/README.md @@ -535,14 +535,15 @@ Here's a table of where the keys are used | Account Index | Component Used In | Private Key Used | Public Key Used | Comment | |---------------|---------------------|------------------|-----------------|-----------------------------| -| 0 | mev_flood | ✅ | | As the admin_key | -| 0 | mev_custom_flood | | ✅ | As the receiver of balance | +| 0 | Builder | ✅ | | As coinbase | +| 0 | mev_custom_flood | | ✅ | As the receiver of balance | | 1 | blob_spammer | ✅ | | As the sender of blobs | -| 2 | mev_flood | ✅ | | As the user_key | | 3 | transaction_spammer | ✅ | | To spam transactions with | | 4 | goomy_blob | ✅ | | As the sender of blobs | | 5 | eip4788_deployment | ✅ | | As contract deployer | -| 6 | mev_custom_flood | ✅ | | As the sender of balance | +| 6 | mev_flood | ✅ | | As the contract owner | +| 7 | mev_flood | ✅ | | As the user_key | +| 11 | mev_custom_flood | ✅ | | As the sender of balance | ## Developing On This Package diff --git a/main.star b/main.star index b3f413107..26c84e147 100644 --- a/main.star +++ b/main.star @@ -195,11 +195,13 @@ def run(plan, args={}): first_cl_client = all_cl_client_contexts[0] first_client_beacon_name = first_cl_client.beacon_service_name + contract_owner, normal_user = genesis_constants.PRE_FUNDED_ACCOUNTS[6:8] mev_flood.launch_mev_flood( plan, mev_params.mev_flood_image, fuzz_target, - genesis_constants.PRE_FUNDED_ACCOUNTS, + contract_owner.private_key, + normal_user.private_key, ) epoch_recipe = GetHttpRequestRecipe( endpoint="/eth/v2/beacon/blocks/head", @@ -228,7 +230,8 @@ def run(plan, args={}): fuzz_target, mev_params.mev_flood_extra_args, mev_params.mev_flood_seconds_per_bundle, - genesis_constants.PRE_FUNDED_ACCOUNTS, + contract_owner.private_key, + normal_user.private_key, ) mev_endpoints.append(endpoint) diff --git a/src/mev_flood/mev_flood_launcher.star b/src/mev_flood/mev_flood_launcher.star index 76d04b3b4..ab7287fcb 100644 --- a/src/mev_flood/mev_flood_launcher.star +++ b/src/mev_flood/mev_flood_launcher.star @@ -6,7 +6,7 @@ def prefixed_address(address): return "0x" + address -def launch_mev_flood(plan, image, el_uri, genesis_accounts): +def launch_mev_flood(plan, image, el_uri, contract_owner, normal_user): plan.add_service( name="mev-flood", config=ServiceConfig( @@ -23,8 +23,8 @@ def launch_mev_flood(plan, image, el_uri, genesis_accounts): "-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), + prefixed_address(contract_owner), + prefixed_address(normal_user), ), ] ), @@ -32,16 +32,14 @@ def launch_mev_flood(plan, image, el_uri, genesis_accounts): def spam_in_background( - plan, el_uri, mev_flood_extra_args, seconds_per_bundle, genesis_accounts + plan, el_uri, mev_flood_extra_args, seconds_per_bundle, contract_owner, normal_user ): - admin_key, user_key = prefixed_address( - genesis_accounts[0].private_key - ), prefixed_address(genesis_accounts[2].private_key) + owner, user = prefixed_address(contract_owner), prefixed_address(normal_user) 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 + el_uri, owner, user, seconds_per_bundle ), ] if mev_flood_extra_args: @@ -50,7 +48,7 @@ def spam_in_background( "/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 + el_uri, owner, user, seconds_per_bundle, joined_extra_args ), ] plan.exec(service_name="mev-flood", recipe=ExecRecipe(command=command))