Skip to content

Commit 55df658

Browse files
authored
fix: rbuilder upstream repo with reth-rbuilder binary (ethereum#828)
Depends on ethpandaops/eth-client-docker-image-builder#208 Depends on flashbots/rbuilder#237 --------- Signed-off-by: Barnabas Busa <[email protected]>
1 parent 35ec958 commit 55df658

File tree

3 files changed

+44
-53
lines changed

3 files changed

+44
-53
lines changed

src/el/reth/reth_launcher.star

Lines changed: 42 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -141,40 +141,42 @@ def get_config(
141141

142142
used_ports = shared_utils.get_port_specs(used_port_assignments)
143143

144-
cmd = [
145-
"{0}".format(
146-
"/usr/local/bin/mev" if launcher.builder_type == "mev-rs" else "reth"
147-
),
148-
"node",
149-
"-{0}".format(log_level),
150-
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
151-
"--chain={0}".format(
152-
launcher.network
153-
if launcher.network in constants.PUBLIC_NETWORKS
154-
else constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json"
155-
),
156-
"--http",
157-
"--http.port={0}".format(RPC_PORT_NUM),
158-
"--http.addr=0.0.0.0",
159-
"--http.corsdomain=*",
160-
# WARNING: The admin info endpoint is enabled so that we can easily get ENR/enode, which means
161-
# that users should NOT store private information in these Kurtosis nodes!
162-
"--http.api=admin,net,eth,web3,debug,txpool,trace{0}".format(
163-
",flashbots" if launcher.builder_type == "flashbots" else ""
164-
),
165-
"--ws",
166-
"--ws.addr=0.0.0.0",
167-
"--ws.port={0}".format(WS_PORT_NUM),
168-
"--ws.api=net,eth",
169-
"--ws.origins=*",
170-
"--nat=extip:" + port_publisher.nat_exit_ip,
171-
"--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM),
172-
"--authrpc.jwtsecret=" + constants.JWT_MOUNT_PATH_ON_CONTAINER,
173-
"--authrpc.addr=0.0.0.0",
174-
"--metrics=0.0.0.0:{0}".format(METRICS_PORT_NUM),
175-
"--discovery.port={0}".format(discovery_port),
176-
"--port={0}".format(discovery_port),
177-
]
144+
cmd = []
145+
146+
if launcher.builder_type == "mev-rs":
147+
cmd.append("build")
148+
149+
cmd.extend(
150+
[
151+
"node",
152+
"-{0}".format(log_level),
153+
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
154+
"--chain={0}".format(
155+
launcher.network
156+
if launcher.network in constants.PUBLIC_NETWORKS
157+
else constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json"
158+
),
159+
"--http",
160+
"--http.port={0}".format(RPC_PORT_NUM),
161+
"--http.addr=0.0.0.0",
162+
"--http.corsdomain=*",
163+
"--http.api=admin,net,eth,web3,debug,txpool,trace{0}".format(
164+
",flashbots" if launcher.builder_type == "flashbots" else ""
165+
),
166+
"--ws",
167+
"--ws.addr=0.0.0.0",
168+
"--ws.port={0}".format(WS_PORT_NUM),
169+
"--ws.api=net,eth",
170+
"--ws.origins=*",
171+
"--nat=extip:" + port_publisher.nat_exit_ip,
172+
"--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM),
173+
"--authrpc.jwtsecret=" + constants.JWT_MOUNT_PATH_ON_CONTAINER,
174+
"--authrpc.addr=0.0.0.0",
175+
"--metrics=0.0.0.0:{0}".format(METRICS_PORT_NUM),
176+
"--discovery.port={0}".format(discovery_port),
177+
"--port={0}".format(discovery_port),
178+
]
179+
)
178180

179181
if launcher.network == constants.NETWORK_NAME.kurtosis:
180182
if len(existing_el_clients) > 0:
@@ -216,29 +218,22 @@ def get_config(
216218
constants.EL_TYPE.reth + "_volume_size"
217219
],
218220
)
219-
cmd_str = " ".join(cmd)
220-
env_vars = {
221-
"RETH_CMD": cmd_str,
222-
}
223-
entrypoint_args = ["sh", "-c"]
224-
env_vars = env_vars | participant.el_extra_env_vars
221+
env_vars = {}
225222
image = participant.el_image
226-
rbuilder_cmd = []
227223
if launcher.builder_type == "mev-rs":
228224
files[
229225
mev_rs_builder.MEV_BUILDER_MOUNT_DIRPATH_ON_SERVICE
230226
] = mev_rs_builder.MEV_BUILDER_FILES_ARTIFACT_NAME
231227
elif launcher.builder_type == "flashbots":
228+
image = constants.DEFAULT_FLASHBOTS_BUILDER_IMAGE
232229
cl_client_name = service_name.split("-")[4]
233-
cmd.append("--engine.legacy")
234-
cmd_str = " ".join(cmd)
230+
cmd.append("--engine.experimental")
231+
cmd.append("--rbuilder.config=" + flashbots_rbuilder.MEV_FILE_PATH_ON_CONTAINER)
235232
files[
236233
flashbots_rbuilder.MEV_BUILDER_MOUNT_DIRPATH_ON_SERVICE
237234
] = flashbots_rbuilder.MEV_BUILDER_FILES_ARTIFACT_NAME
238-
env_vars["RETH_CMD"] = cmd_str
239235
env_vars.update(
240236
{
241-
"RBUILDER_CONFIG": flashbots_rbuilder.MEV_FILE_PATH_ON_CONTAINER,
242237
"CL_ENDPOINT": "http://cl-{0}-{1}-{2}:{3}".format(
243238
participant_index + 1,
244239
cl_client_name,
@@ -247,19 +242,15 @@ def get_config(
247242
),
248243
}
249244
)
250-
image = constants.DEFAULT_FLASHBOTS_BUILDER_IMAGE
251-
cmd_str = "./app/entrypoint.sh"
252-
entrypoint_args = []
253245

254246
config_args = {
255247
"image": image,
256248
"ports": used_ports,
257249
"public_ports": public_ports,
258-
"cmd": [cmd_str],
250+
"cmd": cmd,
259251
"files": files,
260-
"entrypoint": entrypoint_args,
261252
"private_ip_address_placeholder": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER,
262-
"env_vars": env_vars,
253+
"env_vars": env_vars | participant.el_extra_env_vars,
263254
"labels": shared_utils.label_maker(
264255
client=constants.EL_TYPE.reth,
265256
client_type=constants.CLIENT_TYPES.el,

src/package_io/constants.star

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ COMMIT_BOOST_MEV_TYPE = "commit-boost"
8888

8989
DEFAULT_SNOOPER_IMAGE = "ethpandaops/rpc-snooper:latest"
9090
DEFAULT_FLASHBOTS_RELAY_IMAGE = "flashbots/mev-boost-relay:0.29.2a3"
91-
DEFAULT_FLASHBOTS_BUILDER_IMAGE = "ethpandaops/rbuilder:develop"
91+
DEFAULT_FLASHBOTS_BUILDER_IMAGE = "ethpandaops/reth-rbuilder:develop"
9292
DEFAULT_FLASHBOTS_MEV_BOOST_IMAGE = "flashbots/mev-boost"
9393
DEFAULT_MEV_RS_IMAGE = "ethpandaops/mev-rs:main"
9494
DEFAULT_MEV_RS_IMAGE_MINIMAL = "ethpandaops/mev-rs:main-minimal"

src/package_io/input_parser.star

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
13031303

13041304
if mev_type == constants.MEV_RS_MEV_TYPE:
13051305
mev_participant = default_participant()
1306-
mev_participant["el_type"] = constants.EL_TYPE.reth
1306+
mev_participant["el_type"] = "reth-builder"
13071307
mev_participant.update(
13081308
{
13091309
"el_image": parsed_arguments_dict["mev_params"]["mev_builder_image"],

0 commit comments

Comments
 (0)