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
66c4e01a
Unverified
Commit
66c4e01a
authored
Nov 07, 2022
by
Gyanendra Mishra
Committed by
GitHub
Nov 07, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4 from kurtosis-tech/gyani/ontop-of-network
simple POJOs and the mev boost launcher
parents
79c06978
11f2b113
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
153 additions
and
2 deletions
+153
-2
README.md
README.md
+39
-2
changelog.md
docs/changelog.md
+1
-0
main.star
main.star
+1
-0
cl_client_context.star
src/participant_network/cl/cl_client_context.star
+9
-0
cl_node_metrics_info.star
src/participant_network/cl/cl_node_metrics_info.star
+7
-0
el_client_context.star
src/participant_network/el/el_client_context.star
+10
-0
mev_boost_context.star
src/participant_network/mev_boost/mev_boost_context.star
+9
-0
mev_boost_launcher.star
src/participant_network/mev_boost/mev_boost_launcher.star
+48
-0
participant.star
src/participant_network/participant.star
+8
-0
participant_network.star
src/participant_network/participant_network.star
+15
-0
shared_utils.star
src/shared_utils/shared_utils.star
+6
-0
No files found.
README.md
View file @
66c4e01a
...
...
@@ -4,6 +4,43 @@ ETH2-MERGE-STARTOSIS-MODULE
This is the Startosis version of the popular
[
eth2-merge-kurtosis-module
](
https://github.com/kurtosis-tech/eth2-merge-kurtosis-module/
)
### Missing Tasks
###
Parity
Missing Tasks
-
[
]
Setup Releaser
-
[
]
Module IO (this is blocked on Startosis Args working)
-
[
]
forkmon (this is blocked on CL clients running)
-
[
]
prometheus (this is blocked on CL clients running)
-
[
]
grafana (this is blocked on prometheus running)
-
[
]
testnet_verifier (this is blocked on CL/EL clients running)
-
[
]
transaction_spammer (this is blocked on EL clients running)
-
[
]
participant_network/participant_network
-
[
]
has most data generation things, needs to start EL/CL clients
-
[
x
]
participant_network/participant
-
[
x
]
pure POJO should be quick to implement NO BLOCKERS
-
[
x
]
mev_boost participant_network/mev_boost NO BLOCKERS - removed some attributes that aren't used
-
[
x
]
mev_boost_context pure POJO NO BLOCKERS
-
[
x
]
mev_boost_launcher NO BLOCKERS
-
[
]
participant_network/pre_launch_data_generator (the only missing piece here is remove_service)
-
[
x
]
data generation
-
[
]
remove services post generation
-
[
]
participant_network/el (requires facts and waits)
-
[
]
besu - facts and waits
-
[
]
erigon - facts and waits
-
[
]
geth - facts and waits
-
[
]
nethermind - facts and waits
-
[
x
]
el_client_context pure POJO NO BLOCKERS
-
[
x
]
el_client_launcher interface not necessary
-
[
]
el_availability_waiter - facts and waits
-
[
x
]
el_rest_client/api_response_objects.go DESCOPED as facts will do this
-
[
x
]
el_rest_client/el_rest_client - facts and waits DESCOPED as facts will do this
-
[
]
participant_network/cl (requires facts and waits)
-
[
]
lighthouse - facts and waits
-
[
]
loadstar - facts and waits
-
[
]
nymbus - facts and waits
-
[
]
prysm - facts and waits
-
[
]
teku - facts and waits
-
[
x
]
cl_client_context pure POJO NO BLOCKERS
-
[
x
]
cl_client_launcher interface not necessary
-
[
]
cl_availability_waiter - facts and waits
-
[
x
]
cl_rest_client/api_response_objects.go DESCOPED as facts will do this
-
[
x
]
cl_rest_client/el_rest_client - DESCOPED as facts will do this
-
[
x
]
cl_node_metrics_info - pure POJO NO BLOCKERS
\ No newline at end of file
docs/changelog.md
View file @
66c4e01a
...
...
@@ -4,6 +4,7 @@
-
Changed the .circlei/config.yml to apply to Startosis
-
Added genesis_constants
-
Added a lot of participant_network/pre_launch_data_generator
-
Added a lot of simple objects that just keep data
# 0.0.0
*
Initial commit
main.star
View file @
66c4e01a
...
...
@@ -15,4 +15,5 @@ def new_network_params():
network_id = "3151908",
deposit_contract_address = "0x4242424242424242424242424242424242424242",
seconds_per_slot = 12,
mev_boost_relay_endpoints = []
)
src/participant_network/cl/cl_client_context.star
0 → 100644
View file @
66c4e01a
# differs from eth2 in the sense it dosen't have the rest_client
def new_cl_client_context(client_name, enr, ip_addr, http_port_num, cl_nodes_metrics_info):
return struct(
client_name = client_name,
enr = enr,
ip_addr = ip_addr,
http_port_num = http_port_num,
cl_nodes_metrics_info = cl_nodes_metrics_info,
)
src/participant_network/cl/cl_node_metrics_info.star
0 → 100644
View file @
66c4e01a
# this is a dictionary as this will get serialzed to JSON
def new_cl_node_metrics_info(name, path, url):
return {
"name": name,
"path": path,
"url": url
}
src/participant_network/el/el_client_context.star
0 → 100644
View file @
66c4e01a
def new_el_client_context(client_name, enr, enode, ip_addr, rpc_port_num, ws_port_num, engine_rpc_port_num):
return struct(
client_name = client_name,
enr = enr,
enode = enode,
ip_addr = ip_addr,
rpc_port_num = rpc_port_num,
ws_port_num = ws_port_num,
engine_rpc_port_num = engine_rpc_port_num
)
src/participant_network/mev_boost/mev_boost_context.star
0 → 100644
View file @
66c4e01a
def new_mev_boost_context(private_ip_address, port):
return struct(
private_ip_address = private_ip_address,
port = port,
)
def mev_boost_endpoint(mev_boost_context):
return "http://{0}:{1}".format(mev_boost_context.private_ip_address, mev_boost_context.port)
src/participant_network/mev_boost/mev_boost_launcher.star
0 → 100644
View file @
66c4e01a
load("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star", "new_port_spec")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/mev_boost/mev_boost_context.star", "new_mev_boost_context")
FLASHBOTS_MEV_BOOST_IMAGE = "flashbots/mev-boost"
FLASHBOTS_MEV_BOOST_PORT = 18550
FLASHBOTS_MEV_BOOST_PROTOCOL = "TCP"
USED_PORTS = {
"api": new_port_spec(FLASHBOTS_MEV_BOOST_PORT, FLASHBOTS_MEV_BOOST_PROTOCOL)
}
NETWORK_ID_TO_NAME = {
"5": "goerli",
"11155111": "sepolia",
"3": "ropsten",
}
def launch(mev_boost_launcher, service_id, network_id):
service_config = get_service_config(mev_boost_launcher, network_id)
mev_boost_service = add_service(service_id, service_config)
return new_mev_boost_context(mev_boost_service.ip_address, FLASHBOTS_MEV_BOOST_PORT)
def get_service_config(mev_boost_launcher, network_id):
command = ["/app/mev-boost"]
network_name = NETWORK_ID_TO_NAME.get(network_id, "network-{0}".format(network_id))
command.append("-{0}".format(network_name))
if mev_boost_launcher.should_check_relay:
command.append("-relay-check")
if len(mev_boost_launcher.relay_end_points) != 0:
command.append("-relays")
command.append(",".join(mev_boost_launcher.relay_end_points))
return struct(
container_image_name = FLASHBOTS_MEV_BOOST_IMAGE,
used_ports = USED_PORTS,
cmd_args = command
)
def new_mev_boost_launcher(should_check_relay, relay_end_points):
return struct(should_check_relay=should_check_relay, relay_end_points=relay_end_points)
src/participant_network/participant.star
0 → 100644
View file @
66c4e01a
def new_participant(el_client_type, cl_client_type, el_client_context, cl_client_context, mev_boost_context):
return struct(
el_client_type = el_client_type,
cl_client_type = cl_client_type,
el_client_context = el_client_context,
cl_client_context = cl_client_context,
mev_boost_context = mev_boost_context
)
src/participant_network/participant_network.star
View file @
66c4e01a
...
...
@@ -2,6 +2,13 @@ load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_dat
load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data_generator.star", "generate_el_genesis_data")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/cl_genesis/cl_genesis_data_generator.star", "generate_cl_genesis_data")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/mev_boost/mev_boost_context.star", "mev_boost_endpoint")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/mev_boost/mev_boost_launcher.star", launch_mevboost="launch", "new_mev_boost_launcher")
MEV_BOOST_SERVICE_ID_PREFIX = "mev-boost-"
MEV_BOOST_SHOULD_RELAY = True
def launch_participant_network(num_participants, network_params):
print("Generating cl validator key stores")
...
...
@@ -46,3 +53,11 @@ def launch_participant_network(num_participants, network_params):
)
print(json.indent(json.encode(cl_data)))
print("launching mev boost")
# TODO make this launch only for participants that have the participants[i].builderNetworkParams.relayEndpoints defined
# At the moment this lies here just to test, and the relay end points is an empty list
mev_boost_launcher = new_mev_boost_launcher(MEV_BOOST_SHOULD_RELAY, network_params.mev_boost_relay_endpoints)
mev_boost_service_id = MEV_BOOST_SERVICE_ID_PREFIX.format(1)
mev_boost_context = launch_mevboost(mev_boost_launcher, mev_boost_service_id, network_params.network_id)
print(mev_boost_endpoint(mev_boost_context))
src/shared_utils/shared_utils.star
View file @
66c4e01a
def new_template_and_data(template, template_data_json):
return {"template": template, "template_data_json": template_data_json}
def path_join(*args):
joined_path = "/".join(args)
return joined_path.replace("//", "/")
def path_base(path):
split_path = path.split("/")
return split_path[-1]
def new_port_spec(number, protocol):
return struct(number = number, protocol = protocol)
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