-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changelog picked up from commits here: feat: add blobspammer
- Loading branch information
1 parent
21b0975
commit f166d71
Showing
3 changed files
with
61 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
IMAGE_NAME = "ethpandaops/tx-fuzz:latest" | ||
SERVICE_NAME = "blob-spammer" | ||
|
||
ENTRYPOINT_ARGS = ["/bin/sh", "-c"] | ||
|
||
def launch_blob_spammer( | ||
plan, | ||
prefunded_addresses, | ||
el_client_context, | ||
cl_client_context, | ||
deneb_fork_epoch, | ||
seconds_per_slot, | ||
slots_per_epoch, | ||
genesis_delay): | ||
config = get_config( | ||
prefunded_addresses, | ||
el_client_context, | ||
cl_client_context, | ||
deneb_fork_epoch, | ||
seconds_per_slot, | ||
slots_per_epoch, | ||
genesis_delay) | ||
plan.add_service(SERVICE_NAME, config) | ||
|
||
def get_config( | ||
prefunded_addresses, | ||
el_client_context, | ||
cl_client_context, | ||
deneb_fork_epoch, | ||
seconds_per_slot, | ||
slots_per_epoch, | ||
genesis_delay): | ||
dencunTime = (deneb_fork_epoch * slots_per_epoch * seconds_per_slot) + genesis_delay | ||
return ServiceConfig( | ||
image = IMAGE_NAME, | ||
entrypoint = ENTRYPOINT_ARGS, | ||
cmd = [" && ".join([ | ||
'apk update', | ||
'apk add curl jq', | ||
'current_epoch=$(curl -s http://{0}:{1}/eth/v2/beacon/blocks/head | jq -r ".version")'.format(cl_client_context.ip_addr, cl_client_context.http_port_num), | ||
'echo $current_epoch', | ||
'while [ $current_epoch != "deneb" ]; do echo "waiting for deneb, current epoch is $current_epoch"; current_epoch=$(curl -s http://{0}:{1}/eth/v2/beacon/blocks/head | jq -r ".version"); sleep {2}; done'.format(cl_client_context.ip_addr, cl_client_context.http_port_num, seconds_per_slot), | ||
'echo "sleep is over, starting to send blob transactions"', | ||
'/tx-fuzz.bin blobs --rpc=http://{0}:{1} --sk={2}'.format(el_client_context.ip_addr, el_client_context.rpc_port_num, prefunded_addresses[1].private_key), | ||
])] | ||
) |
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