Skip to content

Commit

Permalink
feat: parameterize mev-boost args (#400)
Browse files Browse the repository at this point in the history
Adds 2 new fields to the config file under the mev_params field:
mev_boost_image: <The mev-boost image, default is flashbots/mev-boost>
mev_boost_args: <The args of mev-boost. The default params are
["mev-boost", "--relay-check"]>

The behaviour is such that, `mev-boost-args` overrides all the args of
mev-boost. No extra params are added.

Resolves #289

---------

Co-authored-by: Barnabas Busa <busa.barnabas@gmail.com>
Co-authored-by: franjoespejo <franjoespejo@gmail.com>
Co-authored-by: Gyanendra Mishra <anomaly.the@gmail.com>
Co-authored-by: Sam Calder-Mason <sam.calder-mason@ethereum.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: pk910 <github@pk910.de>
Co-authored-by: Parithosh Jayanthi <parithosh.jayanthi@ethereum.org>
Co-authored-by: franjoespejo <franjosepejo@github.com>
Co-authored-by: Anton <anton@northernforest.nl>
  • Loading branch information
10 people authored Feb 20, 2024
1 parent 9ceae9c commit e48483a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,14 +543,16 @@ mev_type: null
# Parameters if MEV is used
mev_params:
# The image to use for MEV boot relay
# The image to use for MEV boost relay
mev_relay_image: flashbots/mev-boost-relay
# The image to use for the builder
mev_builder_image: ethpandaops/flashbots-builder:main
# The image to use for the CL builder
mev_builder_cl_image: sigp/lighthouse:latest
# The image to use for mev-boost
mev_boost_image: flashbots/mev-boost
# Parameters for MEV Boost. This overrides all arguments of the mev-boost container
mev_boost_args: []
# Extra parameters to send to the API
mev_relay_api_extra_args: []
# Extra parameters to send to the housekeeper
Expand Down
1 change: 1 addition & 0 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def run(plan, args={}):
mev_boost_service_name,
network_params.network_id,
mev_params.mev_boost_image,
mev_params.mev_boost_args,
global_node_selectors,
)
all_mevboost_contexts.append(mev_boost_context)
Expand Down
2 changes: 2 additions & 0 deletions network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ mev_params:
mev_flood_image: flashbots/mev-flood
mev_flood_extra_args: []
mev_flood_seconds_per_bundle: 15
mev_boost_image: flashbots/mev-boost
mev_boost_args: ["mev-boost", "--relay-check"]
grafana_additional_dashboards: []
persistent: false
xatu_sentry_enabled: false
Expand Down
8 changes: 4 additions & 4 deletions src/mev/mev_boost/mev_boost_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ def launch(
service_name,
network_id,
mev_boost_image,
mev_boost_args,
global_node_selectors,
):
config = get_config(
mev_boost_launcher,
network_id,
mev_boost_image,
mev_boost_args,
global_node_selectors,
)

Expand All @@ -49,12 +51,10 @@ def get_config(
mev_boost_launcher,
network_id,
mev_boost_image,
mev_boost_args,
node_selectors,
):
command = ["mev-boost"]

if mev_boost_launcher.should_check_relay:
command.append("-relay-check")
command = mev_boost_args

return ServiceConfig(
image=mev_boost_image,
Expand Down
2 changes: 2 additions & 0 deletions src/package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def input_parser(plan, input_args):
mev_builder_image=result["mev_params"]["mev_builder_image"],
mev_builder_cl_image=result["mev_params"]["mev_builder_cl_image"],
mev_boost_image=result["mev_params"]["mev_boost_image"],
mev_boost_args=result["mev_params"]["mev_boost_args"],
mev_relay_api_extra_args=result["mev_params"]["mev_relay_api_extra_args"],
mev_relay_housekeeper_extra_args=result["mev_params"][
"mev_relay_housekeeper_extra_args"
Expand Down Expand Up @@ -634,6 +635,7 @@ def get_default_mev_params():
"mev_builder_image": "flashbots/builder:latest",
"mev_builder_cl_image": "sigp/lighthouse:latest",
"mev_boost_image": "flashbots/mev-boost",
"mev_boost_args": ["mev-boost", "--relay-check"],
"mev_relay_api_extra_args": [],
"mev_relay_housekeeper_extra_args": [],
"mev_relay_website_extra_args": [],
Expand Down

0 comments on commit e48483a

Please sign in to comment.