Skip to content

Commit

Permalink
feat: add custom image for egg (#859)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa authored Dec 13, 2024
1 parent d6bec16 commit e60afbe
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 18 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,11 @@ spamoor_params:
# Defaults to empty
spamoor_extra_args: []

# Ethereum genesis generator params
ethereum_genesis_generator_params:
# The image to use for ethereum genesis generator
image: ethpandaops/ethereum-genesis-generator:3.4.7

# Global parameter to set the exit ip address of services and public ports
port_publisher:
# if you have a service that you want to expose on a specific interfact; set that IP here
Expand Down
2 changes: 2 additions & 0 deletions network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ global_node_selectors: {}
keymanager_enabled: false
checkpoint_sync_enabled: false
checkpoint_sync_url: ""
ethereum_genesis_generator_params:
image: ethpandaops/ethereum-genesis-generator:3.4.7
port_publisher:
nat_exit_ip: KURTOSIS_IP_ADDR_PLACEHOLDER
el:
Expand Down
14 changes: 2 additions & 12 deletions src/network_launcher/kurtosis.star
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,9 @@ def launch(

ethereum_genesis_generator_image = shared_utils.docker_cache_image_calc(
args_with_right_defaults.docker_cache_params,
constants.ETHEREUM_GENESIS_GENERATOR.default_genesis_generator_image,
args_with_right_defaults.ethereum_genesis_generator_params.image,
)
# we are running electra - experimental
if network_params.electra_fork_epoch != None:
if network_params.electra_fork_epoch == 0:
ethereum_genesis_generator_image = shared_utils.docker_cache_image_calc(
args_with_right_defaults.docker_cache_params,
constants.ETHEREUM_GENESIS_GENERATOR.verkle_genesis,
)
else:
fail(
"Unsupported fork epoch configuration, need to define either deneb_fork_epoch or electra_fork_epoch"
)

return (
total_number_of_validator_keys,
ethereum_genesis_generator_image,
Expand Down
9 changes: 3 additions & 6 deletions src/package_io/constants.star
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ COMMIT_BOOST_MEV_TYPE = "commit-boost"
DEFAULT_DORA_IMAGE = "ethpandaops/dora:latest"
DEFAULT_ASSERTOOR_IMAGE = "ethpandaops/assertoor:latest"
DEFAULT_SNOOPER_IMAGE = "ethpandaops/rpc-snooper:latest"
DEFAULT_ETHEREUM_GENESIS_GENERATOR_IMAGE = (
"ethpandaops/ethereum-genesis-generator:3.4.7"
)
DEFAULT_FLASHBOTS_RELAY_IMAGE = "flashbots/mev-boost-relay:0.29.2a3"
DEFAULT_FLASHBOTS_BUILDER_IMAGE = "ethpandaops/reth-rbuilder:develop"
DEFAULT_FLASHBOTS_MEV_BOOST_IMAGE = "flashbots/mev-boost"
Expand Down Expand Up @@ -121,12 +124,6 @@ CONTAINER_REGISTRY = struct(
gcr="gcr.io",
)


ETHEREUM_GENESIS_GENERATOR = struct(
default_genesis_generator_image="ethpandaops/ethereum-genesis-generator:3.4.7", # Default
verkle_genesis="ethpandaops/ethereum-genesis-generator:verkle-gen-v1.0.0",
)

NETWORK_NAME = struct(
mainnet="mainnet",
sepolia="sepolia",
Expand Down
15 changes: 15 additions & 0 deletions src/package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ def input_parser(plan, input_args):
for sub_attr in input_args["spamoor_params"]:
sub_value = input_args["spamoor_params"][sub_attr]
result["spamoor_params"][sub_attr] = sub_value
elif attr == "ethereum_genesis_generator_params":
for sub_attr in input_args["ethereum_genesis_generator_params"]:
sub_value = input_args["ethereum_genesis_generator_params"][sub_attr]
result["ethereum_genesis_generator_params"][sub_attr] = sub_value

if result.get("disable_peer_scoring"):
result = enrich_disable_peer_scoring(result)
Expand Down Expand Up @@ -476,6 +480,9 @@ def input_parser(plan, input_args):
keymanager_enabled=result["keymanager_enabled"],
checkpoint_sync_enabled=result["checkpoint_sync_enabled"],
checkpoint_sync_url=result["checkpoint_sync_url"],
ethereum_genesis_generator_params=struct(
image=result["ethereum_genesis_generator_params"]["image"],
),
port_publisher=struct(
nat_exit_ip=result["port_publisher"]["nat_exit_ip"],
cl_enabled=result["port_publisher"]["cl"]["enabled"],
Expand Down Expand Up @@ -864,6 +871,7 @@ def default_input_args(input_args):
"keymanager_enabled": False,
"checkpoint_sync_enabled": False,
"checkpoint_sync_url": "",
"ethereum_genesis_generator_params": get_default_ethereum_genesis_generator_params(),
"port_publisher": {
"nat_exit_ip": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER,
"public_port_start": None,
Expand Down Expand Up @@ -1387,6 +1395,7 @@ def docker_cache_image_override(plan, result):
"prometheus_params.image",
"grafana_params.image",
"spamoor_params.image",
"ethereum_genesis_generator_params.image",
]

if result["docker_cache_params"]["url"] == "":
Expand Down Expand Up @@ -1458,3 +1467,9 @@ def docker_cache_image_override(plan, result):
tooling_image_key
)
)


def get_default_ethereum_genesis_generator_params():
return {
"image": "ethpandaops/ethereum-genesis-generator:3.4.7",
}
3 changes: 3 additions & 0 deletions src/package_io/sanity_check.star
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ SUBCATEGORY_PARAMS = {
"max_wallets",
"spamoor_extra_args",
],
"ethereum_genesis_generator_params": [
"image",
],
"port_publisher": [
"nat_exit_ip",
"el",
Expand Down

0 comments on commit e60afbe

Please sign in to comment.