Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ethereum-package
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
ethereum-package
Commits
286654c7
Unverified
Commit
286654c7
authored
Nov 10, 2023
by
Piotr Piwoński
Committed by
GitHub
Nov 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Use unused accounts for mev flood (#359)
parent
e2739935
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
15 deletions
+17
-15
README.md
README.md
+5
-4
main.star
main.star
+5
-2
mev_flood_launcher.star
src/mev_flood/mev_flood_launcher.star
+7
-9
No files found.
README.md
View file @
286654c7
...
@@ -535,14 +535,15 @@ Here's a table of where the keys are used
...
@@ -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 |
| Account Index | Component Used In | Private Key Used | Public Key Used | Comment |
|---------------|---------------------|------------------|-----------------|-----------------------------|
|---------------|---------------------|------------------|-----------------|-----------------------------|
| 0 |
mev_flood | ✅ | | As the admin_key
|
| 0 |
Builder | ✅ | | As coinbase
|
| 0 | mev_custom_flood |
| ✅ | As the receiver of balance |
| 0 | mev_custom_flood | | ✅ | As the receiver of balance |
| 1 | blob_spammer | ✅ | | As the sender of blobs |
| 1 | blob_spammer | ✅ | | As the sender of blobs |
| 2 | mev_flood | ✅ | | As the user_key |
| 3 | transaction_spammer | ✅ | | To spam transactions with |
| 3 | transaction_spammer | ✅ | | To spam transactions with |
| 4 | goomy_blob | ✅ | | As the sender of blobs |
| 4 | goomy_blob | ✅ | | As the sender of blobs |
| 5 | eip4788_deployment | ✅ | | As contract deployer |
| 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
## Developing On This Package
...
...
main.star
View file @
286654c7
...
@@ -195,11 +195,13 @@ def run(plan, args={}):
...
@@ -195,11 +195,13 @@ def run(plan, args={}):
first_cl_client = all_cl_client_contexts[0]
first_cl_client = all_cl_client_contexts[0]
first_client_beacon_name = first_cl_client.beacon_service_name
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(
mev_flood.launch_mev_flood(
plan,
plan,
mev_params.mev_flood_image,
mev_params.mev_flood_image,
fuzz_target,
fuzz_target,
genesis_constants.PRE_FUNDED_ACCOUNTS,
contract_owner.private_key,
normal_user.private_key,
)
)
epoch_recipe = GetHttpRequestRecipe(
epoch_recipe = GetHttpRequestRecipe(
endpoint="/eth/v2/beacon/blocks/head",
endpoint="/eth/v2/beacon/blocks/head",
...
@@ -228,7 +230,8 @@ def run(plan, args={}):
...
@@ -228,7 +230,8 @@ def run(plan, args={}):
fuzz_target,
fuzz_target,
mev_params.mev_flood_extra_args,
mev_params.mev_flood_extra_args,
mev_params.mev_flood_seconds_per_bundle,
mev_params.mev_flood_seconds_per_bundle,
genesis_constants.PRE_FUNDED_ACCOUNTS,
contract_owner.private_key,
normal_user.private_key,
)
)
mev_endpoints.append(endpoint)
mev_endpoints.append(endpoint)
...
...
src/mev_flood/mev_flood_launcher.star
View file @
286654c7
...
@@ -6,7 +6,7 @@ def prefixed_address(address):
...
@@ -6,7 +6,7 @@ def prefixed_address(address):
return "0x" + 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(
plan.add_service(
name="mev-flood",
name="mev-flood",
config=ServiceConfig(
config=ServiceConfig(
...
@@ -23,8 +23,8 @@ def launch_mev_flood(plan, image, el_uri, genesis_accounts):
...
@@ -23,8 +23,8 @@ def launch_mev_flood(plan, image, el_uri, genesis_accounts):
"-c",
"-c",
"./run init -r {0} -k {1} -u {2} -s deployment.json".format(
"./run init -r {0} -k {1} -u {2} -s deployment.json".format(
el_uri,
el_uri,
prefixed_address(
genesis_accounts[0].private_key
),
prefixed_address(
contract_owner
),
prefixed_address(
genesis_accounts[2].private_key
),
prefixed_address(
normal_user
),
),
),
]
]
),
),
...
@@ -32,16 +32,14 @@ def launch_mev_flood(plan, image, el_uri, genesis_accounts):
...
@@ -32,16 +32,14 @@ def launch_mev_flood(plan, image, el_uri, genesis_accounts):
def spam_in_background(
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(
owner, user = prefixed_address(contract_owner), prefixed_address(normal_user)
genesis_accounts[0].private_key
), prefixed_address(genesis_accounts[2].private_key)
command = [
command = [
"/bin/sh",
"/bin/sh",
"-c",
"-c",
"nohup ./run spam -r {0} -k {1} -u {2} -l deployment.json --secondsPerBundle {3} >main.log 2>&1 &".format(
"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:
if mev_flood_extra_args:
...
@@ -50,7 +48,7 @@ def spam_in_background(
...
@@ -50,7 +48,7 @@ def spam_in_background(
"/bin/sh",
"/bin/sh",
"-c",
"-c",
"nohup ./run spam -r {0} -k {1} -u {2} -l deployment.json --secondsPerBundle {3} {4} >main.log 2>&1 &".format(
"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))
plan.exec(service_name="mev-flood", recipe=ExecRecipe(command=command))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment