Commit 145cd209 authored by Gyanendra Mishra's avatar Gyanendra Mishra

seems like it isnt that useless

parent 8a7391c8
......@@ -18,11 +18,11 @@ This is the Startosis version of the popular [eth2-merge-kurtosis-module](https:
- [ ] transaction_spammer (this is blocked on EL clients running)
- [ ] participant_network/participant_network
- [ ] has most data generation things, needs to start EL/CL clients
- [ ] participant_network/participant
- [ ] pure POJO should be quick to implement NO BLOCKERS
- [ ] mev_boost participant_network/mev_boost NO BLOCKERS
- [ ] mev_boost_context pure POJO NO BLOCKERS
- [ ] mev_boost_launcher NO BLOCKERS
- [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
......@@ -31,7 +31,7 @@ This is the Startosis version of the popular [eth2-merge-kurtosis-module](https:
- [ ] erigon - facts and waits
- [ ] geth - facts and waits
- [ ] nethermind - facts and waits
- [ ] el_client_context pure POJO NO BLOCKERS
- [x] el_client_context pure POJO NO BLOCKERS
- [x] el_client_launcher interface not necessary
- [ ] el_availability_waiter - facts and waits
- [ ] el_rest_client/api_response_objects.go NO BLOCKERS
......@@ -42,9 +42,9 @@ This is the Startosis version of the popular [eth2-merge-kurtosis-module](https:
- [ ] nymbus - facts and waits
- [ ] prysm - facts and waits
- [ ] teku - facts and waits
- [ ] cl_client_context pure POJO NO BLOCKERS
- [x] cl_client_context pure POJO NO BLOCKERS
- [x] cl_client_launcher interface not necessary
- [ ] cl_availability_waiter - facts and waits
- [ ] cl_rest_client/api_response_objects.go NO BLOCKERS
- [ ] cl_rest_client/el_rest_client - facts and waits
- [ ] cl_node_metrics_info - pure POJO NO BLOCKERS
\ No newline at end of file
- [x] cl_node_metrics_info - pure POJO NO BLOCKERS
\ No newline at end of file
def new_cl_client_context(client_name, enr, ip_addr, http_port_num, node_metrics_info, rest_client):
return struct(
client_name = client_name,
enr = enr,
ip_addr = ip_addr,
http_port_num = http_port_num,
node_metrics_info = node_metrics_info,
rest_client = rest_client,
)
\ No newline at end of file
# 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
}
\ No newline at end of file
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
)
\ No newline at end of file
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)
\ No newline at end of file
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_PORT)
}
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 = ["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)
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
)
\ No newline at end of file
......@@ -7,4 +7,7 @@ def path_join(*args):
def path_base(path):
split_path = path.split("/")
return split_path[-1]
\ No newline at end of file
return split_path[-1]
def new_port_spec(number, protocol):
return struct(number = number, protocol = protocol)
\ No newline at end of file
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