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
a01d7727
Unverified
Commit
a01d7727
authored
Dec 06, 2024
by
Barnabas Busa
Committed by
GitHub
Dec 06, 2024
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add spamoor (#850)
parent
d7e31e01
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
126 additions
and
0 deletions
+126
-0
mix-with-tools-mev.yaml
.github/tests/mix-with-tools-mev.yaml
+1
-0
mix-with-tools-minimal.yaml
.github/tests/mix-with-tools-minimal.yaml
+1
-0
mix-with-tools.yaml
.github/tests/mix-with-tools.yaml
+1
-0
README.md
README.md
+22
-0
main.star
main.star
+10
-0
input_parser.star
src/package_io/input_parser.star
+27
-0
sanity_check.star
src/package_io/sanity_check.star
+9
-0
spamoor.star
src/spamoor/spamoor.star
+55
-0
No files found.
.github/tests/mix-with-tools-mev.yaml
View file @
a01d7727
...
...
@@ -26,6 +26,7 @@ additional_services:
-
blutgang
-
apache
-
tracoor
-
spamoor
ethereum_metrics_exporter_enabled
:
true
snooper_enabled
:
true
mev_type
:
flashbots
...
...
.github/tests/mix-with-tools-minimal.yaml
View file @
a01d7727
...
...
@@ -28,6 +28,7 @@ additional_services:
-
blutgang
-
apache
-
tracoor
-
spamoor
ethereum_metrics_exporter_enabled
:
true
snooper_enabled
:
true
keymanager_enabled
:
true
...
...
.github/tests/mix-with-tools.yaml
View file @
a01d7727
...
...
@@ -28,6 +28,7 @@ additional_services:
-
blutgang
-
apache
-
tracoor
-
spamoor
ethereum_metrics_exporter_enabled
:
true
snooper_enabled
:
true
keymanager_enabled
:
true
README.md
View file @
a01d7727
...
...
@@ -927,6 +927,27 @@ checkpoint_sync_enabled: false
# Global flag to set checkpoint sync url
checkpoint_sync_url
:
"
"
# Spamoor params
spamoor_params
:
# The image to use for spamoor
image
:
ethpandaops/spamoor:latest
# The type of transactions to send
# Valid values are eoatx, erctx, deploytx, depoy-destruct, blobs, gasburnertx
# Defaults to eoatx
tx_type
:
eoatx
# Throughput of spamoor
# Defaults to 1000
throughput
:
1000
# Max pending transactions for spamoor
# Defaults to 1000
max_pending
:
1000
# Max wallets for spamoor
# Defaults to 500
max_wallets
:
500
# Extra parameters to send to spamoor
# Defaults to empty
spamoor_extra_args
:
[]
# Global paarameter to set the exit ip address of services and public ports
port_publisher
:
# if you have a service that you want to expose on a specific interfact; set that IP here
...
...
@@ -1166,6 +1187,7 @@ Here's a table of where the keys are used
| 8 | assertoor | ✅ | ✅ | As the funding for tests |
| 11 | mev_custom_flood | ✅ | | As the sender of balance |
| 12 | l2_contracts | ✅ | | Contract deployer address |
| 13 | spamoor | ✅ | | Spams transactions |
## Developing On This Package
...
...
main.star
View file @
a01d7727
...
...
@@ -61,6 +61,7 @@ assertoor = import_module("./src/assertoor/assertoor_launcher.star")
get_prefunded_accounts = import_module(
"./src/prefunded_accounts/get_prefunded_accounts.star"
)
spamoor = import_module("./src/spamoor/spamoor.star")
GRAFANA_USER = "admin"
GRAFANA_PASSWORD = "admin"
...
...
@@ -686,6 +687,15 @@ def run(plan, args={}):
global_node_selectors,
args_with_right_defaults.docker_cache_params,
)
elif additional_service == "spamoor":
plan.print("Launching spamoor")
spamoor.launch_spamoor(
plan,
prefunded_accounts,
all_el_contexts,
args_with_right_defaults.spamoor_params,
global_node_selectors,
)
else:
fail("Invalid additional service %s" % (additional_service))
if launch_prometheus_grafana:
...
...
src/package_io/input_parser.star
View file @
a01d7727
...
...
@@ -86,6 +86,7 @@ ATTR_TO_BE_SKIPPED_AT_ROOT = (
"custom_flood_params",
"xatu_sentry_params",
"port_publisher",
"spamoor_params",
)
...
...
@@ -119,6 +120,7 @@ def input_parser(plan, input_args):
result["global_tolerations"] = []
result["global_node_selectors"] = {}
result["port_publisher"] = get_port_publisher_params("default")
result["spamoor_params"] = get_default_spamoor_params()
if constants.NETWORK_NAME.shadowfork in result["network_params"]["network"]:
shadow_base = result["network_params"]["network"].split("-shadowfork")[0]
...
...
@@ -184,6 +186,10 @@ def input_parser(plan, input_args):
result["xatu_sentry_params"][sub_attr] = sub_value
elif attr == "port_publisher":
result["port_publisher"] = get_port_publisher_params("user", input_args)
elif attr == "spamoor_params":
for sub_attr in input_args["spamoor_params"]:
sub_value = input_args["spamoor_params"][sub_attr]
result["spamoor_params"][sub_attr] = sub_value
if result.get("disable_peer_scoring"):
result = enrich_disable_peer_scoring(result)
...
...
@@ -430,6 +436,14 @@ def input_parser(plan, input_args):
"interval_between_transactions"
],
),
spamoor_params=struct(
image=result["spamoor_params"]["image"],
tx_type=result["spamoor_params"]["tx_type"],
throughput=result["spamoor_params"]["throughput"],
max_pending=result["spamoor_params"]["max_pending"],
max_wallets=result["spamoor_params"]["max_wallets"],
spamoor_extra_args=result["spamoor_params"]["spamoor_extra_args"],
),
additional_services=result["additional_services"],
wait_for_finalization=result["wait_for_finalization"],
global_log_level=result["global_log_level"],
...
...
@@ -844,6 +858,7 @@ def default_input_args(input_args):
"nat_exit_ip": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER,
"public_port_start": None,
},
"spamoor_params": get_default_spamoor_params(),
}
...
...
@@ -1151,6 +1166,17 @@ def get_default_xatu_sentry_params():
}
def get_default_spamoor_params():
return {
"image": "ethpandaops/spamoor:latest",
"tx_type": "eoatx",
"throughput": 1000,
"max_pending": 1000,
"max_wallets": 500,
"spamoor_extra_args": [],
}
def get_default_custom_flood_params():
# this is a simple script that increases the balance of the coinbase address at a cadence
return {"interval_between_transactions": 1}
...
...
@@ -1346,6 +1372,7 @@ def docker_cache_image_override(plan, result):
"goomy_blob_params.image",
"prometheus_params.image",
"grafana_params.image",
"spamoor_params.image",
]
if result["docker_cache_params"]["url"] == "":
...
...
src/package_io/sanity_check.star
View file @
a01d7727
...
...
@@ -244,6 +244,14 @@ SUBCATEGORY_PARAMS = {
"xatu_server_headers",
"beacon_subscriptions",
],
"spamoor_params": [
"image",
"tx_type",
"throughput",
"max_pending",
"max_wallets",
"spamoor_extra_args",
],
"port_publisher": [
"nat_exit_ip",
"el",
...
...
@@ -273,6 +281,7 @@ ADDITIONAL_SERVICES_PARAMS = [
"forky",
"apache",
"tracoor",
"spamoor",
]
ADDITIONAL_CATEGORY_PARAMS = {
...
...
src/spamoor/spamoor.star
0 → 100644
View file @
a01d7727
shared_utils = import_module("../shared_utils/shared_utils.star")
SERVICE_NAME = "spamoor"
# The min/max CPU/memory that spamoor can use
MIN_CPU = 100
MAX_CPU = 1000
MIN_MEMORY = 20
MAX_MEMORY = 300
def launch_spamoor(
plan,
prefunded_addresses,
all_el_contexts,
spamoor_params,
global_node_selectors,
):
config = get_config(
prefunded_addresses,
all_el_contexts,
spamoor_params,
global_node_selectors,
)
plan.add_service(SERVICE_NAME, config)
def get_config(
prefunded_addresses,
all_el_contexts,
spamoor_params,
node_selectors,
):
cmd = [
"{}".format(spamoor_params.tx_type),
"--privkey={}".format(prefunded_addresses[13].private_key),
"--rpchost={}".format(
",".join([el_context.rpc_http_url for el_context in all_el_contexts])
),
"--throughput={}".format(spamoor_params.throughput),
"--max-pending={}".format(spamoor_params.max_pending),
"--max-wallets={}".format(spamoor_params.max_wallets),
]
if len(spamoor_params.spamoor_extra_args) > 0:
cmd.extend([param for param in spamoor_params.spamoor_extra_args])
return ServiceConfig(
image=spamoor_params.image,
cmd=cmd,
min_cpu=MIN_CPU,
max_cpu=MAX_CPU,
min_memory=MIN_MEMORY,
max_memory=MAX_MEMORY,
node_selectors=node_selectors,
)
vicotor
@luxueqian
mentioned in commit
e957062f
·
Apr 13, 2025
mentioned in commit
e957062f
mentioned in commit e957062f619b4c8503c2c41cd7f51dbdb48a4ed3
Toggle commit list
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