Commit 91794e9f authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

fix: mev workflow (#434)

parent a40f7dc8
mev_type: full mev_type: full
participants: participants:
- el_client_type: geth - el_client_type: geth
el_client_image: ethereum/client-go:latest
el_client_log_level: ''
cl_client_type: lighthouse cl_client_type: lighthouse
cl_client_log_level: '' cl_client_image: ethpandaops/lighthouse:unstable-c55608b
cl_client_image: sigp/lighthouse
el_extra_params: []
beacon_extra_params: beacon_extra_params:
- "--always-prefer-builder-payload" - "--always-prefer-builder-payload"
- "--disable-peer-scoring" - "--disable-peer-scoring"
network_params: network_config:
capella_fork_epoch: 0 deneb_fork_epoch: 1
seconds_per_slot: 12
mev_params: mev_params:
mev_flood_seconds_per_bundle: 12 mev_flood_seconds_per_bundle: 12
mev_flood_extra_args: mev_flood_extra_args:
- "--txsPerBundle=300" - "--txsPerBundle=300"
mev_flood_image: flashbots/mev-flood:0.0.9 mev_flood_image: flashbots/mev-flood:0.0.9
mev_relay_image: flashbots/mev-boost-relay:0.27.0 mev_relay_image: flashbots/mev-boost-relay:0.28.0a7
mev_boost_image: flashbots/mev-boost:1.6.4844.dev5
mev_builder_image: flashbots/builder:1.13.2.4844.dev7-4d161de
input_parser = import_module("./src/package_io/input_parser.star") input_parser = import_module("./src/package_io/input_parser.star")
constants = import_module("./src/package_io/constants.star") constants = import_module("./src/package_io/constants.star")
participant_network = import_module("./src/participant_network.star") participant_network = import_module("./src/participant_network.star")
shared_utils = import_module("./src/shared_utils/shared_utils.star")
static_files = import_module("./src/static_files/static_files.star") static_files = import_module("./src/static_files/static_files.star")
genesis_constants = import_module( genesis_constants = import_module(
"./src/prelaunch_data_generator/genesis_constants/genesis_constants.star" "./src/prelaunch_data_generator/genesis_constants/genesis_constants.star"
...@@ -239,13 +239,16 @@ def run(plan, args={}): ...@@ -239,13 +239,16 @@ def run(plan, args={}):
all_mevboost_contexts = [] all_mevboost_contexts = []
if mev_endpoints: if mev_endpoints:
for index, participant in enumerate(all_participants): for index, participant in enumerate(all_participants):
index_str = shared_utils.zfill_custom(
index + 1, len(str(len(all_participants)))
)
if args_with_right_defaults.participants[index].validator_count != 0: if args_with_right_defaults.participants[index].validator_count != 0:
mev_boost_launcher = mev_boost.new_mev_boost_launcher( mev_boost_launcher = mev_boost.new_mev_boost_launcher(
MEV_BOOST_SHOULD_CHECK_RELAY, mev_endpoints MEV_BOOST_SHOULD_CHECK_RELAY, mev_endpoints
) )
mev_boost_service_name = "{0}-{1}-{2}-{3}".format( mev_boost_service_name = "{0}-{1}-{2}-{3}".format(
input_parser.MEV_BOOST_SERVICE_NAME_PREFIX, input_parser.MEV_BOOST_SERVICE_NAME_PREFIX,
index, index_str,
participant.cl_client_type, participant.cl_client_type,
participant.el_client_type, participant.el_client_type,
) )
......
...@@ -83,6 +83,8 @@ def launch_mev_relay( ...@@ -83,6 +83,8 @@ def launch_mev_relay(
"DENEB_FORK_VERSION": constants.DENEB_FORK_VERSION, "DENEB_FORK_VERSION": constants.DENEB_FORK_VERSION,
"GENESIS_VALIDATORS_ROOT": validator_root, "GENESIS_VALIDATORS_ROOT": validator_root,
"SEC_PER_SLOT": str(seconds_per_slot), "SEC_PER_SLOT": str(seconds_per_slot),
"LOG_LEVEL": "debug",
"DB_TABLE_PREFIX": "custom",
} }
redis_url = "{}:{}".format(redis.hostname, redis.port_number) redis_url = "{}:{}".format(redis.hostname, redis.port_number)
......
constants = import_module("../package_io/constants.star") constants = import_module("./constants.star")
shared_utils = import_module("../shared_utils/shared_utils.star")
genesis_constants = import_module( genesis_constants = import_module(
"../prelaunch_data_generator/genesis_constants/genesis_constants.star" "../prelaunch_data_generator/genesis_constants/genesis_constants.star"
) )
...@@ -517,9 +517,12 @@ def enrich_disable_peer_scoring(parsed_arguments_dict): ...@@ -517,9 +517,12 @@ def enrich_disable_peer_scoring(parsed_arguments_dict):
# TODO perhaps clean this up into a map # TODO perhaps clean this up into a map
def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_type): def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_type):
for index, participant in enumerate(parsed_arguments_dict["participants"]): for index, participant in enumerate(parsed_arguments_dict["participants"]):
index_str = shared_utils.zfill_custom(
index + 1, len(str(len(parsed_arguments_dict["participants"])))
)
mev_url = "http://{0}-{1}-{2}-{3}:{4}".format( mev_url = "http://{0}-{1}-{2}-{3}:{4}".format(
MEV_BOOST_SERVICE_NAME_PREFIX, MEV_BOOST_SERVICE_NAME_PREFIX,
index, index_str,
participant["cl_client_type"], participant["cl_client_type"],
participant["el_client_type"], participant["el_client_type"],
mev_port, mev_port,
...@@ -529,6 +532,7 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ ...@@ -529,6 +532,7 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
participant["validator_extra_params"].append("--builder-proposals") participant["validator_extra_params"].append("--builder-proposals")
participant["beacon_extra_params"].append("--builder={0}".format(mev_url)) participant["beacon_extra_params"].append("--builder={0}".format(mev_url))
if participant["cl_client_type"] == "lodestar": if participant["cl_client_type"] == "lodestar":
participant["validator_extra_params"].append("--builder")
participant["beacon_extra_params"].append("--builder") participant["beacon_extra_params"].append("--builder")
participant["beacon_extra_params"].append( participant["beacon_extra_params"].append(
"--builder.urls={0}".format(mev_url) "--builder.urls={0}".format(mev_url)
...@@ -553,7 +557,9 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ ...@@ -553,7 +557,9 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
) )
num_participants = len(parsed_arguments_dict["participants"]) num_participants = len(parsed_arguments_dict["participants"])
index_str = shared_utils.zfill_custom(
num_participants + 1, len(str(num_participants + 1))
)
if mev_type == "full": if mev_type == "full":
mev_participant = default_participant() mev_participant = default_participant()
mev_participant["el_client_type"] = ( mev_participant["el_client_type"] = (
...@@ -577,8 +583,8 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ ...@@ -577,8 +583,8 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
"el_extra_params": [ "el_extra_params": [
"--builder", "--builder",
"--builder.remote_relay_endpoint=http://mev-relay-api:9062", "--builder.remote_relay_endpoint=http://mev-relay-api:9062",
"--builder.beacon_endpoints=http://cl-{0}-lighthouse-geth:4000".format( "--builder.beacon_endpoints=http://cl-{0}-lighthouse-geth-builder:4000".format(
num_participants + 1 index_str
), ),
"--builder.bellatrix_fork_version={0}".format( "--builder.bellatrix_fork_version={0}".format(
constants.BELLATRIX_FORK_VERSION constants.BELLATRIX_FORK_VERSION
......
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