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
56d2fa38
Unverified
Commit
56d2fa38
authored
Apr 17, 2024
by
Barnabas Busa
Committed by
GitHub
Apr 17, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add dugtrio beacon load balancer (#568)
parent
0ffcf74c
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
196 additions
and
1 deletion
+196
-1
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
+1
-1
main.star
main.star
+15
-0
dugtrio_launcher.star
src/dugtrio/dugtrio_launcher.star
+117
-0
static_files.star
src/static_files/static_files.star
+3
-0
config.yaml.tmpl
static_files/dugtrio-config/config.yaml.tmpl
+57
-0
No files found.
.github/tests/mix-with-tools-mev.yaml
View file @
56d2fa38
...
...
@@ -22,6 +22,7 @@ additional_services:
-
custom_flood
-
blobscan
-
blockscout
-
dugtrio
ethereum_metrics_exporter_enabled
:
true
snooper_enabled
:
true
mev_type
:
full
...
...
.github/tests/mix-with-tools-minimal.yaml
View file @
56d2fa38
...
...
@@ -32,6 +32,7 @@ additional_services:
-
custom_flood
-
blobscan
-
blockscout
-
dugtrio
ethereum_metrics_exporter_enabled
:
true
snooper_enabled
:
true
keymanager_enabled
:
true
.github/tests/mix-with-tools.yaml
View file @
56d2fa38
...
...
@@ -24,6 +24,7 @@ additional_services:
-
custom_flood
-
blobscan
-
blockscout
-
dugtrio
ethereum_metrics_exporter_enabled
:
true
snooper_enabled
:
true
keymanager_enabled
:
true
README.md
View file @
56d2fa38
...
...
@@ -542,7 +542,7 @@ additional_services:
-
full_beaconchain_explorer
-
prometheus_grafana
-
blobscan
-
dugtrio
# Configuration place for transaction spammer - https:#github.com/MariusVanDerWijden/tx-fuzz
tx_spammer_params
:
...
...
main.star
View file @
56d2fa38
...
...
@@ -21,6 +21,7 @@ beacon_metrics_gazer = import_module(
"./src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star"
)
dora = import_module("./src/dora/dora_launcher.star")
dugtrio = import_module("./src/dugtrio/dugtrio_launcher.star")
blobscan = import_module("./src/blobscan/blobscan_launcher.star")
full_beaconchain_explorer = import_module(
"./src/full_beaconchain/full_beaconchain_launcher.star"
...
...
@@ -382,6 +383,20 @@ def run(plan, args={}):
global_node_selectors,
)
plan.print("Successfully launched dora")
elif additional_service == "dugtrio":
plan.print("Launching dugtrio")
dugtrio_config_template = read_file(
static_files.DUGTRIO_CONFIG_TEMPLATE_FILEPATH
)
dugtrio.launch_dugtrio(
plan,
dugtrio_config_template,
all_participants,
args_with_right_defaults.participants,
network_params,
global_node_selectors,
)
plan.print("Successfully launched dugtrio")
elif additional_service == "blobscan":
plan.print("Launching blobscan")
blobscan.launch_blobscan(
...
...
src/dugtrio/dugtrio_launcher.star
0 → 100644
View file @
56d2fa38
shared_utils = import_module("../shared_utils/shared_utils.star")
constants = import_module("../package_io/constants.star")
SERVICE_NAME = "dugtrio"
HTTP_PORT_ID = "http"
HTTP_PORT_NUMBER = 8080
DUGTRIO_CONFIG_FILENAME = "dugtrio-config.yaml"
DUGTRIO_CONFIG_MOUNT_DIRPATH_ON_SERVICE = "/config"
IMAGE_NAME = "ethpandaops/dugtrio:latest"
# The min/max CPU/memory that dugtrio can use
MIN_CPU = 100
MAX_CPU = 1000
MIN_MEMORY = 128
MAX_MEMORY = 2048
USED_PORTS = {
HTTP_PORT_ID: shared_utils.new_port_spec(
HTTP_PORT_NUMBER,
shared_utils.TCP_PROTOCOL,
shared_utils.HTTP_APPLICATION_PROTOCOL,
)
}
def launch_dugtrio(
plan,
config_template,
participant_contexts,
participant_configs,
network_params,
global_node_selectors,
):
all_cl_client_info = []
for index, participant in enumerate(participant_contexts):
full_name, cl_client, _, _ = shared_utils.get_client_names(
participant, index, participant_contexts, participant_configs
)
all_cl_client_info.append(
new_cl_client_info(
cl_client.beacon_http_url,
full_name,
)
)
template_data = new_config_template_data(
network_params.network, HTTP_PORT_NUMBER, all_cl_client_info
)
template_and_data = shared_utils.new_template_and_data(
config_template, template_data
)
template_and_data_by_rel_dest_filepath = {}
template_and_data_by_rel_dest_filepath[DUGTRIO_CONFIG_FILENAME] = template_and_data
config_files_artifact_name = plan.render_templates(
template_and_data_by_rel_dest_filepath, "dugtrio-config"
)
config = get_config(
config_files_artifact_name,
network_params,
global_node_selectors,
)
plan.add_service(SERVICE_NAME, config)
def get_config(
config_files_artifact_name,
network_params,
node_selectors,
):
config_file_path = shared_utils.path_join(
DUGTRIO_CONFIG_MOUNT_DIRPATH_ON_SERVICE,
DUGTRIO_CONFIG_FILENAME,
)
return ServiceConfig(
image=IMAGE_NAME,
ports=USED_PORTS,
files={
DUGTRIO_CONFIG_MOUNT_DIRPATH_ON_SERVICE: config_files_artifact_name,
},
cmd=["-config", config_file_path],
min_cpu=MIN_CPU,
max_cpu=MAX_CPU,
min_memory=MIN_MEMORY,
max_memory=MAX_MEMORY,
node_selectors=node_selectors,
ready_conditions=ReadyCondition(
recipe=GetHttpRequestRecipe(
port_id="http",
endpoint="/healthcheck",
),
field="code",
assertion="==",
target_value=200,
),
)
def new_config_template_data(network, listen_port_num, cl_client_info):
return {
"Network": network,
"ListenPortNum": listen_port_num,
"CLClientInfo": cl_client_info,
}
def new_cl_client_info(beacon_http_url, full_name):
return {
"Beacon_HTTP_URL": beacon_http_url,
"FullName": full_name,
}
src/static_files/static_files.star
View file @
56d2fa38
...
...
@@ -17,6 +17,9 @@ VALIDATOR_RANGES_CONFIG_TEMPLATE_FILEPATH = (
)
DORA_CONFIG_TEMPLATE_FILEPATH = STATIC_FILES_DIRPATH + "/dora-config/config.yaml.tmpl"
DUGTRIO_CONFIG_TEMPLATE_FILEPATH = (
STATIC_FILES_DIRPATH + "/dugtrio-config/config.yaml.tmpl"
)
FULL_BEACONCHAIN_CONFIG_TEMPLATE_FILEPATH = (
STATIC_FILES_DIRPATH + "/full-beaconchain-config/config.yaml.tmpl"
...
...
static_files/dugtrio-config/config.yaml.tmpl
0 → 100644
View file @
56d2fa38
logging:
outputLevel: "debug"
#outputStderr: false
#filePath: "explorer.log"
#fileLevel: "warn"
# HTTP Server configuration
server:
# Address to listen on
host: "0.0.0.0"
# Port to listen on
port: "8080"
# Beacon Node Endpoints
endpoints:
{{ range $clClient := .CLClientInfo }}
- url: "{{ $clClient.Beacon_HTTP_URL }}"
name: "{{ $clClient.FullName }}"
{{- end }}
# Pool configuration
pool:
schedulerMode: "rr"
followDistance: 10
maxHeadDistance: 2
# Proxy configuration
proxy:
# number of proxies in front of dugtrio
proxyCount: 0
# proxy call timeout
callTimeout: 60s
# proxy session timeout
sessionTimeout: 10m
# reuse the same endpoint when possible
stickyEndpoint: true
# call rate limit (calls per second)
callRateLimit: 100
# call rate burst limit
callRateBurst: 1000
# blocked api paths (regex patterns)
blockedPaths:
- ^/eth/v[0-9]+/debug/.*
# Frontend configuration
frontend:
# Enable or disable to web frontend
enabled: true
minify: true
siteName: "Dugtrio-Kurtosis"
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