Skip to content

Commit 91794e9

Browse files
authored
fix: mev workflow (#434)
1 parent a40f7dc commit 91794e9

File tree

4 files changed

+25
-17
lines changed

4 files changed

+25
-17
lines changed

examples/capella-mev.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
mev_type: full
22
participants:
33
- el_client_type: geth
4-
el_client_image: ethereum/client-go:latest
5-
el_client_log_level: ''
64
cl_client_type: lighthouse
7-
cl_client_log_level: ''
8-
cl_client_image: sigp/lighthouse
9-
el_extra_params: []
5+
cl_client_image: ethpandaops/lighthouse:unstable-c55608b
106
beacon_extra_params:
117
- "--always-prefer-builder-payload"
128
- "--disable-peer-scoring"
13-
network_params:
14-
capella_fork_epoch: 0
15-
seconds_per_slot: 12
9+
network_config:
10+
deneb_fork_epoch: 1
1611
mev_params:
1712
mev_flood_seconds_per_bundle: 12
1813
mev_flood_extra_args:
1914
- "--txsPerBundle=300"
2015
mev_flood_image: flashbots/mev-flood:0.0.9
21-
mev_relay_image: flashbots/mev-boost-relay:0.27.0
16+
mev_relay_image: flashbots/mev-boost-relay:0.28.0a7
17+
mev_boost_image: flashbots/mev-boost:1.6.4844.dev5
18+
mev_builder_image: flashbots/builder:1.13.2.4844.dev7-4d161de

main.star

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
input_parser = import_module("./src/package_io/input_parser.star")
22
constants = import_module("./src/package_io/constants.star")
33
participant_network = import_module("./src/participant_network.star")
4-
4+
shared_utils = import_module("./src/shared_utils/shared_utils.star")
55
static_files = import_module("./src/static_files/static_files.star")
66
genesis_constants = import_module(
77
"./src/prelaunch_data_generator/genesis_constants/genesis_constants.star"
@@ -239,13 +239,16 @@ def run(plan, args={}):
239239
all_mevboost_contexts = []
240240
if mev_endpoints:
241241
for index, participant in enumerate(all_participants):
242+
index_str = shared_utils.zfill_custom(
243+
index + 1, len(str(len(all_participants)))
244+
)
242245
if args_with_right_defaults.participants[index].validator_count != 0:
243246
mev_boost_launcher = mev_boost.new_mev_boost_launcher(
244247
MEV_BOOST_SHOULD_CHECK_RELAY, mev_endpoints
245248
)
246249
mev_boost_service_name = "{0}-{1}-{2}-{3}".format(
247250
input_parser.MEV_BOOST_SERVICE_NAME_PREFIX,
248-
index,
251+
index_str,
249252
participant.cl_client_type,
250253
participant.el_client_type,
251254
)

src/mev/mev_relay/mev_relay_launcher.star

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def launch_mev_relay(
8383
"DENEB_FORK_VERSION": constants.DENEB_FORK_VERSION,
8484
"GENESIS_VALIDATORS_ROOT": validator_root,
8585
"SEC_PER_SLOT": str(seconds_per_slot),
86+
"LOG_LEVEL": "debug",
87+
"DB_TABLE_PREFIX": "custom",
8688
}
8789

8890
redis_url = "{}:{}".format(redis.hostname, redis.port_number)

src/package_io/input_parser.star

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
constants = import_module("../package_io/constants.star")
2-
1+
constants = import_module("./constants.star")
2+
shared_utils = import_module("../shared_utils/shared_utils.star")
33
genesis_constants = import_module(
44
"../prelaunch_data_generator/genesis_constants/genesis_constants.star"
55
)
@@ -517,9 +517,12 @@ def enrich_disable_peer_scoring(parsed_arguments_dict):
517517
# TODO perhaps clean this up into a map
518518
def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_type):
519519
for index, participant in enumerate(parsed_arguments_dict["participants"]):
520+
index_str = shared_utils.zfill_custom(
521+
index + 1, len(str(len(parsed_arguments_dict["participants"])))
522+
)
520523
mev_url = "http://{0}-{1}-{2}-{3}:{4}".format(
521524
MEV_BOOST_SERVICE_NAME_PREFIX,
522-
index,
525+
index_str,
523526
participant["cl_client_type"],
524527
participant["el_client_type"],
525528
mev_port,
@@ -529,6 +532,7 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
529532
participant["validator_extra_params"].append("--builder-proposals")
530533
participant["beacon_extra_params"].append("--builder={0}".format(mev_url))
531534
if participant["cl_client_type"] == "lodestar":
535+
participant["validator_extra_params"].append("--builder")
532536
participant["beacon_extra_params"].append("--builder")
533537
participant["beacon_extra_params"].append(
534538
"--builder.urls={0}".format(mev_url)
@@ -553,7 +557,9 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
553557
)
554558

555559
num_participants = len(parsed_arguments_dict["participants"])
556-
560+
index_str = shared_utils.zfill_custom(
561+
num_participants + 1, len(str(num_participants + 1))
562+
)
557563
if mev_type == "full":
558564
mev_participant = default_participant()
559565
mev_participant["el_client_type"] = (
@@ -577,8 +583,8 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
577583
"el_extra_params": [
578584
"--builder",
579585
"--builder.remote_relay_endpoint=http://mev-relay-api:9062",
580-
"--builder.beacon_endpoints=http://cl-{0}-lighthouse-geth:4000".format(
581-
num_participants + 1
586+
"--builder.beacon_endpoints=http://cl-{0}-lighthouse-geth-builder:4000".format(
587+
index_str
582588
),
583589
"--builder.bellatrix_fork_version={0}".format(
584590
constants.BELLATRIX_FORK_VERSION

0 commit comments

Comments
 (0)