Commit 96eeb99b authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

refactor!: rename transaction spammer, remove beacon metrics gazer (#923)

Renamed:
transaction spammer -> tx_fuzz
el_forkmon -> forkmon
Removed:
beacon-metrics-gazer (broken, dora has these metrics)
blob_spammer (spamoor_blob does this)
parent 05fdd35b
...@@ -13,4 +13,4 @@ participants: ...@@ -13,4 +13,4 @@ participants:
count: 1 count: 1
additional_services: additional_services:
- dora - dora
- blob_spammer - spamoor_blob
...@@ -21,7 +21,7 @@ network_params: ...@@ -21,7 +21,7 @@ network_params:
additional_services: additional_services:
- dora - dora
- tx_spammer - tx_fuzz
- spamoor_blob - spamoor_blob
snooper_enabled: true snooper_enabled: true
...@@ -49,7 +49,7 @@ mev_type: flashbots ...@@ -49,7 +49,7 @@ mev_type: flashbots
additional_services: additional_services:
- dora - dora
- spamoor_blob - spamoor_blob
- tx_spammer - tx_fuzz
- assertoor - assertoor
global_log_level: debug global_log_level: debug
...@@ -3,11 +3,10 @@ participants: ...@@ -3,11 +3,10 @@ participants:
cl_type: lighthouse cl_type: lighthouse
mev_type: commit-boost mev_type: commit-boost
additional_services: additional_services:
- tx_spammer - tx_fuzz
- blob_spammer - spamoor_blob
- custom_flood - custom_flood
- el_forkmon - forkmon
- beacon_metrics_gazer
- dora - dora
- prometheus_grafana - prometheus_grafana
mev_params: mev_params:
......
...@@ -6,6 +6,6 @@ mev_type: mock ...@@ -6,6 +6,6 @@ mev_type: mock
additional_services: additional_services:
- dora - dora
- spamoor_blob - spamoor_blob
- tx_spammer - tx_fuzz
mev_params: mev_params:
mock_mev_image: "ethpandaops/rustic-builder:main" mock_mev_image: "ethpandaops/rustic-builder:main"
...@@ -33,7 +33,7 @@ participants: ...@@ -33,7 +33,7 @@ participants:
additional_services: additional_services:
- dora - dora
- tx_spammer - tx_fuzz
- spamoor_blob - spamoor_blob
mev_type: flashbots mev_type: flashbots
......
...@@ -11,11 +11,9 @@ mev_params: ...@@ -11,11 +11,9 @@ mev_params:
mev_boost_image: ethpandaops/mev-boost:electra mev_boost_image: ethpandaops/mev-boost:electra
additional_services: additional_services:
- tx_spammer - tx_fuzz
- blob_spammer
- custom_flood - custom_flood
- spamoor_blob - spamoor_blob
- beacon_metrics_gazer
- dora - dora
- prometheus_grafana - prometheus_grafana
network_params: network_params:
......
...@@ -16,7 +16,7 @@ network_params: ...@@ -16,7 +16,7 @@ network_params:
seconds_per_slot: 6 seconds_per_slot: 6
additional_services: additional_services:
- dora - dora
- tx_spammer - tx_fuzz
- apache - apache
mev_type: mev-rs mev_type: mev-rs
......
...@@ -22,7 +22,7 @@ network_params: ...@@ -22,7 +22,7 @@ network_params:
additional_services: additional_services:
- dora - dora
- spamoor_blob - spamoor_blob
- tx_spammer - tx_fuzz
- assertoor - assertoor
dora_params: dora_params:
image: "ethpandaops/dora:master-latest" image: "ethpandaops/dora:master-latest"
......
...@@ -12,10 +12,8 @@ participants: ...@@ -12,10 +12,8 @@ participants:
- el_type: ethereumjs - el_type: ethereumjs
cl_type: teku cl_type: teku
additional_services: additional_services:
- tx_spammer - tx_fuzz
- blob_spammer - forkmon
- el_forkmon
- beacon_metrics_gazer
- dora - dora
- prometheus_grafana - prometheus_grafana
- spamoor_blob - spamoor_blob
......
...@@ -14,10 +14,8 @@ participants: ...@@ -14,10 +14,8 @@ participants:
network_params: network_params:
preset: minimal preset: minimal
additional_services: additional_services:
- tx_spammer - tx_fuzz
- blob_spammer - forkmon
- el_forkmon
- beacon_metrics_gazer
- dora - dora
- prometheus_grafana - prometheus_grafana
- spamoor_blob - spamoor_blob
......
...@@ -14,10 +14,8 @@ participants: ...@@ -14,10 +14,8 @@ participants:
- el_type: geth - el_type: geth
cl_type: grandine cl_type: grandine
additional_services: additional_services:
- tx_spammer - tx_fuzz
- blob_spammer - forkmon
- el_forkmon
- beacon_metrics_gazer
- dora - dora
- prometheus_grafana - prometheus_grafana
- spamoor_blob - spamoor_blob
......
...@@ -30,7 +30,7 @@ network_params: ...@@ -30,7 +30,7 @@ network_params:
additional_services: additional_services:
- dora - dora
- spamoor_blob - spamoor_blob
- tx_spammer - tx_fuzz
- assertoor - assertoor
dora_params: dora_params:
image: "ethpandaops/dora:master-latest" image: "ethpandaops/dora:master-latest"
......
...@@ -34,7 +34,7 @@ network_params: ...@@ -34,7 +34,7 @@ network_params:
additional_services: additional_services:
- dora - dora
- spamoor_blob - spamoor_blob
- tx_spammer - tx_fuzz
- assertoor - assertoor
dora_params: dora_params:
image: "ethpandaops/dora:master-latest" image: "ethpandaops/dora:master-latest"
......
...@@ -36,7 +36,7 @@ network_params: ...@@ -36,7 +36,7 @@ network_params:
additional_services: additional_services:
- dora - dora
- spamoor_blob - spamoor_blob
- tx_spammer - tx_fuzz
- assertoor - assertoor
dora_params: dora_params:
image: "ethpandaops/dora:master-latest" image: "ethpandaops/dora:master-latest"
......
participants_matrix: participants_matrix:
el: el:
- el_type: nethermind - el_type: nethermind
el_image: nethermindeth/nethermind:pectra el_image: nethermind/nethermind:1.31.4
- el_type: geth - el_type: geth
el_image: ethpandaops/geth:prague-devnet-2 el_image: ethereum/client-go:v1.15.5
- el_type: ethereumjs - el_type: ethereumjs
el_image: ethpandaops/ethereumjs:master el_image: ethpandaops/ethereumjs:eip7840
- el_type: erigon - el_type: erigon
el_image: erigontech/erigon:pectra_e2 el_image: erigontech/erigon:v3.0.0-rc3
- el_type: reth - el_type: reth
el_image: ethpandaops/reth:onbjerg-devnet-2 el_image: ethpandaops/reth:main-42f8223
- el_type: besu - el_type: besu
el_image: ethpandaops/besu:main el_image: hyperledger/besu:25.2.2
cl: cl:
- cl_type: lighthouse - cl_type: lighthouse
cl_image: ethpandaops/lighthouse:electra-devnet-1-51d51f5 cl_image: sigp/lighthouse:v7.0.0-beta.3
- cl_type: teku - cl_type: teku
cl_image: ethpandaops/teku:master cl_image: consensys/teku:develop
- cl_type: nimbus - cl_type: nimbus
cl_image: ethpandaops/nimbus-eth2:unstable cl_image: statusim/nimbus-eth2:multiarch-v25.3.0
- cl_type: lodestar - cl_type: lodestar
cl_image: ethpandaops/lodestar:electra-fork-rebasejul30 cl_image: chainsafe/lodestar:v1.27.1
- cl_type: grandine - cl_type: grandine
cl_image: ethpandaops/grandine:electra cl_image: sifrai/grandine:1.0.0
- cl_type: prysm - cl_type: prysm
cl_image: ethpandaops/prysm-beacon-chain:develop cl_image: prysmaticlabs/prysm-beacon-chain:v5.3.0
network_params: network_params:
electra_fork_epoch: 1 electra_fork_epoch: 1
min_validator_withdrawability_delay: 1 min_validator_withdrawability_delay: 1
...@@ -34,7 +34,7 @@ additional_services: ...@@ -34,7 +34,7 @@ additional_services:
- dora - dora
- assertoor - assertoor
snooper_enabled: true snooper_enabled: false
assertoor_params: assertoor_params:
run_stability_check: false run_stability_check: false
run_block_proposal_check: false run_block_proposal_check: false
......
...@@ -20,7 +20,7 @@ participants: ...@@ -20,7 +20,7 @@ participants:
network_params: network_params:
electra_fork_epoch: 0 electra_fork_epoch: 0
additional_services: additional_services:
- el_forkmon - forkmon
- tx_spammer - tx_fuzz
- dora - dora
snooper_enabled: true snooper_enabled: true
...@@ -643,14 +643,12 @@ network_params: ...@@ -643,14 +643,12 @@ network_params:
additional_services: additional_services:
- assertoor - assertoor
- broadcaster - broadcaster
- tx_spammer - tx_fuzz
- blob_spammer
- custom_flood - custom_flood
- spamoor - spamoor
- spamoor_blob - spamoor_blob
- el_forkmon - forkmon
- blockscout - blockscout
- beacon_metrics_gazer
- dora - dora
- full_beaconchain_explorer - full_beaconchain_explorer
- prometheus_grafana - prometheus_grafana
...@@ -682,12 +680,12 @@ dora_params: ...@@ -682,12 +680,12 @@ dora_params:
env: {} env: {}
# Configuration place for transaction spammer - https://github.com/MariusVanDerWijden/tx-fuzz # Configuration place for transaction spammer - https://github.com/MariusVanDerWijden/tx-fuzz
tx_spammer_params: tx_fuzz_params:
# TX Spammer docker image to use # TX Spammer docker image to use
# Defaults to the latest master image # Defaults to the latest master image
image: "ethpandaops/tx-fuzz:master" image: "ethpandaops/tx-fuzz:master"
# A list of optional extra params that will be passed to the TX Spammer container for modifying its behaviour # A list of optional extra params that will be passed to the TX Spammer container for modifying its behaviour
tx_spammer_extra_args: [] tx_fuzz_extra_args: []
# Configuration place for prometheus # Configuration place for prometheus
prometheus_params: prometheus_params:
...@@ -1114,7 +1112,7 @@ network_params: ...@@ -1114,7 +1112,7 @@ network_params:
</details> </details>
<details> <details>
<summary>A 2-node geth/lighthouse network with optional services (Grafana, Prometheus, transaction-spammer, EngineAPI snooper, and a testnet verifier)</summary> <summary>A 2-node geth/lighthouse network with optional services (Grafana, Prometheus, tx_fuzz, EngineAPI snooper, and a testnet verifier)</summary>
```yaml ```yaml
participants: participants:
...@@ -1219,7 +1217,6 @@ Here's a table of where the keys are used ...@@ -1219,7 +1217,6 @@ Here's a table of where the keys are used
|---------------|---------------------|------------------|-----------------|-----------------------------| |---------------|---------------------|------------------|-----------------|-----------------------------|
| 0 | Builder | ✅ | | As coinbase | | 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 |
| 3 | transaction_spammer | ✅ | | To spam transactions with | | 3 | transaction_spammer | ✅ | | To spam transactions with |
| 4 | spamoor_blob | ✅ | | As the sender of blobs | | 4 | spamoor_blob | ✅ | | As the sender of blobs |
| 6 | mev_flood | ✅ | | As the contract owner | | 6 | mev_flood | ✅ | | As the contract owner |
......
...@@ -79,7 +79,7 @@ There are only two major difference between CL client and EL client launchers. F ...@@ -79,7 +79,7 @@ There are only two major difference between CL client and EL client launchers. F
After the Ethereum network is up and running, this package starts several auxiliary containers to make it easier to work with the Ethereum network. At time of writing, these are: After the Ethereum network is up and running, this package starts several auxiliary containers to make it easier to work with the Ethereum network. At time of writing, these are:
- [Forkmon](https://github.com/ethpandaops/ethereum-package/tree/main/src/el_forkmon), a "fork monitor" web UI for visualizing the CL clients' forks - [Forkmon](https://github.com/ethpandaops/ethereum-package/tree/main/src/forkmon), a "fork monitor" web UI for visualizing the CL clients' forks
- [Prometheus](https://github.com/ethpandaops/ethereum-package/tree/main/src/prometheus) for collecting client node metrics - [Prometheus](https://github.com/ethpandaops/ethereum-package/tree/main/src/prometheus) for collecting client node metrics
- [Grafana](https://github.com/ethpandaops/ethereum-package/tree/main/src/grafana) for visualizing client node metrics - [Grafana](https://github.com/ethpandaops/ethereum-package/tree/main/src/grafana) for visualizing client node metrics
- [An ETH transaction spammer](https://github.com/ethpandaops/ethereum-package/tree/main/src/transaction_spammer), which [has been forked off](https://github.com/kurtosis-tech/tx-fuzz) of [Marius' transaction spammer code](https://github.com/MariusVanDerWijden/tx-fuzz) so that it can run as a container - [An ETH transaction spammer](https://github.com/ethpandaops/ethereum-package/tree/main/src/transaction_spammer), which [has been forked off](https://github.com/kurtosis-tech/tx-fuzz) of [Marius' transaction spammer code](https://github.com/MariusVanDerWijden/tx-fuzz) so that it can run as a container
......
...@@ -11,15 +11,10 @@ validator_ranges = import_module( ...@@ -11,15 +11,10 @@ validator_ranges = import_module(
"./src/prelaunch_data_generator/validator_keystores/validator_ranges_generator.star" "./src/prelaunch_data_generator/validator_keystores/validator_ranges_generator.star"
) )
transaction_spammer = import_module( tx_fuzz = import_module("./src/tx_fuzz/tx_fuzz.star")
"./src/transaction_spammer/transaction_spammer.star"
)
blob_spammer = import_module("./src/blob_spammer/blob_spammer.star")
spamoor_blob = import_module("./src/spamoor_blob/spamoor_blob.star") spamoor_blob = import_module("./src/spamoor_blob/spamoor_blob.star")
el_forkmon = import_module("./src/el_forkmon/el_forkmon_launcher.star") forkmon = import_module("./src/forkmon/forkmon_launcher.star")
beacon_metrics_gazer = import_module(
"./src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star"
)
dora = import_module("./src/dora/dora_launcher.star") dora = import_module("./src/dora/dora_launcher.star")
dugtrio = import_module("./src/dugtrio/dugtrio_launcher.star") dugtrio = import_module("./src/dugtrio/dugtrio_launcher.star")
blutgang = import_module("./src/blutgang/blutgang_launcher.star") blutgang = import_module("./src/blutgang/blutgang_launcher.star")
...@@ -439,41 +434,27 @@ def run(plan, args={}): ...@@ -439,41 +434,27 @@ def run(plan, args={}):
for index, additional_service in enumerate( for index, additional_service in enumerate(
args_with_right_defaults.additional_services args_with_right_defaults.additional_services
): ):
if additional_service == "tx_spammer": if additional_service == "tx_fuzz":
plan.print("Launching transaction spammer") plan.print("Launching tx-fuzz")
tx_spammer_params = args_with_right_defaults.tx_spammer_params tx_fuzz_params = args_with_right_defaults.tx_fuzz_params
transaction_spammer.launch_transaction_spammer( tx_fuzz.launch_tx_fuzz(
plan,
prefunded_accounts,
fuzz_target,
tx_spammer_params,
global_node_selectors,
)
plan.print("Successfully launched transaction spammer")
elif additional_service == "blob_spammer":
plan.print("Launching Blob spammer")
blob_spammer.launch_blob_spammer(
plan, plan,
prefunded_accounts, prefunded_accounts,
fuzz_target, fuzz_target,
all_cl_contexts[0], tx_fuzz_params,
network_params.deneb_fork_epoch,
network_params.seconds_per_slot,
network_params.genesis_delay,
global_node_selectors, global_node_selectors,
args_with_right_defaults.tx_spammer_params,
) )
plan.print("Successfully launched blob spammer") plan.print("Successfully launched tx-fuzz")
# We need a way to do time.sleep # We need a way to do time.sleep
# TODO add code that waits for CL genesis # TODO add code that waits for CL genesis
elif additional_service == "el_forkmon": elif additional_service == "forkmon":
plan.print("Launching el forkmon") plan.print("Launching el forkmon")
el_forkmon_config_template = read_file( forkmon_config_template = read_file(
static_files.EL_FORKMON_CONFIG_TEMPLATE_FILEPATH static_files.FORKMON_CONFIG_TEMPLATE_FILEPATH
) )
el_forkmon.launch_el_forkmon( forkmon.launch_forkmon(
plan, plan,
el_forkmon_config_template, forkmon_config_template,
all_el_contexts, all_el_contexts,
global_node_selectors, global_node_selectors,
args_with_right_defaults.port_publisher, args_with_right_defaults.port_publisher,
...@@ -481,24 +462,6 @@ def run(plan, args={}): ...@@ -481,24 +462,6 @@ def run(plan, args={}):
args_with_right_defaults.docker_cache_params, args_with_right_defaults.docker_cache_params,
) )
plan.print("Successfully launched execution layer forkmon") plan.print("Successfully launched execution layer forkmon")
elif additional_service == "beacon_metrics_gazer":
plan.print("Launching beacon metrics gazer")
beacon_metrics_gazer_prometheus_metrics_job = (
beacon_metrics_gazer.launch_beacon_metrics_gazer(
plan,
all_cl_contexts,
network_params,
global_node_selectors,
args_with_right_defaults.port_publisher,
index,
args_with_right_defaults.docker_cache_params,
)
)
launch_prometheus_grafana = True
prometheus_additional_metrics_jobs.append(
beacon_metrics_gazer_prometheus_metrics_job
)
plan.print("Successfully launched beacon metrics gazer")
elif additional_service == "blockscout": elif additional_service == "blockscout":
plan.print("Launching blockscout") plan.print("Launching blockscout")
blockscout_sc_verif_url = blockscout.launch_blockscout( blockscout_sc_verif_url = blockscout.launch_blockscout(
......
...@@ -102,8 +102,8 @@ network_params: ...@@ -102,8 +102,8 @@ network_params:
additional_services: [] additional_services: []
dora_params: dora_params:
image: "" image: ""
tx_spammer_params: tx_fuzz_params:
tx_spammer_extra_args: [] tx_fuzz_extra_args: []
spamoor_blob_params: spamoor_blob_params:
spamoor_extra_args: [] spamoor_extra_args: []
prometheus_params: prometheus_params:
......
shared_utils = import_module("../shared_utils/shared_utils.star")
prometheus = import_module("../prometheus/prometheus_launcher.star")
constants = import_module("../package_io/constants.star")
SERVICE_NAME = "beacon-metrics-gazer"
IMAGE_NAME = "ethpandaops/beacon-metrics-gazer:master"
HTTP_PORT_NUMBER = 8080
METRICS_PATH = "/metrics"
BEACON_METRICS_GAZER_CONFIG_FILENAME = "validator-ranges.yaml"
BEACON_METRICS_GAZER_CONFIG_MOUNT_DIRPATH_ON_SERVICE = "/config"
VALIDATOR_RANGES_ARTIFACT_NAME = "validator-ranges"
USED_PORTS = {
constants.HTTP_PORT_ID: shared_utils.new_port_spec(
HTTP_PORT_NUMBER,
shared_utils.TCP_PROTOCOL,
shared_utils.HTTP_APPLICATION_PROTOCOL,
)
}
# The min/max CPU/memory that beacon-metrics-gazer can use
MIN_CPU = 10
MAX_CPU = 500
MIN_MEMORY = 20
MAX_MEMORY = 300
def launch_beacon_metrics_gazer(
plan,
cl_contexts,
network_params,
global_node_selectors,
port_publisher,
additional_service_index,
docker_cache_params,
):
config = get_config(
cl_contexts[0].beacon_http_url,
global_node_selectors,
port_publisher,
additional_service_index,
docker_cache_params,
)
beacon_metrics_gazer_service = plan.add_service(SERVICE_NAME, config)
return prometheus.new_metrics_job(
job_name=SERVICE_NAME,
endpoint="{0}:{1}".format(
beacon_metrics_gazer_service.ip_address, HTTP_PORT_NUMBER
),
metrics_path=METRICS_PATH,
labels={
"service": SERVICE_NAME,
},
)
def get_config(
beacon_http_url,
node_selectors,
port_publisher,
additional_service_index,
docker_cache_params,
):
config_file_path = shared_utils.path_join(
BEACON_METRICS_GAZER_CONFIG_MOUNT_DIRPATH_ON_SERVICE,
BEACON_METRICS_GAZER_CONFIG_FILENAME,
)
public_ports = shared_utils.get_additional_service_standard_public_port(
port_publisher,
constants.HTTP_PORT_ID,
additional_service_index,
0,
)
return ServiceConfig(
image=shared_utils.docker_cache_image_calc(
docker_cache_params,
IMAGE_NAME,
),
ports=USED_PORTS,
public_ports=public_ports,
files={
BEACON_METRICS_GAZER_CONFIG_MOUNT_DIRPATH_ON_SERVICE: VALIDATOR_RANGES_ARTIFACT_NAME,
},
cmd=[
"{0}".format(beacon_http_url),
"--ranges-file",
config_file_path,
"--port",
"{0}".format(HTTP_PORT_NUMBER),
"--address",
"0.0.0.0",
"-v",
],
min_cpu=MIN_CPU,
max_cpu=MAX_CPU,
min_memory=MIN_MEMORY,
max_memory=MAX_MEMORY,
node_selectors=node_selectors,
)
SERVICE_NAME = "blob-spammer"
ENTRYPOINT_ARGS = ["/bin/sh", "-c"]
# The min/max CPU/memory that blob-spammer can use
MIN_CPU = 100
MAX_CPU = 1000
MIN_MEMORY = 256
MAX_MEMORY = 512
def launch_blob_spammer(
plan,
prefunded_addresses,
el_uri,
cl_context,
deneb_fork_epoch,
seconds_per_slot,
genesis_delay,
global_node_selectors,
tx_spammer_params,
):
config = get_config(
prefunded_addresses,
el_uri,
cl_context,
deneb_fork_epoch,
seconds_per_slot,
genesis_delay,
global_node_selectors,
tx_spammer_params.image,
)
plan.add_service(SERVICE_NAME, config)
def get_config(
prefunded_addresses,
el_uri,
cl_context,
deneb_fork_epoch,
seconds_per_slot,
genesis_delay,
node_selectors,
image,
):
dencunTime = (deneb_fork_epoch * 32 * seconds_per_slot) + genesis_delay
return ServiceConfig(
image=image,
entrypoint=ENTRYPOINT_ARGS,
cmd=[
" && ".join(
[
"apk update",
"apk add curl jq",
'current_epoch=$(curl -s {0}/eth/v2/beacon/blocks/head | jq -r ".version")'.format(
cl_context.beacon_http_url,
),
"echo $current_epoch",
'while [ $current_epoch != "deneb" ]; do echo "waiting for deneb, current epoch is $current_epoch"; current_epoch=$(curl -s {0}/eth/v2/beacon/blocks/head | jq -r ".version"); sleep {1}; done'.format(
cl_context.beacon_http_url,
seconds_per_slot,
),
'echo "sleep is over, starting to send blob transactions"',
"/tx-fuzz.bin blobs --rpc={} --sk={}".format(
el_uri,
prefunded_addresses[1].private_key,
),
]
)
],
min_cpu=MIN_CPU,
max_cpu=MAX_CPU,
min_memory=MIN_MEMORY,
max_memory=MAX_MEMORY,
node_selectors=node_selectors,
)
shared_utils = import_module("../shared_utils/shared_utils.star") shared_utils = import_module("../shared_utils/shared_utils.star")
constants = import_module("../package_io/constants.star") constants = import_module("../package_io/constants.star")
SERVICE_NAME = "el-forkmon" SERVICE_NAME = "forkmon"
IMAGE_NAME = "ethpandaops/execution-monitor:master" IMAGE_NAME = "ethpandaops/execution-monitor:master"
HTTP_PORT_NUMBER = 8080 HTTP_PORT_NUMBER = 8080
EL_FORKMON_CONFIG_FILENAME = "el-forkmon-config.toml" FORKMON_CONFIG_FILENAME = "forkmon-config.toml"
EL_FORKMON_CONFIG_MOUNT_DIRPATH_ON_SERVICE = "/config" FORKMON_CONFIG_MOUNT_DIRPATH_ON_SERVICE = "/config"
USED_PORTS = { USED_PORTS = {
constants.HTTP_PORT_ID: shared_utils.new_port_spec( constants.HTTP_PORT_ID: shared_utils.new_port_spec(
...@@ -18,14 +18,14 @@ USED_PORTS = { ...@@ -18,14 +18,14 @@ USED_PORTS = {
) )
} }
# The min/max CPU/memory that el-forkmon can use # The min/max CPU/memory that forkmon can use
MIN_CPU = 10 MIN_CPU = 10
MAX_CPU = 100 MAX_CPU = 100
MIN_MEMORY = 32 MIN_MEMORY = 32
MAX_MEMORY = 256 MAX_MEMORY = 256
def launch_el_forkmon( def launch_forkmon(
plan, plan,
config_template, config_template,
el_contexts, el_contexts,
...@@ -47,12 +47,10 @@ def launch_el_forkmon( ...@@ -47,12 +47,10 @@ def launch_el_forkmon(
config_template, template_data config_template, template_data
) )
template_and_data_by_rel_dest_filepath = {} template_and_data_by_rel_dest_filepath = {}
template_and_data_by_rel_dest_filepath[ template_and_data_by_rel_dest_filepath[FORKMON_CONFIG_FILENAME] = template_and_data
EL_FORKMON_CONFIG_FILENAME
] = template_and_data
config_files_artifact_name = plan.render_templates( config_files_artifact_name = plan.render_templates(
template_and_data_by_rel_dest_filepath, "el-forkmon-config" template_and_data_by_rel_dest_filepath, "forkmon-config"
) )
config = get_config( config = get_config(
...@@ -74,7 +72,7 @@ def get_config( ...@@ -74,7 +72,7 @@ def get_config(
docker_cache_params, docker_cache_params,
): ):
config_file_path = shared_utils.path_join( config_file_path = shared_utils.path_join(
EL_FORKMON_CONFIG_MOUNT_DIRPATH_ON_SERVICE, EL_FORKMON_CONFIG_FILENAME FORKMON_CONFIG_MOUNT_DIRPATH_ON_SERVICE, FORKMON_CONFIG_FILENAME
) )
public_ports = shared_utils.get_additional_service_standard_public_port( public_ports = shared_utils.get_additional_service_standard_public_port(
...@@ -92,7 +90,7 @@ def get_config( ...@@ -92,7 +90,7 @@ def get_config(
ports=USED_PORTS, ports=USED_PORTS,
public_ports=public_ports, public_ports=public_ports,
files={ files={
EL_FORKMON_CONFIG_MOUNT_DIRPATH_ON_SERVICE: config_files_artifact_name, FORKMON_CONFIG_MOUNT_DIRPATH_ON_SERVICE: config_files_artifact_name,
}, },
cmd=[config_file_path], cmd=[config_file_path],
min_cpu=MIN_CPU, min_cpu=MIN_CPU,
......
...@@ -81,7 +81,7 @@ ATTR_TO_BE_SKIPPED_AT_ROOT = ( ...@@ -81,7 +81,7 @@ ATTR_TO_BE_SKIPPED_AT_ROOT = (
"assertoor_params", "assertoor_params",
"prometheus_params", "prometheus_params",
"grafana_params", "grafana_params",
"tx_spammer_params", "tx_fuzz_params",
"custom_flood_params", "custom_flood_params",
"xatu_sentry_params", "xatu_sentry_params",
"port_publisher", "port_publisher",
...@@ -107,7 +107,7 @@ def input_parser(plan, input_args): ...@@ -107,7 +107,7 @@ def input_parser(plan, input_args):
result["additional_services"] = DEFAULT_ADDITIONAL_SERVICES result["additional_services"] = DEFAULT_ADDITIONAL_SERVICES
else: else:
result["additional_services"] = [] result["additional_services"] = []
result["tx_spammer_params"] = get_default_tx_spammer_params() result["tx_fuzz_params"] = get_default_tx_fuzz_params()
result["custom_flood_params"] = get_default_custom_flood_params() result["custom_flood_params"] = get_default_custom_flood_params()
result["disable_peer_scoring"] = False result["disable_peer_scoring"] = False
result["grafana_params"] = get_default_grafana_params() result["grafana_params"] = get_default_grafana_params()
...@@ -156,10 +156,10 @@ def input_parser(plan, input_args): ...@@ -156,10 +156,10 @@ def input_parser(plan, input_args):
for sub_attr in input_args["mev_params"]: for sub_attr in input_args["mev_params"]:
sub_value = input_args["mev_params"][sub_attr] sub_value = input_args["mev_params"][sub_attr]
result["mev_params"][sub_attr] = sub_value result["mev_params"][sub_attr] = sub_value
elif attr == "tx_spammer_params": elif attr == "tx_fuzz_params":
for sub_attr in input_args["tx_spammer_params"]: for sub_attr in input_args["tx_fuzz_params"]:
sub_value = input_args["tx_spammer_params"][sub_attr] sub_value = input_args["tx_fuzz_params"][sub_attr]
result["tx_spammer_params"][sub_attr] = sub_value result["tx_fuzz_params"][sub_attr] = sub_value
elif attr == "custom_flood_params": elif attr == "custom_flood_params":
for sub_attr in input_args["custom_flood_params"]: for sub_attr in input_args["custom_flood_params"]:
sub_value = input_args["custom_flood_params"][sub_attr] sub_value = input_args["custom_flood_params"][sub_attr]
...@@ -402,9 +402,9 @@ def input_parser(plan, input_args): ...@@ -402,9 +402,9 @@ def input_parser(plan, input_args):
github_prefix=result["docker_cache_params"]["github_prefix"], github_prefix=result["docker_cache_params"]["github_prefix"],
google_prefix=result["docker_cache_params"]["google_prefix"], google_prefix=result["docker_cache_params"]["google_prefix"],
), ),
tx_spammer_params=struct( tx_fuzz_params=struct(
image=result["tx_spammer_params"]["image"], image=result["tx_fuzz_params"]["image"],
tx_spammer_extra_args=result["tx_spammer_params"]["tx_spammer_extra_args"], tx_fuzz_extra_args=result["tx_fuzz_params"]["tx_fuzz_extra_args"],
), ),
prometheus_params=struct( prometheus_params=struct(
storage_tsdb_retention_time=result["prometheus_params"][ storage_tsdb_retention_time=result["prometheus_params"][
...@@ -1141,10 +1141,10 @@ def get_default_mev_params(mev_type, preset): ...@@ -1141,10 +1141,10 @@ def get_default_mev_params(mev_type, preset):
} }
def get_default_tx_spammer_params(): def get_default_tx_fuzz_params():
return { return {
"image": "ethpandaops/tx-fuzz:master", "image": "ethpandaops/tx-fuzz:master",
"tx_spammer_extra_args": [], "tx_fuzz_extra_args": [],
} }
...@@ -1421,7 +1421,7 @@ def docker_cache_image_override(plan, result): ...@@ -1421,7 +1421,7 @@ def docker_cache_image_override(plan, result):
"mev_params.mev_boost_image", "mev_params.mev_boost_image",
"mev_params.mev_flood_image", "mev_params.mev_flood_image",
"xatu_sentry_params.xatu_sentry_image", "xatu_sentry_params.xatu_sentry_image",
"tx_spammer_params.image", "tx_fuzz_params.image",
"prometheus_params.image", "prometheus_params.image",
"grafana_params.image", "grafana_params.image",
"spamoor_params.image", "spamoor_params.image",
......
...@@ -191,9 +191,9 @@ SUBCATEGORY_PARAMS = { ...@@ -191,9 +191,9 @@ SUBCATEGORY_PARAMS = {
"github_prefix", "github_prefix",
"google_prefix", "google_prefix",
], ],
"tx_spammer_params": [ "tx_fuzz_params": [
"image", "image",
"tx_spammer_extra_args", "tx_fuzz_extra_args",
], ],
"prometheus_params": [ "prometheus_params": [
"min_cpu", "min_cpu",
...@@ -279,12 +279,10 @@ SUBCATEGORY_PARAMS = { ...@@ -279,12 +279,10 @@ SUBCATEGORY_PARAMS = {
ADDITIONAL_SERVICES_PARAMS = [ ADDITIONAL_SERVICES_PARAMS = [
"assertoor", "assertoor",
"broadcaster", "broadcaster",
"tx_spammer", "tx_fuzz",
"blob_spammer",
"custom_flood", "custom_flood",
"el_forkmon", "forkmon",
"blockscout", "blockscout",
"beacon_metrics_gazer",
"dora", "dora",
"full_beaconchain_explorer", "full_beaconchain_explorer",
"prometheus_grafana", "prometheus_grafana",
......
...@@ -4,8 +4,8 @@ SERVICE_NAME = "spamoor-blob" ...@@ -4,8 +4,8 @@ SERVICE_NAME = "spamoor-blob"
# The min/max CPU/memory that spamoor can use # The min/max CPU/memory that spamoor can use
MIN_CPU = 100 MIN_CPU = 100
MAX_CPU = 1000 MAX_CPU = 1000
MIN_MEMORY = 20 MIN_MEMORY = 100
MAX_MEMORY = 300 MAX_MEMORY = 1000
def launch_spamoor_blob( def launch_spamoor_blob(
......
...@@ -7,8 +7,8 @@ EL_CL_GENESIS_GENERATION_CONFIG_TEMPLATE_FILEPATH = ( ...@@ -7,8 +7,8 @@ EL_CL_GENESIS_GENERATION_CONFIG_TEMPLATE_FILEPATH = (
) )
# EL Forkmon config # EL Forkmon config
EL_FORKMON_CONFIG_TEMPLATE_FILEPATH = ( FORKMON_CONFIG_TEMPLATE_FILEPATH = (
STATIC_FILES_DIRPATH + "/el-forkmon-config/config.toml.tmpl" STATIC_FILES_DIRPATH + "/forkmon-config/config.toml.tmpl"
) )
# Validator Ranges config # Validator Ranges config
......
shared_utils = import_module("../shared_utils/shared_utils.star") shared_utils = import_module("../shared_utils/shared_utils.star")
SERVICE_NAME = "transaction-spammer" SERVICE_NAME = "tx-fuzz"
# The min/max CPU/memory that tx-spammer can use # The min/max CPU/memory that tx-fuzz can use
MIN_CPU = 100 MIN_CPU = 100
MAX_CPU = 1000 MAX_CPU = 1000
MIN_MEMORY = 20 MIN_MEMORY = 20
MAX_MEMORY = 300 MAX_MEMORY = 300
def launch_transaction_spammer( def launch_tx_fuzz(
plan, plan,
prefunded_addresses, prefunded_addresses,
el_uri, el_uri,
tx_spammer_params, tx_fuzz_params,
global_node_selectors, global_node_selectors,
): ):
config = get_config( config = get_config(
prefunded_addresses, prefunded_addresses,
el_uri, el_uri,
tx_spammer_params, tx_fuzz_params,
global_node_selectors, global_node_selectors,
) )
plan.add_service(SERVICE_NAME, config) plan.add_service(SERVICE_NAME, config)
...@@ -27,7 +27,7 @@ def launch_transaction_spammer( ...@@ -27,7 +27,7 @@ def launch_transaction_spammer(
def get_config( def get_config(
prefunded_addresses, prefunded_addresses,
el_uri, el_uri,
tx_spammer_params, tx_fuzz_params,
node_selectors, node_selectors,
): ):
cmd = [ cmd = [
...@@ -36,11 +36,11 @@ def get_config( ...@@ -36,11 +36,11 @@ def get_config(
"--sk={0}".format(prefunded_addresses[3].private_key), "--sk={0}".format(prefunded_addresses[3].private_key),
] ]
if len(tx_spammer_params.tx_spammer_extra_args) > 0: if len(tx_fuzz_params.tx_fuzz_extra_args) > 0:
cmd.extend([param for param in tx_spammer_params.tx_spammer_extra_args]) cmd.extend([param for param in tx_fuzz_params.tx_fuzz_extra_args])
return ServiceConfig( return ServiceConfig(
image=tx_spammer_params.image, image=tx_fuzz_params.image,
cmd=cmd, cmd=cmd,
min_cpu=MIN_CPU, min_cpu=MIN_CPU,
max_cpu=MAX_CPU, max_cpu=MAX_CPU,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment