-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Tx_spamer_params and move MEV to the bottom of main.star (#208
) PR adds a possibility to push custom params to Tx_Spammer. tested with flag --txcount=100 - Looking at Tx_Spammer logs change is applied. Also addressing #168 --------- Co-authored-by: Kamil Chodoła <kamil@nethermind.io>
- Loading branch information
1 parent
3bbcca7
commit 23628b2
Showing
4 changed files
with
71 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
#TODO: Add Image and Service Name to tx_spammer_params | ||
IMAGE_NAME = "ethpandaops/tx-fuzz:latest" | ||
SERVICE_NAME = "transaction-spammer" | ||
|
||
def launch_transaction_spammer(plan, prefunded_addresses, el_client_context): | ||
config = get_config(prefunded_addresses, el_client_context) | ||
def launch_transaction_spammer(plan, prefunded_addresses, el_client_context, tx_spammer_params): | ||
config = get_config(prefunded_addresses, el_client_context, tx_spammer_params.tx_spammer_extra_args) | ||
plan.add_service(SERVICE_NAME, config) | ||
|
||
|
||
def get_config(prefunded_addresses, el_client_context): | ||
def get_config(prefunded_addresses, el_client_context, tx_spammer_extra_args): | ||
return ServiceConfig( | ||
image = IMAGE_NAME, | ||
cmd = [ | ||
"spam", | ||
"--rpc=http://{0}:{1}".format(el_client_context.ip_addr, el_client_context.rpc_port_num), | ||
"--sk={0}".format(prefunded_addresses[3].private_key), | ||
"--sk={0}".format(prefunded_addresses[0].private_key), | ||
"{0}".format(" ".join(tx_spammer_extra_args)) | ||
] | ||
) | ||
|