Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Improve MEV setup to use less containers for non_validator nodes #224

Merged
merged 5 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 15 additions & 14 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,21 @@ def run(plan, args={}):
all_mevboost_contexts = []
if mev_endpoints:
for index, participant in enumerate(all_participants):
mev_boost_launcher = mev_boost_launcher_module.new_mev_boost_launcher(
MEV_BOOST_SHOULD_CHECK_RELAY, mev_endpoints
)
mev_boost_service_name = "{0}{1}".format(
parse_input.MEV_BOOST_SERVICE_NAME_PREFIX, index
)
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,
)
all_mevboost_contexts.append(mev_boost_context)
if args_with_right_defaults.participants[index].validator_count != 0:
mev_boost_launcher = mev_boost_launcher_module.new_mev_boost_launcher(
MEV_BOOST_SHOULD_CHECK_RELAY, mev_endpoints
)
mev_boost_service_name = "{0}{1}".format(
parse_input.MEV_BOOST_SERVICE_NAME_PREFIX, index
)
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,
)
all_mevboost_contexts.append(mev_boost_context)

if not args_with_right_defaults.launch_additional_services:
return
Expand Down
9 changes: 2 additions & 7 deletions src/package_io/parse_input.star
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
num_participants = len(parsed_arguments_dict["participants"])

if mev_type == "full":
mev_url = "http://{0}{1}:{2}".format(mev_prefix, num_participants, mev_port)

mev_participant = {
"el_client_type": "geth",
# TODO replace with actual when flashbots/builder is published
Expand All @@ -206,7 +204,6 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
"cl_client_image": "sigp/lighthouse",
"cl_client_log_level": "",
"beacon_extra_params": [
"--builder={0}".format(mev_url),
"--always-prepare-payload",
"--prepare-payload-lookahead",
"12000",
Expand All @@ -231,11 +228,9 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
"BUILDER_TX_SIGNING_KEY": "0x"
+ genesis_constants.PRE_FUNDED_ACCOUNTS[0].private_key
},
"validator_extra_params": ["--builder-proposals"],
"validator_extra_params": [],
"builder_network_params": None,
"validator_count": package_io_parser.default_network_params()[
"num_validator_keys_per_node"
],
"validator_count": 0,
}

parsed_arguments_dict["participants"].append(mev_participant)
Expand Down