Commit de95c61c authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

feat: add rbuilder remove old geth builder - flashbots (#786)

Signed-off-by: default avatarBarnabas Busa <barnabas.busa@ethereum.org>
parent cab694a5
participants:
- el_type: reth
cl_type: teku
additional_services:
- dora
- tx_spammer
mev_type: flashbots
mev_params:
mev_relay_image: jtraglia/mev-boost-relay:electra
mev_boost_image: jtraglia/mev-boost:electra
mev_builder_image: ethpandaops/rbuilder:develop-1b578f5
mev_builder_cl_image: ethpandaops/lighthouse:pawan-electra-alpha7-0dd215c
network_params:
electra_fork_epoch: 1
...@@ -6,11 +6,9 @@ additional_services: ...@@ -6,11 +6,9 @@ additional_services:
- tx_spammer - tx_spammer
- blob_spammer - blob_spammer
- custom_flood - custom_flood
- el_forkmon - goomy_blob
- beacon_metrics_gazer - beacon_metrics_gazer
- dora - dora
- prometheus_grafana - prometheus_grafana
mev_params:
mev_relay_image: flashbots/mev-boost-relay:latest
network_params: network_params:
seconds_per_slot: 3 seconds_per_slot: 6
...@@ -41,6 +41,10 @@ mev_rs_mev_relay = import_module("./src/mev/mev-rs/mev_relay/mev_relay_launcher. ...@@ -41,6 +41,10 @@ mev_rs_mev_relay = import_module("./src/mev/mev-rs/mev_relay/mev_relay_launcher.
mev_rs_mev_builder = import_module( mev_rs_mev_builder = import_module(
"./src/mev/mev-rs/mev_builder/mev_builder_launcher.star" "./src/mev/mev-rs/mev_builder/mev_builder_launcher.star"
) )
flashbots_mev_rbuilder = import_module(
"./src/mev/flashbots/mev_builder/mev_builder_launcher.star"
)
flashbots_mev_boost = import_module( flashbots_mev_boost = import_module(
"./src/mev/flashbots/mev_boost/mev_boost_launcher.star" "./src/mev/flashbots/mev_boost/mev_boost_launcher.star"
) )
...@@ -119,7 +123,7 @@ def run(plan, args={}): ...@@ -119,7 +123,7 @@ def run(plan, args={}):
if args_with_right_defaults.mev_type == constants.MEV_RS_MEV_TYPE: if args_with_right_defaults.mev_type == constants.MEV_RS_MEV_TYPE:
plan.print("Generating mev-rs builder config file") plan.print("Generating mev-rs builder config file")
mev_rs__builder_config_file = mev_rs_mev_builder.new_builder_config( mev_rs_builder_config_file = mev_rs_mev_builder.new_builder_config(
plan, plan,
constants.MEV_RS_MEV_TYPE, constants.MEV_RS_MEV_TYPE,
network_params.network, network_params.network,
...@@ -128,6 +132,18 @@ def run(plan, args={}): ...@@ -128,6 +132,18 @@ def run(plan, args={}):
args_with_right_defaults.mev_params.mev_builder_extra_data, args_with_right_defaults.mev_params.mev_builder_extra_data,
global_node_selectors, global_node_selectors,
) )
elif args_with_right_defaults.mev_type == constants.FLASHBOTS_MEV_TYPE:
plan.print("Generating flashbots builder config file")
flashbots_builder_config_file = flashbots_mev_rbuilder.new_builder_config(
plan,
constants.FLASHBOTS_MEV_TYPE,
network_params,
constants.VALIDATING_REWARDS_ACCOUNT,
network_params.preregistered_validator_keys_mnemonic,
args_with_right_defaults.mev_params.mev_builder_extra_data,
enumerate(args_with_right_defaults.participants),
global_node_selectors,
)
plan.print( plan.print(
"Launching participant network with {0} participants and the following network params {1}".format( "Launching participant network with {0} participants and the following network params {1}".format(
...@@ -156,6 +172,7 @@ def run(plan, args={}): ...@@ -156,6 +172,7 @@ def run(plan, args={}):
args_with_right_defaults.checkpoint_sync_enabled, args_with_right_defaults.checkpoint_sync_enabled,
args_with_right_defaults.checkpoint_sync_url, args_with_right_defaults.checkpoint_sync_url,
args_with_right_defaults.port_publisher, args_with_right_defaults.port_publisher,
args_with_right_defaults.mev_type,
) )
plan.print( plan.print(
...@@ -248,7 +265,7 @@ def run(plan, args={}): ...@@ -248,7 +265,7 @@ def run(plan, args={}):
or args_with_right_defaults.mev_type == constants.MEV_RS_MEV_TYPE or args_with_right_defaults.mev_type == constants.MEV_RS_MEV_TYPE
or args_with_right_defaults.mev_type == constants.COMMIT_BOOST_MEV_TYPE or args_with_right_defaults.mev_type == constants.COMMIT_BOOST_MEV_TYPE
): ):
builder_uri = "http://{0}:{1}".format( blocksim_uri = "http://{0}:{1}".format(
all_el_contexts[-1].ip_addr, all_el_contexts[-1].rpc_port_num all_el_contexts[-1].ip_addr, all_el_contexts[-1].rpc_port_num
) )
beacon_uri = all_cl_contexts[-1].beacon_http_url beacon_uri = all_cl_contexts[-1].beacon_http_url
...@@ -290,7 +307,7 @@ def run(plan, args={}): ...@@ -290,7 +307,7 @@ def run(plan, args={}):
network_id, network_id,
beacon_uris, beacon_uris,
genesis_validators_root, genesis_validators_root,
builder_uri, blocksim_uri,
network_params.seconds_per_slot, network_params.seconds_per_slot,
persistent, persistent,
global_node_selectors, global_node_selectors,
...@@ -349,7 +366,7 @@ def run(plan, args={}): ...@@ -349,7 +366,7 @@ def run(plan, args={}):
plan, plan,
mev_boost_launcher, mev_boost_launcher,
mev_boost_service_name, mev_boost_service_name,
network_id, final_genesis_timestamp,
mev_params.mev_boost_image, mev_params.mev_boost_image,
mev_params.mev_boost_args, mev_params.mev_boost_args,
global_node_selectors, global_node_selectors,
......
...@@ -24,6 +24,7 @@ def launch( ...@@ -24,6 +24,7 @@ def launch(
network_id, network_id,
num_participants, num_participants,
port_publisher, port_publisher,
mev_builder_type,
): ):
el_launchers = { el_launchers = {
constants.EL_TYPE.geth: { constants.EL_TYPE.geth: {
...@@ -75,7 +76,7 @@ def launch( ...@@ -75,7 +76,7 @@ def launch(
el_cl_data, el_cl_data,
jwt_file, jwt_file,
network_params.network, network_params.network,
builder=True, builder_type=mev_builder_type,
), ),
"launch_method": reth.launch, "launch_method": reth.launch,
}, },
......
...@@ -6,20 +6,23 @@ el_shared = import_module("../el_shared.star") ...@@ -6,20 +6,23 @@ el_shared = import_module("../el_shared.star")
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
constants = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
mev_rs_builder = import_module("../../mev/mev-rs/mev_builder/mev_builder_launcher.star") mev_rs_builder = import_module("../../mev/mev-rs/mev_builder/mev_builder_launcher.star")
lighthouse = import_module("../../cl/lighthouse/lighthouse_launcher.star")
flashbots_rbuilder = import_module(
"../../mev/flashbots/mev_builder/mev_builder_launcher.star"
)
RPC_PORT_NUM = 8545 RPC_PORT_NUM = 8545
WS_PORT_NUM = 8546 WS_PORT_NUM = 8546
DISCOVERY_PORT_NUM = 30303 DISCOVERY_PORT_NUM = 30303
ENGINE_RPC_PORT_NUM = 8551 ENGINE_RPC_PORT_NUM = 8551
METRICS_PORT_NUM = 9001 METRICS_PORT_NUM = 9001
RBUILDER_PORT_NUM = 8645
# Paths # Paths
METRICS_PATH = "/metrics" METRICS_PATH = "/metrics"
# The dirpath of the execution data directory on the client container # The dirpath of the execution data directory on the client container
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/reth/execution-data" EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/reth/execution-data"
ENTRYPOINT_ARGS = ["sh", "-c"]
VERBOSITY_LEVELS = { VERBOSITY_LEVELS = {
constants.GLOBAL_LOG_LEVEL.error: "v", constants.GLOBAL_LOG_LEVEL.error: "v",
...@@ -132,10 +135,16 @@ def get_config( ...@@ -132,10 +135,16 @@ def get_config(
constants.WS_PORT_ID: WS_PORT_NUM, constants.WS_PORT_ID: WS_PORT_NUM,
constants.METRICS_PORT_ID: METRICS_PORT_NUM, constants.METRICS_PORT_ID: METRICS_PORT_NUM,
} }
if launcher.builder_type == "flashbots":
used_port_assignments[constants.RBUILDER_PORT_ID] = RBUILDER_PORT_NUM
used_ports = shared_utils.get_port_specs(used_port_assignments) used_ports = shared_utils.get_port_specs(used_port_assignments)
cmd = [ cmd = [
"/usr/local/bin/mev build" if launcher.builder else "reth", "{0}".format(
"/usr/local/bin/mev" if launcher.builder_type == "mev-rs" else "reth"
),
"node", "node",
"-{0}".format(log_level), "-{0}".format(log_level),
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
...@@ -150,7 +159,9 @@ def get_config( ...@@ -150,7 +159,9 @@ def get_config(
"--http.corsdomain=*", "--http.corsdomain=*",
# WARNING: The admin info endpoint is enabled so that we can easily get ENR/enode, which means # WARNING: The admin info endpoint is enabled so that we can easily get ENR/enode, which means
# that users should NOT store private information in these Kurtosis nodes! # that users should NOT store private information in these Kurtosis nodes!
"--http.api=admin,net,eth,web3,debug,trace", "--http.api=admin,net,eth,web3,debug,trace{0}".format(
",flashbots" if launcher.builder_type == "flashbots" else ""
),
"--ws", "--ws",
"--ws.addr=0.0.0.0", "--ws.addr=0.0.0.0",
"--ws.port={0}".format(WS_PORT_NUM), "--ws.port={0}".format(WS_PORT_NUM),
...@@ -191,8 +202,6 @@ def get_config( ...@@ -191,8 +202,6 @@ def get_config(
# this is a repeated<proto type>, we convert it into Starlark # this is a repeated<proto type>, we convert it into Starlark
cmd.extend([param for param in participant.el_extra_params]) cmd.extend([param for param in participant.el_extra_params])
cmd_str = " ".join(cmd)
files = { files = {
constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: launcher.el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: launcher.el_cl_genesis_data.files_artifact_uuid,
constants.JWT_MOUNTPOINT_ON_CLIENTS: launcher.jwt_file, constants.JWT_MOUNTPOINT_ON_CLIENTS: launcher.jwt_file,
...@@ -207,20 +216,48 @@ def get_config( ...@@ -207,20 +216,48 @@ def get_config(
constants.EL_TYPE.reth + "_volume_size" constants.EL_TYPE.reth + "_volume_size"
], ],
) )
cmd_str = " ".join(cmd)
if launcher.builder: env_vars = {
"RETH_CMD": cmd_str,
}
entrypoint_args = ["sh", "-c"]
env_vars = env_vars | participant.el_extra_env_vars
image = participant.el_image
rbuilder_cmd = []
if launcher.builder_type == "mev-rs":
files[ files[
mev_rs_builder.MEV_BUILDER_MOUNT_DIRPATH_ON_SERVICE mev_rs_builder.MEV_BUILDER_MOUNT_DIRPATH_ON_SERVICE
] = mev_rs_builder.MEV_BUILDER_FILES_ARTIFACT_NAME ] = mev_rs_builder.MEV_BUILDER_FILES_ARTIFACT_NAME
elif launcher.builder_type == "flashbots":
cl_client_name = service_name.split("-")[4]
cmd.append("--engine.legacy")
cmd_str = " ".join(cmd)
files[
flashbots_rbuilder.MEV_BUILDER_MOUNT_DIRPATH_ON_SERVICE
] = flashbots_rbuilder.MEV_BUILDER_FILES_ARTIFACT_NAME
env_vars["RETH_CMD"] = cmd_str
env_vars.update(
{
"RBUILDER_CONFIG": flashbots_rbuilder.MEV_FILE_PATH_ON_CONTAINER,
"CL_ENDPOINT": "http://cl-{0}-{1}-{2}:{3}".format(
participant_index + 1,
cl_client_name,
constants.EL_TYPE.reth_builder,
lighthouse.BEACON_HTTP_PORT_NUM,
),
}
)
image = constants.DEFAULT_FLASHBOTS_BUILDER_IMAGE
cmd_str = "./app/entrypoint.sh"
entrypoint_args = []
env_vars = participant.el_extra_env_vars
config_args = { config_args = {
"image": participant.el_image, "image": image,
"ports": used_ports, "ports": used_ports,
"public_ports": public_ports, "public_ports": public_ports,
"cmd": [cmd_str], "cmd": [cmd_str],
"files": files, "files": files,
"entrypoint": ENTRYPOINT_ARGS, "entrypoint": entrypoint_args,
"private_ip_address_placeholder": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, "private_ip_address_placeholder": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER,
"env_vars": env_vars, "env_vars": env_vars,
"labels": shared_utils.label_maker( "labels": shared_utils.label_maker(
...@@ -246,10 +283,10 @@ def get_config( ...@@ -246,10 +283,10 @@ def get_config(
return ServiceConfig(**config_args) return ServiceConfig(**config_args)
def new_reth_launcher(el_cl_genesis_data, jwt_file, network, builder=False): def new_reth_launcher(el_cl_genesis_data, jwt_file, network, builder_type=False):
return struct( return struct(
el_cl_genesis_data=el_cl_genesis_data, el_cl_genesis_data=el_cl_genesis_data,
jwt_file=jwt_file, jwt_file=jwt_file,
network=network, network=network,
builder=builder, builder_type=builder_type,
) )
shared_utils = import_module("../../../shared_utils/shared_utils.star") shared_utils = import_module("../../../shared_utils/shared_utils.star")
mev_boost_context_module = import_module("../mev_boost/mev_boost_context.star") mev_boost_context_module = import_module("../mev_boost/mev_boost_context.star")
input_parser = import_module("../../../package_io/input_parser.star") input_parser = import_module("../../../package_io/input_parser.star")
constants = import_module("../../../package_io/constants.star")
FLASHBOTS_MEV_BOOST_PROTOCOL = "TCP" FLASHBOTS_MEV_BOOST_PROTOCOL = "TCP"
...@@ -27,14 +28,14 @@ def launch( ...@@ -27,14 +28,14 @@ def launch(
plan, plan,
mev_boost_launcher, mev_boost_launcher,
service_name, service_name,
network_id, genesis_timestamp,
mev_boost_image, mev_boost_image,
mev_boost_args, mev_boost_args,
global_node_selectors, global_node_selectors,
): ):
config = get_config( config = get_config(
mev_boost_launcher, mev_boost_launcher,
network_id, genesis_timestamp,
mev_boost_image, mev_boost_image,
mev_boost_args, mev_boost_args,
global_node_selectors, global_node_selectors,
...@@ -49,7 +50,7 @@ def launch( ...@@ -49,7 +50,7 @@ def launch(
def get_config( def get_config(
mev_boost_launcher, mev_boost_launcher,
network_id, genesis_timestamp,
mev_boost_image, mev_boost_image,
mev_boost_args, mev_boost_args,
node_selectors, node_selectors,
...@@ -61,13 +62,9 @@ def get_config( ...@@ -61,13 +62,9 @@ def get_config(
ports=USED_PORTS, ports=USED_PORTS,
cmd=command, cmd=command,
env_vars={ env_vars={
# TODO(maybe) remove the hardcoding "GENESIS_FORK_VERSION": constants.GENESIS_FORK_VERSION,
# This is set to match this file https://github.com/ethpandaops/ethereum-package/blob/main/static_files/genesis-generation-config/cl/config.yaml.tmpl#L11 "GENESIS_TIMESTAMP": "{0}".format(genesis_timestamp),
# latest-notes
# does this need genesis time to be set as well
"GENESIS_FORK_VERSION": "0x10000038",
"BOOST_LISTEN_ADDR": "0.0.0.0:{0}".format(input_parser.MEV_BOOST_PORT), "BOOST_LISTEN_ADDR": "0.0.0.0:{0}".format(input_parser.MEV_BOOST_PORT),
# maybe this is breaking; this isn't verifyign the bid and not sending it to the validator
"SKIP_RELAY_SIGNATURE_CHECK": "1", "SKIP_RELAY_SIGNATURE_CHECK": "1",
"RELAYS": mev_boost_launcher.relay_end_points[0], "RELAYS": mev_boost_launcher.relay_end_points[0],
}, },
......
shared_utils = import_module("../../../shared_utils/shared_utils.star")
input_parser = import_module("../../../package_io/input_parser.star")
static_files = import_module("../../../static_files/static_files.star")
constants = import_module("../../../package_io/constants.star")
flashbots_relay = import_module("../mev_relay/mev_relay_launcher.star")
lighthouse = import_module("../../../cl/lighthouse/lighthouse_launcher.star")
# MEV Builder flags
MEV_BUILDER_CONFIG_FILENAME = "config.toml"
MEV_BUILDER_MOUNT_DIRPATH_ON_SERVICE = "/config/"
MEV_BUILDER_FILES_ARTIFACT_NAME = "mev-rbuilder-config"
MEV_FILE_PATH_ON_CONTAINER = (
MEV_BUILDER_MOUNT_DIRPATH_ON_SERVICE + MEV_BUILDER_CONFIG_FILENAME
)
def new_builder_config(
plan,
service_name,
network_params,
fee_recipient,
mnemonic,
extra_data,
participants,
global_node_selectors,
):
num_of_participants = shared_utils.zfill_custom(
len(participants), len(str(len(participants)))
)
builder_template_data = new_builder_config_template_data(
network_params,
constants.DEFAULT_MEV_PUBKEY,
constants.DEFAULT_MEV_SECRET_KEY[2:], # drop the 0x prefix
mnemonic,
fee_recipient,
extra_data,
num_of_participants,
)
flashbots_builder_config_template = read_file(
static_files.FLASHBOTS_RBUILDER_CONFIG_FILEPATH
)
template_and_data = shared_utils.new_template_and_data(
flashbots_builder_config_template, builder_template_data
)
template_and_data_by_rel_dest_filepath = {}
template_and_data_by_rel_dest_filepath[
MEV_BUILDER_CONFIG_FILENAME
] = template_and_data
config_files_artifact_name = plan.render_templates(
template_and_data_by_rel_dest_filepath, MEV_BUILDER_FILES_ARTIFACT_NAME
)
config_file_path = shared_utils.path_join(
MEV_BUILDER_MOUNT_DIRPATH_ON_SERVICE, MEV_BUILDER_CONFIG_FILENAME
)
return config_files_artifact_name
def new_builder_config_template_data(
network_params,
pubkey,
secret,
mnemonic,
fee_recipient,
extra_data,
num_of_participants,
):
return {
"Network": network_params.network
if network_params.network in constants.PUBLIC_NETWORKS
else "/network-configs/genesis.json",
"DataDir": "/data/reth/execution-data",
"CLEndpoint": "http://cl-{0}-{1}-{2}:{3}".format(
num_of_participants,
constants.CL_TYPE.lighthouse,
constants.EL_TYPE.reth_builder,
lighthouse.BEACON_HTTP_PORT_NUM,
),
"GenesisForkVersion": constants.GENESIS_FORK_VERSION,
"Relay": "mev-relay-api",
"RelayPort": flashbots_relay.MEV_RELAY_ENDPOINT_PORT,
"PublicKey": pubkey,
"SecretKey": secret,
"Mnemonic": mnemonic,
"FeeRecipient": fee_recipient,
"ExtraData": extra_data,
}
...@@ -42,7 +42,7 @@ def launch_mev_relay( ...@@ -42,7 +42,7 @@ def launch_mev_relay(
network_id, network_id,
beacon_uris, beacon_uris,
validator_root, validator_root,
builder_uri, blocksim_uri,
seconds_per_slot, seconds_per_slot,
persistent, persistent,
global_node_selectors, global_node_selectors,
...@@ -82,6 +82,7 @@ def launch_mev_relay( ...@@ -82,6 +82,7 @@ def launch_mev_relay(
"BELLATRIX_FORK_VERSION": constants.BELLATRIX_FORK_VERSION, "BELLATRIX_FORK_VERSION": constants.BELLATRIX_FORK_VERSION,
"CAPELLA_FORK_VERSION": constants.CAPELLA_FORK_VERSION, "CAPELLA_FORK_VERSION": constants.CAPELLA_FORK_VERSION,
"DENEB_FORK_VERSION": constants.DENEB_FORK_VERSION, "DENEB_FORK_VERSION": constants.DENEB_FORK_VERSION,
"ELECTRA_FORK_VERSION": constants.ELECTRA_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", "LOG_LEVEL": "debug",
...@@ -134,7 +135,7 @@ def launch_mev_relay( ...@@ -134,7 +135,7 @@ def launch_mev_relay(
"--beacon-uris", "--beacon-uris",
beacon_uris, beacon_uris,
"--blocksim", "--blocksim",
builder_uri, blocksim_uri,
] ]
+ mev_params.mev_relay_api_extra_args, + mev_params.mev_relay_api_extra_args,
ports={ ports={
......
...@@ -55,6 +55,7 @@ METRICS_PORT_ID = "metrics" ...@@ -55,6 +55,7 @@ METRICS_PORT_ID = "metrics"
ENGINE_RPC_PORT_ID = "engine-rpc" ENGINE_RPC_PORT_ID = "engine-rpc"
ENGINE_WS_PORT_ID = "engine-ws" ENGINE_WS_PORT_ID = "engine-ws"
ADMIN_PORT_ID = "admin" ADMIN_PORT_ID = "admin"
RBUILDER_PORT_ID = "rbuilder-rpc"
LITTLE_BIGTABLE_PORT_ID = "littlebigtable" LITTLE_BIGTABLE_PORT_ID = "littlebigtable"
VALDIATOR_GRPC_PORT_ID = "grpc" VALDIATOR_GRPC_PORT_ID = "grpc"
...@@ -85,8 +86,8 @@ MEV_RS_MEV_TYPE = "mev-rs" ...@@ -85,8 +86,8 @@ MEV_RS_MEV_TYPE = "mev-rs"
COMMIT_BOOST_MEV_TYPE = "commit-boost" COMMIT_BOOST_MEV_TYPE = "commit-boost"
DEFAULT_SNOOPER_IMAGE = "ethpandaops/rpc-snooper:latest" DEFAULT_SNOOPER_IMAGE = "ethpandaops/rpc-snooper:latest"
DEFAULT_FLASHBOTS_RELAY_IMAGE = "flashbots/mev-boost-relay:0.27" DEFAULT_FLASHBOTS_RELAY_IMAGE = "flashbots/mev-boost-relay:0.29.2a3"
DEFAULT_FLASHBOTS_BUILDER_IMAGE = "flashbots/builder:latest" DEFAULT_FLASHBOTS_BUILDER_IMAGE = "ethpandaops/rbuilder:develop"
DEFAULT_FLASHBOTS_MEV_BOOST_IMAGE = "flashbots/mev-boost" DEFAULT_FLASHBOTS_MEV_BOOST_IMAGE = "flashbots/mev-boost"
DEFAULT_MEV_RS_IMAGE = "ethpandaops/mev-rs:main" DEFAULT_MEV_RS_IMAGE = "ethpandaops/mev-rs:main"
DEFAULT_MEV_RS_IMAGE_MINIMAL = "ethpandaops/mev-rs:main-minimal" DEFAULT_MEV_RS_IMAGE_MINIMAL = "ethpandaops/mev-rs:main-minimal"
...@@ -173,7 +174,7 @@ VOLUME_SIZE = { ...@@ -173,7 +174,7 @@ VOLUME_SIZE = {
"nethermind_volume_size": 1000000, # 1TB "nethermind_volume_size": 1000000, # 1TB
"besu_volume_size": 1000000, # 1TB "besu_volume_size": 1000000, # 1TB
"reth_volume_size": 3000000, # 3TB "reth_volume_size": 3000000, # 3TB
"reth-builder_volume_size": 3000000, # 3TB "reth_builder_volume_size": 3000000, # 3TB
"ethereumjs_volume_size": 1000000, # 1TB "ethereumjs_volume_size": 1000000, # 1TB
"nimbus_eth1_volume_size": 1000000, # 1TB "nimbus_eth1_volume_size": 1000000, # 1TB
"prysm_volume_size": 500000, # 500GB "prysm_volume_size": 500000, # 500GB
...@@ -189,7 +190,7 @@ VOLUME_SIZE = { ...@@ -189,7 +190,7 @@ VOLUME_SIZE = {
"nethermind_volume_size": 300000, # 300GB "nethermind_volume_size": 300000, # 300GB
"besu_volume_size": 300000, # 300GB "besu_volume_size": 300000, # 300GB
"reth_volume_size": 500000, # 500GB "reth_volume_size": 500000, # 500GB
"reth-builder_volume_size": 500000, # 500GB "reth_builder_volume_size": 500000, # 500GB
"ethereumjs_volume_size": 300000, # 300GB "ethereumjs_volume_size": 300000, # 300GB
"nimbus_eth1_volume_size": 300000, # 300GB "nimbus_eth1_volume_size": 300000, # 300GB
"prysm_volume_size": 150000, # 150GB "prysm_volume_size": 150000, # 150GB
...@@ -205,7 +206,7 @@ VOLUME_SIZE = { ...@@ -205,7 +206,7 @@ VOLUME_SIZE = {
"nethermind_volume_size": 100000, # 100GB "nethermind_volume_size": 100000, # 100GB
"besu_volume_size": 100000, # 100GB "besu_volume_size": 100000, # 100GB
"reth_volume_size": 200000, # 200GB "reth_volume_size": 200000, # 200GB
"reth-builder_volume_size": 200000, # 200GB "reth_builder_volume_size": 200000, # 200GB
"ethereumjs_volume_size": 100000, # 100GB "ethereumjs_volume_size": 100000, # 100GB
"nimbus_eth1_volume_size": 100000, # 100GB "nimbus_eth1_volume_size": 100000, # 100GB
"prysm_volume_size": 100000, # 100GB "prysm_volume_size": 100000, # 100GB
...@@ -221,7 +222,7 @@ VOLUME_SIZE = { ...@@ -221,7 +222,7 @@ VOLUME_SIZE = {
"nethermind_volume_size": 100000, # 100GB "nethermind_volume_size": 100000, # 100GB
"besu_volume_size": 100000, # 100GB "besu_volume_size": 100000, # 100GB
"reth_volume_size": 200000, # 200GB "reth_volume_size": 200000, # 200GB
"reth-builder_volume_size": 200000, # 200GB "reth_builder_volume_size": 200000, # 200GB
"ethereumjs_volume_size": 100000, # 100GB "ethereumjs_volume_size": 100000, # 100GB
"nimbus_eth1_volume_size": 100000, # 100GB "nimbus_eth1_volume_size": 100000, # 100GB
"prysm_volume_size": 100000, # 100GB "prysm_volume_size": 100000, # 100GB
...@@ -237,7 +238,7 @@ VOLUME_SIZE = { ...@@ -237,7 +238,7 @@ VOLUME_SIZE = {
"nethermind_volume_size": 3000, # 3GB "nethermind_volume_size": 3000, # 3GB
"besu_volume_size": 3000, # 3GB "besu_volume_size": 3000, # 3GB
"reth_volume_size": 3000, # 3GB "reth_volume_size": 3000, # 3GB
"reth-builder_volume_size": 3000, # 3GB "reth_builder_volume_size": 3000, # 3GB
"ethereumjs_volume_size": 3000, # 3GB "ethereumjs_volume_size": 3000, # 3GB
"nimbus_eth1_volume_size": 3000, # 3GB "nimbus_eth1_volume_size": 3000, # 3GB
"prysm_volume_size": 1000, # 1GB "prysm_volume_size": 1000, # 1GB
...@@ -253,7 +254,7 @@ VOLUME_SIZE = { ...@@ -253,7 +254,7 @@ VOLUME_SIZE = {
"nethermind_volume_size": 3000, # 3GB "nethermind_volume_size": 3000, # 3GB
"besu_volume_size": 3000, # 3GB "besu_volume_size": 3000, # 3GB
"reth_volume_size": 3000, # 3GB "reth_volume_size": 3000, # 3GB
"reth-builder_volume_size": 3000, # 3GB "reth_builder_volume_size": 3000, # 3GB
"ethereumjs_volume_size": 3000, # 3GB "ethereumjs_volume_size": 3000, # 3GB
"nimbus_eth1_volume_size": 3000, # 3GB "nimbus_eth1_volume_size": 3000, # 3GB
"prysm_volume_size": 1000, # 1GB "prysm_volume_size": 1000, # 1GB
......
...@@ -31,7 +31,7 @@ DEFAULT_CL_IMAGES_MINIMAL = { ...@@ -31,7 +31,7 @@ DEFAULT_CL_IMAGES_MINIMAL = {
"nimbus": "ethpandaops/nimbus-eth2:stable-minimal", "nimbus": "ethpandaops/nimbus-eth2:stable-minimal",
"prysm": "ethpandaops/prysm-beacon-chain:develop-minimal", "prysm": "ethpandaops/prysm-beacon-chain:develop-minimal",
"lodestar": "chainsafe/lodestar:latest", "lodestar": "chainsafe/lodestar:latest",
"grandine": "ethpandaops/grandine:master-minimal", "grandine": "ethpandaops/grandine:develop-minimal",
} }
DEFAULT_VC_IMAGES = { DEFAULT_VC_IMAGES = {
...@@ -49,7 +49,7 @@ DEFAULT_VC_IMAGES_MINIMAL = { ...@@ -49,7 +49,7 @@ DEFAULT_VC_IMAGES_MINIMAL = {
"nimbus": "ethpandaops/nimbus-validator-client:stable-minimal", "nimbus": "ethpandaops/nimbus-validator-client:stable-minimal",
"prysm": "ethpandaops/prysm-validator:develop-minimal", "prysm": "ethpandaops/prysm-validator:develop-minimal",
"teku": "consensys/teku:latest", "teku": "consensys/teku:latest",
"grandine": "ethpandaops/grandine:master-minimal", "grandine": "ethpandaops/grandine:develop-minimal",
} }
DEFAULT_REMOTE_SIGNER_IMAGES = { DEFAULT_REMOTE_SIGNER_IMAGES = {
...@@ -1210,7 +1210,7 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ ...@@ -1210,7 +1210,7 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
or mev_type == constants.COMMIT_BOOST_MEV_TYPE or mev_type == constants.COMMIT_BOOST_MEV_TYPE
): ):
mev_participant = default_participant() mev_participant = default_participant()
mev_participant["el_type"] = "geth" mev_participant["el_type"] = "reth-builder"
mev_participant.update( mev_participant.update(
{ {
"el_image": parsed_arguments_dict["mev_params"]["mev_builder_image"], "el_image": parsed_arguments_dict["mev_params"]["mev_builder_image"],
...@@ -1222,31 +1222,9 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ ...@@ -1222,31 +1222,9 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
"12000", "12000",
"--disable-peer-scoring", "--disable-peer-scoring",
], ],
# TODO(maybe) make parts of this more passable like the mev-relay-endpoint & forks "el_extra_params": parsed_arguments_dict["mev_params"][
"el_extra_params": [ "mev_builder_extra_args"
"--builder", ],
"--builder.remote_relay_endpoint=http://mev-relay-api:9062",
"--builder.beacon_endpoints=http://cl-{0}-lighthouse-geth-builder:4000".format(
index_str
),
"--builder.bellatrix_fork_version={0}".format(
constants.BELLATRIX_FORK_VERSION
),
"--builder.genesis_fork_version={0}".format(
constants.GENESIS_FORK_VERSION
),
"--builder.genesis_validators_root={0}".format(
constants.GENESIS_VALIDATORS_ROOT_PLACEHOLDER
),
'--miner.extradata="Illuminate Dmocratize Dstribute"',
"--builder.algotype=greedy",
"--metrics.builder",
]
+ parsed_arguments_dict["mev_params"]["mev_builder_extra_args"],
"el_extra_env_vars": {
"BUILDER_TX_SIGNING_KEY": "0x"
+ genesis_constants.PRE_FUNDED_ACCOUNTS[0].private_key
},
"validator_count": 0, "validator_count": 0,
"prometheus_config": parsed_arguments_dict["mev_params"][ "prometheus_config": parsed_arguments_dict["mev_params"][
"mev_builder_prometheus_config" "mev_builder_prometheus_config"
...@@ -1258,7 +1236,7 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ ...@@ -1258,7 +1236,7 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
if mev_type == constants.MEV_RS_MEV_TYPE: if mev_type == constants.MEV_RS_MEV_TYPE:
mev_participant = default_participant() mev_participant = default_participant()
mev_participant["el_type"] = "reth-builder" mev_participant["el_type"] = constants.EL_TYPE.reth
mev_participant.update( mev_participant.update(
{ {
"el_image": parsed_arguments_dict["mev_params"]["mev_builder_image"], "el_image": parsed_arguments_dict["mev_params"]["mev_builder_image"],
......
...@@ -106,6 +106,7 @@ PARTICIPANT_MATRIX_PARAMS = { ...@@ -106,6 +106,7 @@ PARTICIPANT_MATRIX_PARAMS = {
"vc_max_cpu", "vc_max_cpu",
"vc_min_mem", "vc_min_mem",
"vc_max_mem", "vc_max_mem",
"validator_count",
], ],
"vc": [ "vc": [
"vc_type", "vc_type",
...@@ -120,6 +121,7 @@ PARTICIPANT_MATRIX_PARAMS = { ...@@ -120,6 +121,7 @@ PARTICIPANT_MATRIX_PARAMS = {
"vc_max_cpu", "vc_max_cpu",
"vc_min_mem", "vc_min_mem",
"vc_max_mem", "vc_max_mem",
"validator_count",
], ],
"remote_signer": [ "remote_signer": [
"remote_signer_type", "remote_signer_type",
......
...@@ -44,6 +44,7 @@ def launch_participant_network( ...@@ -44,6 +44,7 @@ def launch_participant_network(
checkpoint_sync_enabled, checkpoint_sync_enabled,
checkpoint_sync_url, checkpoint_sync_url,
port_publisher, port_publisher,
mev_builder_type,
): ):
network_id = network_params.network_id network_id = network_params.network_id
latest_block = "" latest_block = ""
...@@ -144,6 +145,7 @@ def launch_participant_network( ...@@ -144,6 +145,7 @@ def launch_participant_network(
network_id, network_id,
num_participants, num_participants,
port_publisher, port_publisher,
mev_builder_type,
) )
# Launch all consensus layer clients # Launch all consensus layer clients
......
...@@ -102,7 +102,7 @@ def new_env_file_for_el_cl_genesis_data( ...@@ -102,7 +102,7 @@ def new_env_file_for_el_cl_genesis_data(
"SecondsPerSlot": network_params.seconds_per_slot, "SecondsPerSlot": network_params.seconds_per_slot,
"PreregisteredValidatorKeysMnemonic": network_params.preregistered_validator_keys_mnemonic, "PreregisteredValidatorKeysMnemonic": network_params.preregistered_validator_keys_mnemonic,
"NumValidatorKeysToPreregister": total_num_validator_keys_to_preregister, "NumValidatorKeysToPreregister": total_num_validator_keys_to_preregister,
"GenesisDelay": network_params.genesis_delay, "GenesisDelay": 0, # This delay is already precaculated in the final_genesis_timestamp
"GenesisGasLimit": network_params.genesis_gaslimit, "GenesisGasLimit": network_params.genesis_gaslimit,
"MaxPerEpochActivationChurnLimit": network_params.max_per_epoch_activation_churn_limit, "MaxPerEpochActivationChurnLimit": network_params.max_per_epoch_activation_churn_limit,
"ChurnLimitQuotient": network_params.churn_limit_quotient, "ChurnLimitQuotient": network_params.churn_limit_quotient,
......
...@@ -313,6 +313,7 @@ def get_port_specs(port_assignments): ...@@ -313,6 +313,7 @@ def get_port_specs(port_assignments):
constants.VALIDATOR_HTTP_PORT_ID, constants.VALIDATOR_HTTP_PORT_ID,
constants.ADMIN_PORT_ID, constants.ADMIN_PORT_ID,
constants.VALDIATOR_GRPC_PORT_ID, constants.VALDIATOR_GRPC_PORT_ID,
constants.RBUILDER_PORT_ID,
]: ]:
ports.update( ports.update(
{port_id: new_port_spec(port, TCP_PROTOCOL, HTTP_APPLICATION_PROTOCOL)} {port_id: new_port_spec(port, TCP_PROTOCOL, HTTP_APPLICATION_PROTOCOL)}
......
...@@ -97,6 +97,10 @@ MEV_RS_MEV_BUILDER_CONFIG_FILEPATH = ( ...@@ -97,6 +97,10 @@ MEV_RS_MEV_BUILDER_CONFIG_FILEPATH = (
STATIC_FILES_DIRPATH + "/mev/mev-rs/mev_builder/config.toml.tmpl" STATIC_FILES_DIRPATH + "/mev/mev-rs/mev_builder/config.toml.tmpl"
) )
FLASHBOTS_RBUILDER_CONFIG_FILEPATH = (
STATIC_FILES_DIRPATH + "/mev/flashbots/mev_builder/config.toml.tmpl"
)
COMMIT_BOOST_CONFIG_FILEPATH = ( COMMIT_BOOST_CONFIG_FILEPATH = (
STATIC_FILES_DIRPATH + "/mev/commit-boost/cb-config.toml.tmpl" STATIC_FILES_DIRPATH + "/mev/commit-boost/cb-config.toml.tmpl"
) )
log_json = true
log_level = "info,rbuilder=debug"
redacted_telemetry_server_port = 6061
redacted_telemetry_server_ip = "0.0.0.0"
full_telemetry_server_port = 6060
full_telemetry_server_ip = "0.0.0.0"
chain = "{{ .Network }}"
reth_datadir = "{{ .DataDir }}"
coinbase_secret_key = "{{ .SecretKey }}"
relay_secret_key = "{{ .SecretKey }}"
optimistic_relay_secret_key = "{{ .SecretKey }}"
# cl_node_url can be a single value, array of values, or passed by an environment variables with values separated with a comma
cl_node_url = ["{{ .CLEndpoint }}"]
jsonrpc_server_port = 8645
jsonrpc_server_ip = "0.0.0.0"
el_node_ipc_path = "/tmp/reth.ipc"
extra_data = "🐼⚡🤖"
genesis_fork_version = "{{ .GenesisForkVersion }}"
dry_run = false
dry_run_validation_url = "http://localhost:8545"
ignore_cancellable_orders = true
max_concurrent_seals = 4
sbundle_mergeabe_signers = []
# slot_delta_to_start_submits_ms is usually negative since we start bidding BEFORE the slot start
# slot_delta_to_start_submits_ms = -5000
live_builders = ["mp-ordering", "mgp-ordering"]
watchdog_timeout_sec = 99999
[[relays]]
name = "flashbots"
url = "http://{{ .PublicKey }}@{{ .Relay }}:{{ .RelayPort }}"
priority = 0
use_ssz_for_submit = false
use_gzip_for_submit = false
[[builders]]
name = "mgp-ordering"
algo = "ordering-builder"
discard_txs = true
sorting = "mev-gas-price"
failed_order_retries = 1
drop_failed_orders = true
[[builders]]
name = "mp-ordering"
algo = "ordering-builder"
discard_txs = true
sorting = "max-profit"
failed_order_retries = 1
drop_failed_orders = true
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