Skip to content

Commit 28adec1

Browse files
authored
feat: parameterize mev_boost and mev_builder images (ethereum#171)
Fixes: ethpandaops/ethereum-package#169
1 parent 6b8d9d3 commit 28adec1

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

main.star

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def run(plan, args):
9292
for index, participant in enumerate(args_with_right_defaults.participants):
9393
mev_boost_launcher = mev_boost_launcher_module.new_mev_boost_launcher(MEV_BOOST_SHOULD_CHECK_RELAY, mev_endpoints)
9494
mev_boost_service_name = "{0}{1}".format(parse_input.MEV_BOOST_SERVICE_NAME_PREFIX, index)
95-
mev_boost_context = mev_boost_launcher_module.launch(plan, mev_boost_launcher, mev_boost_service_name, network_params.network_id)
95+
mev_boost_context = mev_boost_launcher_module.launch(plan, mev_boost_launcher, mev_boost_service_name, network_params.network_id, mev_params.mev_boost_image)
9696
all_mevboost_contexts.append(mev_boost_context)
9797

9898
if not args_with_right_defaults.launch_additional_services:

src/mev_boost/mev_boost_launcher.star

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u
22
mev_boost_context_module = import_module("github.com/kurtosis-tech/eth2-package/src/mev_boost/mev_boost_context.star")
33
parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star")
44

5-
FLASHBOTS_MEV_BOOST_IMAGE = "flashbots/mev-boost"
65
FLASHBOTS_MEV_BOOST_PROTOCOL = "TCP"
76

87
USED_PORTS = {
@@ -15,22 +14,22 @@ NETWORK_ID_TO_NAME = {
1514
"3": "ropsten",
1615
}
1716

18-
def launch(plan, mev_boost_launcher, service_name, network_id):
19-
config = get_config(mev_boost_launcher, network_id)
17+
def launch(plan, mev_boost_launcher, service_name, network_id, mev_boost_image):
18+
config = get_config(mev_boost_launcher, network_id, mev_boost_image)
2019

2120
mev_boost_service = plan.add_service(service_name, config)
2221

2322
return mev_boost_context_module.new_mev_boost_context(mev_boost_service.ip_address, parse_input.FLASHBOTS_MEV_BOOST_PORT)
2423

2524

26-
def get_config(mev_boost_launcher, network_id):
25+
def get_config(mev_boost_launcher, network_id, mev_boost_image):
2726
command = ["mev-boost"]
2827

2928
if mev_boost_launcher.should_check_relay:
3029
command.append("-relay-check")
3130

3231
return ServiceConfig(
33-
image = FLASHBOTS_MEV_BOOST_IMAGE,
32+
image = mev_boost_image,
3433
ports = USED_PORTS,
3534
cmd = command,
3635
env_vars = {

src/package_io/parse_input.star

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ def parse_input(plan, input_args):
145145
),
146146
mev_params = struct(
147147
mev_relay_image = result["mev_params"]["mev_relay_image"],
148+
mev_builder_image = result["mev_params"]["mev_builder_image"],
149+
mev_boost_image = result["mev_params"]["mev_boost_image"],
148150
mev_relay_api_extra_args = result["mev_params"]["mev_relay_api_extra_args"],
149151
mev_relay_housekeeper_extra_args = result["mev_params"]["mev_relay_housekeeper_extra_args"],
150152
mev_relay_website_extra_args = result["mev_params"]["mev_relay_website_extra_args"],
@@ -219,6 +221,9 @@ def default_participant():
219221
def get_default_mev_params():
220222
return {
221223
"mev_relay_image": "flashbots/mev-boost-relay",
224+
# TODO replace with flashbots/builder when they publish an arm64 image as mentioned in flashbots/builder#105
225+
"mev_builder_image": "ethpandaops/flashbots-builder:main",
226+
"mev_boost_image": "flashbots/mev-boost",
222227
"mev_relay_api_extra_args": [],
223228
"mev_relay_housekeeper_extra_args": [],
224229
"mev_relay_website_extra_args": [],
@@ -260,7 +265,7 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
260265
mev_participant = {
261266
"el_client_type": "geth",
262267
# TODO replace with actual when flashbots/builder is published
263-
"el_client_image": "ethpandaops/flashbots-builder:main",
268+
"el_client_image": parsed_arguments_dict["mev_params"]["mev_builder_image"],
264269
"el_client_log_level": "",
265270
"cl_client_type": "lighthouse",
266271
# THIS overrides the beacon image

0 commit comments

Comments
 (0)