Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7931670
need to generate jwt
h4ck3rk3y Jun 23, 2023
5a51d90
lets see how this goes
h4ck3rk3y Jun 23, 2023
9ed1c34
better
h4ck3rk3y Jun 23, 2023
5324fc2
added mock mev builder
h4ck3rk3y Jun 23, 2023
8f63b46
this looks alright
h4ck3rk3y Jun 23, 2023
f9cac30
cleaner
h4ck3rk3y Jun 23, 2023
1635bb5
added new line
h4ck3rk3y Jun 23, 2023
b61c628
lets go
h4ck3rk3y Jun 23, 2023
636fe24
interpretation happens
h4ck3rk3y Jun 23, 2023
88e082f
better
h4ck3rk3y Jun 23, 2023
344b544
this feels like its getting somewhere
h4ck3rk3y Jun 23, 2023
8b373f1
some progress
h4ck3rk3y Jun 23, 2023
3214a50
mock mev doesnt populate endpoints
h4ck3rk3y Jun 23, 2023
fd11a0e
better
h4ck3rk3y Jun 23, 2023
42ccf88
lets go
h4ck3rk3y Jun 23, 2023
cdc51c3
set wait to nil
h4ck3rk3y Jun 23, 2023
a05534d
this seems alright
h4ck3rk3y Jun 23, 2023
7e94945
lets go
h4ck3rk3y Jun 23, 2023
7b107f4
lets go
h4ck3rk3y Jun 23, 2023
d8ccf5b
lets go
h4ck3rk3y Jun 23, 2023
2031097
does this not work
h4ck3rk3y Jun 23, 2023
4c65a03
lets go
h4ck3rk3y Jun 23, 2023
c88a32c
fix arg parsing everything else seems to be alright
h4ck3rk3y Jun 23, 2023
b578b21
lets try this out
h4ck3rk3y Jun 26, 2023
cf8e257
interprets but doesnt run
h4ck3rk3y Jun 26, 2023
3708470
lets go
h4ck3rk3y Jun 26, 2023
225c55b
fixed constants
h4ck3rk3y Jun 26, 2023
19f6be5
this should work
h4ck3rk3y Jun 26, 2023
e119249
ports look proper
h4ck3rk3y Jun 26, 2023
ecae45f
updated READMe
h4ck3rk3y Jun 26, 2023
99d74cf
updated mev boost launcher comments
h4ck3rk3y Jun 26, 2023
e3570e3
nicer
h4ck3rk3y Jun 26, 2023
5dd2c3b
Merge branch 'main' into gyani/mock-mev
h4ck3rk3y Jun 27, 2023
d6dafaf
added TODOs
h4ck3rk3y Jun 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ prometheus = import_module("github.com/kurtosis-tech/eth2-package/src/prometheus
grafana =import_module("github.com/kurtosis-tech/eth2-package/src/grafana/grafana_launcher.star")
testnet_verifier = import_module("github.com/kurtosis-tech/eth2-package/src/testnet_verifier/testnet_verifier.star")
mev_boost_launcher_module = import_module("github.com/kurtosis-tech/eth2-package/src/mev_boost/mev_boost_launcher.star")
mock_mev_launcher_module = import_module("github.com/kurtosis-tech/eth2-package/src/mock_mev/mock_mev_launcher.star")

GRAFANA_USER = "admin"
GRAFANA_PASSWORD = "admin"
Expand All @@ -20,6 +21,7 @@ HTTP_PORT_ID_FOR_FACT = "http"

MEV_BOOST_SERVICE_NAME_PREFIX = "mev-boost-"
MEV_BOOST_SHOULD_CHECK_RELAY = True
MOCK_MEV_TYPE = "mock"

def run(plan, args):
args_with_right_defaults = parse_input.parse_input(args)
Expand All @@ -46,6 +48,11 @@ def run(plan, args):
all_mevboost_contexts = []
for index, participant in enumerate(args_with_right_defaults.participants):
mev_boost_context = None
if args_with_right_defaults.mev_type and args_with_right_defaults.mev_type == MOCK_MEV_TYPE:
el_uri = "{0}:{1}".format(all_el_client_contexts[0].ip_addr, all_el_client_contexts[0].engine_rpc_port_num)
beacon_uri = "{0}:{1}".format(all_cl_client_contexts[0].ip_addr, all_cl_client_contexts[0].http_port_num)
jwt_secret = all_el_client_contexts[0].jwt_secret
mock_mev_launcher_module.launch_mock_mev(plan, el_uri, beacon_uri, jwt_secret)
if hasattr(participant, "builder_network_params") and participant.builder_network_params != None:
mev_boost_launcher = mev_boost_launcher_module.new_mev_boost_launcher(MEV_BOOST_SHOULD_CHECK_RELAY, participant.builder_network_params.relay_endpoints)
mev_boost_service_name = "{0}{1}".format(MEV_BOOST_SERVICE_NAME_PREFIX, index)
Expand Down Expand Up @@ -108,6 +115,4 @@ def run(plan, args):
password = GRAFANA_PASSWORD
)
output = struct(grafana_info = grafana_info)
return output


return output
18 changes: 18 additions & 0 deletions src/mock_mev/mock_mev_launcher.star
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
MOCK_MEV_IMAGE = "ethpandaops/mock-builder:latest"
MOCK_MEV_SERVICE_NAME = "mock-mev"

def launch_mock_mev(plan, el_uri, beacon_uri, jwt_secret):
plan.add_service(
name = MOCK_MEV_SERVICE_NAME,
config = ServiceConfig(
image = MOCK_MEV_IMAGE,
ports = {
"rest": PortSpec(number = 18550, transport_protocol="TCP"),
},
cmd = [
"--jwt-secret={0}".format(jwt_secret),
"--el={0}".format(el_uri),
"--cl={0}".format(beacon_uri)
]
)
)
4 changes: 3 additions & 1 deletion src/package_io/parse_input.star
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ def parse_input(input_args):
wait_for_finalization=result["wait_for_finalization"],
wait_for_verifications=result["wait_for_verifications"],
verifications_epoch_limit=result["verifications_epoch_limit"],
global_client_log_level=result["global_client_log_level"]
global_client_log_level=result["global_client_log_level"],
mev_type=result["mev_type"],
)

def get_client_log_level_or_default(participant_log_level, global_log_level, client_log_levels):
Expand All @@ -139,6 +140,7 @@ def default_input_args():
network_params = default_network_params()
participants = [default_participant()]
return {
"mev_type": None,
"participants": participants,
"network_params": network_params,
"launch_additional_services" : True,
Expand Down