Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ethereum-package
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
ethereum-package
Commits
f6e1b136
Unverified
Commit
f6e1b136
authored
Mar 28, 2024
by
Barnabas Busa
Committed by
GitHub
Mar 28, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: enable preset to be set, mainnet/minimal (#524)
parent
969012c3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
121 additions
and
10 deletions
+121
-10
minimal.yaml
.github/tests/minimal.yaml
+24
-0
mix-with-tools-minimal.yaml
.github/tests/mix-with-tools-minimal.yaml
+37
-0
README.md
README.md
+10
-0
constants.star
src/package_io/constants.star
+2
-2
input_parser.star
src/package_io/input_parser.star
+33
-6
participant_network.star
src/participant_network.star
+1
-0
el_cl_genesis_generator.star
...data_generator/el_cl_genesis/el_cl_genesis_generator.star
+4
-0
prysm.star
src/vc/prysm.star
+9
-1
values.env.tmpl
static_files/genesis-generation-config/el-cl/values.env.tmpl
+1
-1
No files found.
.github/tests/minimal.yaml
0 → 100644
View file @
f6e1b136
participants
:
-
el_type
:
geth
cl_type
:
teku
-
el_type
:
geth
cl_type
:
prysm
cl_extra_params
:
[
--minimal-config=true
]
cl_image
:
ethpandaops/prysm-beacon-chain:develop-minimal
-
el_type
:
erigon
cl_type
:
nimbus
cl_image
:
ethpandaops/nimbus-eth2:unstable-minimal
-
el_type
:
besu
cl_type
:
lighthouse
cl_image
:
ethpandaops/lighthouse:unstable-minimal
-
el_type
:
reth
cl_type
:
lodestar
cl_extra_env_vars
:
{
LODESTAR_PRESET
:
minimal
}
vc_extra_env_vars
:
{
LODESTAR_PRESET
:
minimal
}
-
el_type
:
geth
cl_type
:
grandine
cl_image
:
ethpandaops/grandine:develop-minimal
network_params
:
preset
:
minimal
seconds_per_slot
:
6
additional_services
:
[]
.github/tests/mix-with-tools-minimal.yaml
0 → 100644
View file @
f6e1b136
participants
:
-
el_type
:
geth
cl_type
:
teku
-
el_type
:
geth
cl_type
:
prysm
cl_extra_params
:
[
--minimal-config=true
]
cl_image
:
ethpandaops/prysm-beacon-chain:develop-minimal
-
el_type
:
erigon
cl_type
:
nimbus
cl_image
:
ethpandaops/nimbus-eth2:unstable-minimal
-
el_type
:
besu
cl_type
:
lighthouse
cl_image
:
ethpandaops/lighthouse:unstable-minimal
-
el_type
:
reth
cl_type
:
lodestar
cl_extra_env_vars
:
{
LODESTAR_PRESET
:
minimal
}
vc_extra_env_vars
:
{
LODESTAR_PRESET
:
minimal
}
-
el_type
:
geth
cl_type
:
grandine
cl_image
:
ethpandaops/grandine:develop-minimal
network_params
:
preset
:
minimal
seconds_per_slot
:
6
additional_services
:
-
tx_spammer
-
blob_spammer
-
el_forkmon
-
beacon_metrics_gazer
-
dora
-
prometheus_grafana
-
goomy_blob
-
custom_flood
-
blobscan
-
blockscout
ethereum_metrics_exporter_enabled
:
true
snooper_enabled
:
true
keymanager_enabled
:
true
README.md
View file @
f6e1b136
...
@@ -508,6 +508,16 @@ network_params:
...
@@ -508,6 +508,16 @@ network_params:
# The snapshots are taken with https://github.com/ethpandaops/snapshotter
# The snapshots are taken with https://github.com/ethpandaops/snapshotter
network_sync_base_url
:
https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/
network_sync_base_url
:
https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/
# Preset for the network
# Default: "mainnet"
# Options: "mainnet", "minimal"
# "minimal" preset will spin up a network with minimal preset. This is useful for rapid testing and development.
# 192 seconds to get to finalized epoch vs 1536 seconds with mainnet defaults
# Please note that minimal preset requires alternative client images.
# For an example of minimal preset, please refer to [minimal.yaml](.github/tests/minimal.yaml)
preset
:
"
mainnet"
# Global parameters for the network
# Global parameters for the network
# By default includes
# By default includes
...
...
src/package_io/constants.star
View file @
f6e1b136
...
@@ -74,8 +74,8 @@ DENEB_FORK_VERSION = "0x50000038"
...
@@ -74,8 +74,8 @@ DENEB_FORK_VERSION = "0x50000038"
ELECTRA_FORK_VERSION = "0x60000038"
ELECTRA_FORK_VERSION = "0x60000038"
ETHEREUM_GENESIS_GENERATOR = struct(
ETHEREUM_GENESIS_GENERATOR = struct(
capella_genesis="ethpandaops/ethereum-genesis-generator:2.0.12", # Deprecated
capella_genesis="ethpandaops/ethereum-genesis-generator:2.0.12", # Deprecated
(no support for minimal config)
deneb_genesis="ethpandaops/ethereum-genesis-generator:3.0.
0
", # Default
deneb_genesis="ethpandaops/ethereum-genesis-generator:3.0.
2
", # Default
verkle_support_genesis="ethpandaops/ethereum-genesis-generator:3.0.0-rc.19", # soon to be deneb genesis, waiting for rebase
verkle_support_genesis="ethpandaops/ethereum-genesis-generator:3.0.0-rc.19", # soon to be deneb genesis, waiting for rebase
verkle_genesis="ethpandaops/ethereum-genesis-generator:verkle-gen-v1.0.0",
verkle_genesis="ethpandaops/ethereum-genesis-generator:verkle-gen-v1.0.0",
)
)
...
...
src/package_io/input_parser.star
View file @
f6e1b136
...
@@ -36,9 +36,6 @@ MEV_BOOST_RELAY_DEFAULT_IMAGE = "flashbots/mev-boost-relay:0.27"
...
@@ -36,9 +36,6 @@ MEV_BOOST_RELAY_DEFAULT_IMAGE = "flashbots/mev-boost-relay:0.27"
MEV_BOOST_RELAY_IMAGE_NON_ZERO_CAPELLA = "flashbots/mev-boost-relay:0.26"
MEV_BOOST_RELAY_IMAGE_NON_ZERO_CAPELLA = "flashbots/mev-boost-relay:0.26"
NETHERMIND_NODE_NAME = "nethermind"
NIMBUS_NODE_NAME = "nimbus"
# Placeholder value for the deneb fork epoch if electra is being run
# Placeholder value for the deneb fork epoch if electra is being run
# TODO: This is a hack, and should be removed once we electra is rebased on deneb
# TODO: This is a hack, and should be removed once we electra is rebased on deneb
HIGH_DENEB_VALUE_FORK_VERKLE = 2000000000
HIGH_DENEB_VALUE_FORK_VERKLE = 2000000000
...
@@ -236,6 +233,7 @@ def input_parser(plan, input_args):
...
@@ -236,6 +233,7 @@ def input_parser(plan, input_args):
],
],
shard_committee_period=result["network_params"]["shard_committee_period"],
shard_committee_period=result["network_params"]["shard_committee_period"],
network_sync_base_url=result["network_params"]["network_sync_base_url"],
network_sync_base_url=result["network_params"]["network_sync_base_url"],
preset=result["network_params"]["preset"],
),
),
mev_params=struct(
mev_params=struct(
mev_relay_image=result["mev_params"]["mev_relay_image"],
mev_relay_image=result["mev_params"]["mev_relay_image"],
...
@@ -339,10 +337,27 @@ def parse_network_params(input_args):
...
@@ -339,10 +337,27 @@ def parse_network_params(input_args):
cl_type = participant["cl_type"]
cl_type = participant["cl_type"]
vc_type = participant["vc_type"]
vc_type = participant["vc_type"]
if cl_type in (NIMBUS_NODE_NAME) and (
if (
result["network_params"]["seconds_per_slot"] < 12
cl_type in (constants.CL_TYPE.nimbus)
and (result["network_params"]["seconds_per_slot"] < 12)
and result["network_params"]["preset"] == "mainnet"
):
):
fail("nimbus can't be run with slot times below 12 seconds")
fail(
"nimbus can't be run with slot times below 12 seconds with "
+ result["network_params"]["preset"]
+ " preset"
)
if (
cl_type in (constants.CL_TYPE.nimbus)
and (result["network_params"]["seconds_per_slot"] != 6)
and result["network_params"]["preset"] == "minimal"
):
fail(
"nimbus can't be run with slot times different than 6 seconds with "
+ result["network_params"]["preset"]
+ " preset"
)
el_image = participant["el_image"]
el_image = participant["el_image"]
if el_image == "":
if el_image == "":
...
@@ -508,6 +523,17 @@ def parse_network_params(input_args):
...
@@ -508,6 +523,17 @@ def parse_network_params(input_args):
for participant in result["participants"]:
for participant in result["participants"]:
participant["validator_count"] = 0
participant["validator_count"] = 0
if result["network_params"]["preset"] not in ["mainnet", "minimal"]:
fail(
"preset "
+ result["network_params"]["preset"]
+ " is not supported, it can only be mainnet or minimal"
)
if result["network_params"]["preset"] == "minimal":
if result["network_params"]["deneb_fork_epoch"] > 0:
fail("minimal preset only supports deneb genesis fork epoch")
return result
return result
...
@@ -613,6 +639,7 @@ def default_network_params():
...
@@ -613,6 +639,7 @@ def default_network_params():
"deneb_fork_epoch": 0,
"deneb_fork_epoch": 0,
"electra_fork_epoch": 500,
"electra_fork_epoch": 500,
"network_sync_base_url": "https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/",
"network_sync_base_url": "https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/",
"preset": "mainnet",
}
}
...
...
src/participant_network.star
View file @
f6e1b136
...
@@ -104,6 +104,7 @@ def launch_participant_network(
...
@@ -104,6 +104,7 @@ def launch_participant_network(
latest_block.files_artifacts[0] if latest_block != "" else "",
latest_block.files_artifacts[0] if latest_block != "" else "",
network_params.min_validator_withdrawability_delay,
network_params.min_validator_withdrawability_delay,
network_params.shard_committee_period,
network_params.shard_committee_period,
network_params.preset,
)
)
elif network_params.network in constants.PUBLIC_NETWORKS:
elif network_params.network in constants.PUBLIC_NETWORKS:
# We are running a public network
# We are running a public network
...
...
src/prelaunch_data_generator/el_cl_genesis/el_cl_genesis_generator.star
View file @
f6e1b136
...
@@ -28,6 +28,7 @@ def generate_el_cl_genesis_data(
...
@@ -28,6 +28,7 @@ def generate_el_cl_genesis_data(
latest_block,
latest_block,
min_validator_withdrawability_delay,
min_validator_withdrawability_delay,
shard_committee_period,
shard_committee_period,
preset,
):
):
files = {}
files = {}
shadowfork_file = ""
shadowfork_file = ""
...
@@ -51,6 +52,7 @@ def generate_el_cl_genesis_data(
...
@@ -51,6 +52,7 @@ def generate_el_cl_genesis_data(
shadowfork_file,
shadowfork_file,
min_validator_withdrawability_delay,
min_validator_withdrawability_delay,
shard_committee_period,
shard_committee_period,
preset,
)
)
genesis_generation_template = shared_utils.new_template_and_data(
genesis_generation_template = shared_utils.new_template_and_data(
genesis_generation_config_yml_template, template_data
genesis_generation_config_yml_template, template_data
...
@@ -126,6 +128,7 @@ def new_env_file_for_el_cl_genesis_data(
...
@@ -126,6 +128,7 @@ def new_env_file_for_el_cl_genesis_data(
shadowfork_file,
shadowfork_file,
min_validator_withdrawability_delay,
min_validator_withdrawability_delay,
shard_committee_period,
shard_committee_period,
preset,
):
):
return {
return {
"UnixTimestamp": genesis_unix_timestamp,
"UnixTimestamp": genesis_unix_timestamp,
...
@@ -148,4 +151,5 @@ def new_env_file_for_el_cl_genesis_data(
...
@@ -148,4 +151,5 @@ def new_env_file_for_el_cl_genesis_data(
"ShadowForkFile": shadowfork_file,
"ShadowForkFile": shadowfork_file,
"MinValidatorWithdrawabilityDelay": min_validator_withdrawability_delay,
"MinValidatorWithdrawabilityDelay": min_validator_withdrawability_delay,
"ShardCommitteePeriod": shard_committee_period,
"ShardCommitteePeriod": shard_committee_period,
"Preset": preset,
}
}
src/vc/prysm.star
View file @
f6e1b136
...
@@ -56,7 +56,6 @@ def get_config(
...
@@ -56,7 +56,6 @@ def get_config(
"--monitoring-port={0}".format(vc_shared.VALIDATOR_CLIENT_METRICS_PORT_NUM),
"--monitoring-port={0}".format(vc_shared.VALIDATOR_CLIENT_METRICS_PORT_NUM),
# ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^
# ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^
"--graffiti=" + full_name,
"--graffiti=" + full_name,
"--enable-beacon-rest-api",
]
]
keymanager_api_cmd = [
keymanager_api_cmd = [
...
@@ -65,6 +64,15 @@ def get_config(
...
@@ -65,6 +64,15 @@ def get_config(
"--rpc-host=0.0.0.0",
"--rpc-host=0.0.0.0",
]
]
keymanager_api_cmd = [
"--rpc",
"--rpc-port={0}".format(vc_shared.VALIDATOR_HTTP_PORT_NUM),
"--rpc-host=0.0.0.0",
]
if cl_context.client_name != constants.CL_TYPE.prysm:
cmd.append("--enable-beacon-rest-api")
if len(extra_params) > 0:
if len(extra_params) > 0:
# 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 extra_params])
cmd.extend([param for param in extra_params])
...
...
static_files/genesis-generation-config/el-cl/values.env.tmpl
View file @
f6e1b136
export PRESET_BASE="{{ .Preset }}"
export CHAIN_ID="{{ .NetworkId }}"
export CHAIN_ID="{{ .NetworkId }}"
export DEPOSIT_CONTRACT_ADDRESS="{{ .DepositContractAddress }}"
export DEPOSIT_CONTRACT_ADDRESS="{{ .DepositContractAddress }}"
export EL_AND_CL_MNEMONIC="{{ .PreregisteredValidatorKeysMnemonic }}"
export EL_AND_CL_MNEMONIC="{{ .PreregisteredValidatorKeysMnemonic }}"
...
@@ -9,7 +10,6 @@ export GENESIS_FORK_VERSION="{{ .GenesisForkVersion }}"
...
@@ -9,7 +10,6 @@ export GENESIS_FORK_VERSION="{{ .GenesisForkVersion }}"
export ALTAIR_FORK_VERSION="0x20000038"
export ALTAIR_FORK_VERSION="0x20000038"
export BELLATRIX_FORK_VERSION="{{ .BellatrixForkVersion }}"
export BELLATRIX_FORK_VERSION="{{ .BellatrixForkVersion }}"
export CAPELLA_FORK_VERSION="{{ .CapellaForkVersion }}"
export CAPELLA_FORK_VERSION="{{ .CapellaForkVersion }}"
export CAPELLA_FORK_EPOCH="{{ .CapellaForkEpoch }}"
export DENEB_FORK_VERSION="{{ .DenebForkVersion }}"
export DENEB_FORK_VERSION="{{ .DenebForkVersion }}"
export DENEB_FORK_EPOCH="{{ .DenebForkEpoch }}"
export DENEB_FORK_EPOCH="{{ .DenebForkEpoch }}"
export ELECTRA_FORK_VERSION="{{ .ElectraForkVersion }}"
export ELECTRA_FORK_VERSION="{{ .ElectraForkVersion }}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment