Skip to content
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
16 changes: 15 additions & 1 deletion .github/tests/blobber.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,28 @@ participants:
el_image: ethpandaops/geth:master
cl_type: lighthouse
blobber_enabled: true
blobber_image: ethpandaops/blobber:latest
blobber_extra_params:
- --proposal-action-frequency=1
- "--proposal-action={\"name\": \"blob_gossip_delay\", \"delay_milliseconds\": 1500}"
- "--proposal-action={\"name\": \"blob_gossip_delay\", \"delay_milliseconds\": 3000}"
count: 1
- el_type: geth
el_image: ethpandaops/geth:master
cl_type: lodestar
count: 1
- el_type: geth
el_image: ethpandaops/geth:master
cl_type: prysm
blobber_enabled: true
blobber_image: ethpandaops/blobber:latest
blobber_extra_params:
- --proposal-action-frequency=1
- "--proposal-action={\"name\": \"blob_gossip_delay\", \"delay_milliseconds\": 30000}"
count: 1

additional_services:
- dora
- spamoor

# - "--proposal-action={\"name\": \"blob_gossip_delay\", \"delay_milliseconds\": 30000}"
# - "--proposal-action={\"name\": \"conflicting_blobs\"}"
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,10 @@ participants:
# Defaults to empty
blobber_extra_params: []

# Blobber image to be used for the blobber container
# Defaults to empty
blobber_image: ethpandaops/blobber:latest

# A set of parameters the node needs to reach an external block building network
# If `null` then the builder infrastructure will not be instantiated
# Example:
Expand Down
15 changes: 7 additions & 8 deletions src/blobber/blobber_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def launch(
service_name,
node_keystore_files,
beacon_http_url,
extra_params,
participant,
node_selectors,
):
blobber_service_name = "{0}".format(service_name)
Expand All @@ -48,22 +48,22 @@ def launch(
service_name,
node_keystore_files,
beacon_http_url,
extra_params,
participant,
node_selectors,
)

blobber_service = plan.add_service(blobber_service_name, blobber_config)
return blobber_context.new_blobber_context(
blobber_service.ip_address,
blobber_service.ports[BLOBBER_VALIDATOR_PROXY_PORT_NUM],
blobber_service.ports[BLOBBER_VALIDATOR_PROXY_PORT_ID].number,
)


def get_config(
service_name,
node_keystore_files,
beacon_http_url,
extra_params,
participant,
node_selectors,
):
validator_root_dirpath = shared_utils.path_join(
Expand All @@ -75,16 +75,15 @@ def get_config(
"--cl={0}".format(beacon_http_url),
"--validator-key-folder={0}".format(validator_root_dirpath),
"--enable-unsafe-mode",
# Does this get affected by public ip address changes?
"--external-ip={0}".format(constants.PRIVATE_IP_ADDRESS_PLACEHOLDER),
"--validator-proxy-port-start={0}".format(BLOBBER_VALIDATOR_PROXY_PORT_NUM),
]

if len(extra_params) > 0:
cmd.extend([param for param in extra_params])
if len(participant.blobber_extra_params) > 0:
cmd.extend([param for param in participant.blobber_extra_params])

return ServiceConfig(
image=DEFAULT_BLOBBER_IMAGE,
image=participant.blobber_image,
ports=BLOBBER_USED_PORTS,
files={
VALIDATOR_KEYS_MOUNTPOINT_ON_CLIENTS: node_keystore_files.files_artifact_uuid
Expand Down
21 changes: 19 additions & 2 deletions src/cl/cl_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def launch(

all_snooper_el_engine_contexts = []
all_cl_contexts = []
blobber_configs_with_contexts = []
preregistered_validator_keys_for_nodes = (
validator_data.per_node_keystores
if network_params.network == constants.NETWORK_NAME.kurtosis
Expand Down Expand Up @@ -165,7 +166,7 @@ def launch(
all_snooper_el_engine_contexts.append(snooper_el_engine_context)
full_name = "{0}-{1}-{2}".format(index_str, el_type, cl_type)
if index == 0:
cl_context = launch_method(
result = launch_method(
plan,
cl_launcher,
cl_service_name,
Expand All @@ -187,7 +188,7 @@ def launch(
)
else:
boot_cl_client_ctx = all_cl_contexts
cl_context = launch_method(
result = launch_method(
plan,
cl_launcher,
cl_service_name,
Expand All @@ -208,6 +209,21 @@ def launch(
network_params,
)

# Handle both old (single return) and new (tuple) format
if type(result) == "tuple":
cl_context, blobber_config = result
if blobber_config != None:
blobber_configs_with_contexts.append(
struct(
cl_context=cl_context,
blobber_config=blobber_config,
participant=participant,
)
)
else:
# Backward compatibility for CL clients that don't support blobbers
cl_context = result

# Add participant cl additional prometheus labels
for metrics_info in cl_context.cl_nodes_metrics_info:
if metrics_info != None:
Expand All @@ -219,4 +235,5 @@ def launch(
all_snooper_el_engine_contexts,
preregistered_validator_keys_for_nodes,
global_other_index,
blobber_configs_with_contexts,
)
8 changes: 7 additions & 1 deletion src/cl/grandine/grandine_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def launch(
beacon_service.ip_address, beacon_http_port.number
)

# Grandine doesn't support blobbers, return None for blobber config
blobber_config = None

beacon_metrics_port = beacon_service.ports[constants.METRICS_PORT_ID]
beacon_metrics_url = "{0}:{1}".format(
beacon_service.ip_address, beacon_metrics_port.number
Expand All @@ -110,7 +113,7 @@ def launch(
beacon_service_name, BEACON_METRICS_PATH, beacon_metrics_url
)
nodes_metrics_info = [beacon_node_metrics_info]
return cl_context.new_cl_context(
cl_context_obj = cl_context.new_cl_context(
client_name="grandine",
enr=beacon_node_enr,
ip_addr=beacon_service.ip_address,
Expand All @@ -128,6 +131,9 @@ def launch(
supernode=participant.supernode,
)

# Return tuple of cl_context and blobber_config
return (cl_context_obj, blobber_config)


def get_beacon_config(
plan,
Expand Down
29 changes: 11 additions & 18 deletions src/cl/lighthouse/lighthouse_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,16 @@ def launch(
beacon_service.ip_address, beacon_http_port.number
)

# Blobber config
# Prepare blobber config without launching
blobber_config = None
if participant.blobber_enabled:
blobber_service_name = "{0}-{1}".format("blobber", beacon_service_name)
blobber_config = blobber_launcher.get_config(
blobber_service_name,
node_keystore_files,
beacon_http_url,
participant.blobber_extra_params,
node_selectors,
blobber_config = struct(
service_name="{0}-{1}".format("blobber", beacon_service_name),
beacon_http_url=beacon_http_url,
node_keystore_files=node_keystore_files,
node_selectors=node_selectors,
)

blobber_service = plan.add_service(blobber_service_name, blobber_config)
blobber_http_port = blobber_service.ports[
blobber_launcher.BLOBBER_VALIDATOR_PROXY_PORT_ID
]
blobber_http_url = "http://{0}:{1}".format(
blobber_service.ip_address, blobber_http_port.number
)
beacon_http_url = blobber_http_url

# TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module
beacon_node_identity_recipe = GetHttpRequestRecipe(
endpoint="/eth/v1/node/identity",
Expand All @@ -134,7 +124,7 @@ def launch(
beacon_service_name, METRICS_PATH, beacon_metrics_url
)
nodes_metrics_info = [beacon_node_metrics_info]
return cl_context.new_cl_context(
cl_context_obj = cl_context.new_cl_context(
client_name="lighthouse",
enr=beacon_node_enr,
ip_addr=beacon_service.ip_address,
Expand All @@ -152,6 +142,9 @@ def launch(
supernode=participant.supernode,
)

# Return tuple of cl_context and blobber_config
return (cl_context_obj, blobber_config)


def get_beacon_config(
plan,
Expand Down
28 changes: 11 additions & 17 deletions src/cl/lodestar/lodestar_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,16 @@ def launch(
beacon_service.ip_address, beacon_http_port.number
)

# Blobber config
# Prepare blobber config without launching
blobber_config = None
if participant.blobber_enabled:
blobber_service_name = "{0}-{1}".format("blobber", beacon_service_name)
blobber_config = blobber_launcher.get_config(
blobber_service_name,
node_keystore_files,
beacon_http_url,
participant.blobber_extra_params,
blobber_config = struct(
service_name="{0}-{1}".format("blobber", beacon_service_name),
beacon_http_url=beacon_http_url,
node_keystore_files=node_keystore_files,
node_selectors=node_selectors,
)

blobber_service = plan.add_service(blobber_service_name, blobber_config)
blobber_http_port = blobber_service.ports[
blobber_launcher.BLOBBER_VALIDATOR_PROXY_PORT_ID
]
blobber_http_url = "http://{0}:{1}".format(
blobber_service.ip_address, blobber_http_port.number
)
beacon_http_url = blobber_http_url

# TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module

beacon_node_identity_recipe = GetHttpRequestRecipe(
Expand Down Expand Up @@ -126,7 +117,7 @@ def launch(
)
nodes_metrics_info = [beacon_node_metrics_info]

return cl_context.new_cl_context(
cl_context_obj = cl_context.new_cl_context(
client_name="lodestar",
enr=beacon_node_enr,
ip_addr=beacon_service.ip_address,
Expand All @@ -144,6 +135,9 @@ def launch(
supernode=participant.supernode,
)

# Return tuple of cl_context and blobber_config
return (cl_context_obj, blobber_config)


def get_beacon_config(
plan,
Expand Down
5 changes: 4 additions & 1 deletion src/cl/nimbus/nimbus_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def launch(
)
nodes_metrics_info = [nimbus_node_metrics_info]

return cl_context.new_cl_context(
cl_context_obj = cl_context.new_cl_context(
client_name="nimbus",
enr=beacon_node_enr,
ip_addr=beacon_service.ip_address,
Expand All @@ -140,6 +140,9 @@ def launch(
supernode=participant.supernode,
)

# Nimbus doesn't support blobbers, return None for blobber config
return (cl_context_obj, None)


def get_beacon_config(
plan,
Expand Down
15 changes: 14 additions & 1 deletion src/cl/prysm/prysm_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ def launch(
)
beacon_grpc_url = "{0}:{1}".format(beacon_service.ip_address, RPC_PORT_NUM)

# Prepare blobber config without launching
blobber_config = None
if participant.blobber_enabled:
blobber_config = struct(
service_name="{0}-{1}".format("blobber", beacon_service_name),
beacon_http_url=beacon_http_url,
node_keystore_files=node_keystore_files,
node_selectors=node_selectors,
)

# TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module
beacon_node_identity_recipe = GetHttpRequestRecipe(
endpoint="/eth/v1/node/identity",
Expand All @@ -109,7 +119,7 @@ def launch(
)
nodes_metrics_info = [beacon_node_metrics_info]

return cl_context.new_cl_context(
cl_context_obj = cl_context.new_cl_context(
client_name="prysm",
enr=beacon_node_enr,
ip_addr=beacon_service.ip_address,
Expand All @@ -128,6 +138,9 @@ def launch(
supernode=participant.supernode,
)

# Return tuple of cl_context and blobber_config
return (cl_context_obj, blobber_config)


def get_beacon_config(
plan,
Expand Down
5 changes: 4 additions & 1 deletion src/cl/teku/teku_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def launch(
)
nodes_metrics_info = [beacon_node_metrics_info]

return cl_context.new_cl_context(
cl_context_obj = cl_context.new_cl_context(
client_name="teku",
enr=beacon_node_enr,
ip_addr=beacon_service.ip_address,
Expand All @@ -129,6 +129,9 @@ def launch(
supernode=participant.supernode,
)

# Teku doesn't support blobbers, return None for blobber config
return (cl_context_obj, None)


def get_beacon_config(
plan,
Expand Down
12 changes: 10 additions & 2 deletions src/package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ def input_parser(plan, input_args):
),
blobber_enabled=participant["blobber_enabled"],
blobber_extra_params=participant["blobber_extra_params"],
blobber_image=participant["blobber_image"],
keymanager_enabled=participant["keymanager_enabled"],
)
for participant in result["participants"]
Expand Down Expand Up @@ -809,8 +810,13 @@ def parse_network_params(plan, input_args):

blobber_enabled = participant["blobber_enabled"]
if blobber_enabled:
# unless we are running lighthouse, we don't support blobber
if participant["cl_type"] != constants.CL_TYPE.lighthouse:
# lighthouse, lodestar, prysm, and grandine support blobber
if participant["cl_type"] not in [
constants.CL_TYPE.lighthouse,
constants.CL_TYPE.lodestar,
constants.CL_TYPE.prysm,
constants.CL_TYPE.grandine,
]:
fail(
"blobber is not supported for {0} client".format(
participant["cl_type"]
Expand Down Expand Up @@ -1219,6 +1225,7 @@ def default_participant():
},
"blobber_enabled": False,
"blobber_extra_params": [],
"blobber_image": "ethpandaops/blobber:latest",
"builder_network_params": None,
"keymanager_enabled": None,
}
Expand Down Expand Up @@ -1621,6 +1628,7 @@ def docker_cache_image_override(plan, result):
"cl_image",
"vc_image",
"remote_signer_image",
"blobber_image",
]
tooling_overridable_image = [
"dora_params.image",
Expand Down
Loading
Loading