Commit 49509b9e authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

feat: make deneb genesis default (#518)

parent f595eb9a
participants:
- el_type: geth
cl_type: teku
- el_type: nethermind
cl_type: prysm
- el_type: erigon
cl_type: nimbus
- el_type: besu
cl_type: lighthouse
- el_type: reth
cl_type: lodestar
- el_type: ethereumjs
cl_type: teku
network_params:
network: "dencun-devnet-12"
additional_services: []
participants:
- el_type: besu
cl_type: lighthouse
- el_type: geth
cl_type: teku
use_separate_vc: true
- el_type: nethermind
cl_type: prysm
- el_type: besu
cl_type: lighthouse
- el_type: erigon
cl_type: nimbus
use_separate_vc: true
......
......@@ -12,5 +12,5 @@ participants:
- el_type: ethereumjs
cl_type: teku
network_params:
capella_fork_epoch: 1
deneb_fork_epoch: 1
additional_services: []
participants:
- el_type: geth
el_image: ethpandaops/geth:gballet-kaustinen-with-shapella-fcdcd3b
cl_type: lodestar
cl_image: ethpandaops/lodestar:g11tech-verge-815364b
- el_type: geth
el_image: ethpandaops/geth:gballet-kaustinen-with-shapella-fcdcd3b
cl_type: lighthouse
cl_image: ethpandaops/lighthouse:verkle-trees-capella-2ffb8a9
- el_type: besu
el_image: ethpandaops/besu:matkt-fork-verkle-f2e19f9
cl_type: lodestar
cl_image: ethpandaops/lodestar:g11tech-verge-815364b
validator_count: 10
- el_type: besu
el_image: ethpandaops/besu:matkt-fork-verkle-f2e19f9
cl_type: lighthouse
cl_image: ethpandaops/lighthouse:verkle-trees-capella-2ffb8a9
validator_count: 10
network_params:
electra_fork_epoch: 0
additional_services:
- el_forkmon
- dora
snooper_enabled: true
participants:
- el_type: geth
el_image: ethpandaops/geth:transition-post-genesis-04b0304
cl_type: lighthouse
cl_image: ethpandaops/lighthouse:verkle-trees-capella-2ffb8a9
count: 2
- el_type: geth
el_image: ethpandaops/geth:transition-post-genesis-04b0304
cl_type: lodestar
cl_image: ethpandaops/lodestar:g11tech-verge-815364b
network_params:
electra_fork_epoch: 1
additional_services:
- el_forkmon
- tx_spammer
- dora
snooper_enabled: true
......@@ -492,10 +492,9 @@ network_params:
# Defaults to 256 epoch ~27 hours
shard_committee_period: 256
# The epoch at which the capella/deneb/electra forks are set to occur.
capella_fork_epoch: 0
deneb_fork_epoch: 4
electra_fork_epoch: null
# The epoch at which the deneb/electra forks are set to occur.
deneb_fork_epoch: 0
electra_fork_epoch: 500
# Network sync base url for syncing public networks from a custom snapshot (mostly useful for shadowforks)
# Defaults to "https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/
......@@ -640,7 +639,6 @@ persistent: false
# Default: "null" - no mev boost, mev builder, mev flood or relays are spun up
# "mock" - mock-builder & mev-boost are spun up
# "full" - mev-boost, relays, flooder and builder are all spun up
# Users are recommended to set network_params.capella_fork_epoch to non zero when testing MEV
# We have seen instances of multibuilder instances failing to start mev-relay-api with non zero epochs
mev_type: null
......@@ -750,8 +748,7 @@ participants:
cl_type: lighthouse
cl_image: sigp/lighthouse:latest
network_params:
capella_fork_epoch: 2
deneb_fork_epoch: 4
deneb_fork_epoch: 0
additional_services: []
wait_for_finalization: false
wait_for_verifications: false
......@@ -803,7 +800,7 @@ participants:
count: 2
mev_type: full
network_params:
capella_fork_epoch: 1
deneb_fork_epoch: 1
additional_services: []
```
......@@ -894,8 +891,6 @@ Starting your network up with `"mev_type": "full"` will instantiate and connect
* After the 3rd epoch, the mev-relay service will begin to receive execution payloads (eth_sendPayload, which does not contain transaction content) from the mev-builder service (or mock-builder in mock-mev mode).
* Validators will start to receive validated execution payload headers from the mev-relay service (via mev-boost) after the 4th epoch. The validator selects the most valuable header, signs the payload, and returns the signed header to the relay - effectively proposing the payload of transactions to be included in the soon-to-be-proposed block. Once the relay verifies the block proposer's signature, the relay will respond with the full execution payload body (incl. the transaction contents) for the validator to use when proposing a SignedBeaconBlock to the network.
It is recommended to use non zero value for `capella_fork_epoch` by setting `network_params.capella_fork_epoch` to a non-zero value
in the arguments passed with `mev_type` set to `full`.
</details>
This package also supports a `"mev_type": "mock"` mode that will only bring up:
......@@ -905,15 +900,6 @@ This package also supports a `"mev_type": "mock"` mode that will only bring up:
For more details, including a guide and architecture of the `mev-boost` infrastructure, go [here](https://docs.kurtosis.com/how-to-full-mev-with-ethereum-package/).
## MEV-Boost usage with Capella at Epoch 0
This note is from 2023-10-05
`flashbots/mev-boost-relay:0.27` and later support `capella_fork_epoch` at `0` but this seems to require a few flags enabled
on the `lighthouse` beacon client including `--always-prefer-builder-payload` and `--disable-peer-scoring`
Users are recommended to browse the example tests [`./.github/tests`](./.github/tests); as inspiration for different ways to use the package.
## Pre-funded accounts at Genesis
This package comes with [seven prefunded keys for testing](https://github.com/kurtosis-tech/ethereum-package/blob/main/src/prelaunch_data_generator/genesis_constants/genesis_constants.star).
......
......@@ -223,7 +223,7 @@ def run(plan, args={}):
recipe=epoch_recipe,
field="extract.epoch",
assertion=">=",
target_value=str(network_params.capella_fork_epoch),
target_value=str(network_params.deneb_fork_epoch),
timeout="20m",
service_name=first_client_beacon_name,
)
......
......@@ -69,9 +69,8 @@ network_params:
eth1_follow_distance: 2048
min_validator_withdrawability_delay: 256
shard_committee_period: 256
capella_fork_epoch: 0
deneb_fork_epoch: 4
electra_fork_epoch: null
deneb_fork_epoch: 0
electra_fork_epoch: 500
network_sync_base_url: https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/
additional_services:
- tx_spammer
......
......@@ -127,7 +127,6 @@ def launch(
el_volume_size,
tolerations,
node_selectors,
launcher.electra_fork_epoch,
)
service = plan.add_service(service_name, config)
......@@ -173,7 +172,6 @@ def get_config(
el_volume_size,
tolerations,
node_selectors,
electra_fork_epoch,
):
cmd = [
"besu",
......@@ -198,9 +196,7 @@ def get_config(
"--engine-rpc-port={0}".format(ENGINE_HTTP_RPC_PORT_NUM),
"--sync-mode=FULL",
"--data-storage-format={0}".format(
"VERKLE"
if electra_fork_epoch != None or "verkle-gen" in network
else "BONSAI"
"VERKLE" if "verkle-gen" in network else "BONSAI"
),
"--metrics-enabled=true",
"--metrics-host=0.0.0.0",
......@@ -280,10 +276,9 @@ def get_config(
)
def new_besu_launcher(el_cl_genesis_data, jwt_file, network, electra_fork_epoch=None):
def new_besu_launcher(el_cl_genesis_data, jwt_file, network):
return struct(
el_cl_genesis_data=el_cl_genesis_data,
jwt_file=jwt_file,
network=network,
electra_fork_epoch=electra_fork_epoch,
)
......@@ -31,10 +31,8 @@ def launch(
jwt_file,
network_params.network,
network_id,
network_params.capella_fork_epoch,
el_cl_data.cancun_time,
el_cl_data.prague_time,
network_params.electra_fork_epoch,
),
"launch_method": geth.launch,
},
......@@ -44,10 +42,8 @@ def launch(
jwt_file,
network_params.network,
network_id,
network_params.capella_fork_epoch,
el_cl_data.cancun_time,
el_cl_data.prague_time,
network_params.electra_fork_epoch,
),
"launch_method": geth.launch,
},
......@@ -56,7 +52,6 @@ def launch(
el_cl_data,
jwt_file,
network_params.network,
network_params.electra_fork_epoch,
),
"launch_method": besu.launch,
},
......
......@@ -135,8 +135,6 @@ def launch(
extra_params,
extra_env_vars,
extra_labels,
launcher.capella_fork_epoch,
launcher.electra_fork_epoch,
launcher.cancun_time,
launcher.prague_time,
persistent,
......@@ -187,8 +185,6 @@ def get_config(
extra_params,
extra_env_vars,
extra_labels,
capella_fork_epoch,
electra_fork_epoch,
cancun_time,
prague_time,
persistent,
......@@ -198,11 +194,9 @@ def get_config(
):
# TODO: Remove this once electra fork has path based storage scheme implemented
if (
electra_fork_epoch != None or constants.NETWORK_NAME.verkle in network
constants.NETWORK_NAME.verkle in network
) and constants.NETWORK_NAME.shadowfork not in network:
if (
electra_fork_epoch == 0 or constants.NETWORK_NAME.verkle + "-gen" in network
): # verkle-gen
if constants.NETWORK_NAME.verkle + "-gen" in network: # verkle-gen
init_datadir_cmd_str = "geth --datadir={0} --cache.preimages --override.prague={1} init {2}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
prague_time,
......@@ -215,11 +209,6 @@ def get_config(
constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json",
)
)
elif "--builder" in extra_params or capella_fork_epoch != 0:
init_datadir_cmd_str = "geth init --datadir={0} {1}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json",
)
elif constants.NETWORK_NAME.shadowfork in network:
init_datadir_cmd_str = "echo shadowfork"
else:
......@@ -230,29 +219,14 @@ def get_config(
cmd = [
"geth",
# Disable path based storage scheme for electra fork or when builder image or when capella is not 0 is used
# Disable path based storage scheme for electra fork and verkle
# TODO: REMOVE Once geth default db is path based, and builder rebased
# TODO: capella fork epoch check is needed to ensure older versions of geth works.
"{0}".format(
"--state.scheme=path"
if electra_fork_epoch == None
and "verkle" not in network
and constants.NETWORK_NAME.shadowfork not in network # for now
and "--builder" not in extra_params
and capella_fork_epoch == 0
else ""
),
"{0}".format("--state.scheme=path" if "verkle" not in network else ""),
# Override prague fork timestamp for electra fork
"{0}".format("--cache.preimages" if "verkle" in network else ""),
# Override prague fork timestamp
"{0}".format(
"--cache.preimages"
if electra_fork_epoch != None or "verkle" in network
else ""
),
# Override prague fork timestamp if electra_fork_epoch == 0
"{0}".format(
"--override.prague=" + str(prague_time)
if electra_fork_epoch == 0 or "verkle-gen" in network
else ""
"--override.prague=" + str(prague_time) if "verkle-gen" in network else ""
),
"{0}".format(
"--{}".format(network) if network in constants.PUBLIC_NETWORKS else ""
......@@ -386,18 +360,14 @@ def new_geth_launcher(
jwt_file,
network,
networkid,
capella_fork_epoch,
cancun_time,
prague_time,
electra_fork_epoch=None,
):
return struct(
el_cl_genesis_data=el_cl_genesis_data,
jwt_file=jwt_file,
network=network,
networkid=networkid,
capella_fork_epoch=capella_fork_epoch,
cancun_time=cancun_time,
prague_time=prague_time,
electra_fork_epoch=electra_fork_epoch,
)
......@@ -51,24 +51,12 @@ def launch(plan, network_params, participants, parallel_keystore_generation):
plan.print("Generating EL CL data")
# we are running bellatrix genesis (deprecated) - will be removed in the future
if (
network_params.capella_fork_epoch > 0
and network_params.electra_fork_epoch == None
):
ethereum_genesis_generator_image = (
constants.ETHEREUM_GENESIS_GENERATOR.bellatrix_genesis
)
# we are running capella genesis - default behavior
elif (
network_params.capella_fork_epoch == 0
and network_params.electra_fork_epoch == None
and network_params.deneb_fork_epoch > 0
):
# we are running capella genesis - deprecated
if network_params.deneb_fork_epoch > 0:
ethereum_genesis_generator_image = (
constants.ETHEREUM_GENESIS_GENERATOR.capella_genesis
)
# we are running deneb genesis - experimental, soon to become default
# we are running deneb genesis - default behavior
elif network_params.deneb_fork_epoch == 0:
ethereum_genesis_generator_image = (
constants.ETHEREUM_GENESIS_GENERATOR.deneb_genesis
......@@ -85,7 +73,7 @@ def launch(plan, network_params, participants, parallel_keystore_generation):
)
else:
fail(
"Unsupported fork epoch configuration, need to define either capella_fork_epoch, deneb_fork_epoch or electra_fork_epoch"
"Unsupported fork epoch configuration, need to define either deneb_fork_epoch or electra_fork_epoch"
)
return (
total_number_of_validator_keys,
......
......@@ -74,11 +74,10 @@ DENEB_FORK_VERSION = "0x50000038"
ELECTRA_FORK_VERSION = "0x60000038"
ETHEREUM_GENESIS_GENERATOR = struct(
bellatrix_genesis="ethpandaops/ethereum-genesis-generator:1.3.15", # EOL
capella_genesis="ethpandaops/ethereum-genesis-generator:2.0.12", # Default
deneb_genesis="ethpandaops/ethereum-genesis-generator:default-deneb-genesis", # Soon to become default
verkle_support_genesis="ethpandaops/ethereum-genesis-generator:3.0.0-rc.19", # soon to be deneb genesis
verkle_genesis="ethpandaops/ethereum-genesis-generator:4.0.0-rc.7",
capella_genesis="ethpandaops/ethereum-genesis-generator:2.0.12", # Deprecated
deneb_genesis="ethpandaops/ethereum-genesis-generator:3.0.0", # Default
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",
)
NETWORK_NAME = struct(
......
......@@ -150,18 +150,6 @@ def input_parser(plan, input_args):
result.get("mev_type"),
)
if (
result.get("mev_type") == "full"
and result["network_params"]["capella_fork_epoch"] == 0
and result["mev_params"]["mev_relay_image"]
== MEV_BOOST_RELAY_IMAGE_NON_ZERO_CAPELLA
):
fail(
"The default MEV image {0} requires a non-zero value for capella fork epoch set via network_params.capella_fork_epoch".format(
MEV_BOOST_RELAY_IMAGE_NON_ZERO_CAPELLA
)
)
return struct(
participants=[
struct(
......@@ -239,7 +227,6 @@ def input_parser(plan, input_args):
max_churn=result["network_params"]["max_churn"],
ejection_balance=result["network_params"]["ejection_balance"],
eth1_follow_distance=result["network_params"]["eth1_follow_distance"],
capella_fork_epoch=result["network_params"]["capella_fork_epoch"],
deneb_fork_epoch=result["network_params"]["deneb_fork_epoch"],
electra_fork_epoch=result["network_params"]["electra_fork_epoch"],
network=result["network_params"]["network"],
......@@ -498,16 +485,6 @@ def parse_network_params(input_args):
if result["network_params"]["seconds_per_slot"] == 0:
fail("seconds_per_slot is 0 needs to be > 0 ")
if result["network_params"]["electra_fork_epoch"] != None:
# if electra is defined, then deneb needs to be set very high
result["network_params"]["deneb_fork_epoch"] = HIGH_DENEB_VALUE_FORK_VERKLE
if (
result["network_params"]["capella_fork_epoch"] > 0
and result["network_params"]["electra_fork_epoch"] != None
):
fail("electra can only happen with capella genesis not bellatrix")
if (
result["network_params"]["network"] == constants.NETWORK_NAME.kurtosis
or constants.NETWORK_NAME.shadowfork in result["network_params"]["network"]
......@@ -624,9 +601,8 @@ def default_network_params():
"eth1_follow_distance": 2048,
"min_validator_withdrawability_delay": 256,
"shard_committee_period": 256,
"capella_fork_epoch": 0,
"deneb_fork_epoch": 4,
"electra_fork_epoch": None,
"deneb_fork_epoch": 0,
"electra_fork_epoch": 500,
"network_sync_base_url": "https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/",
}
......
......@@ -98,7 +98,6 @@ def launch_participant_network(
network_params.max_churn,
network_params.ejection_balance,
network_params.eth1_follow_distance,
network_params.capella_fork_epoch,
network_params.deneb_fork_epoch,
network_params.electra_fork_epoch,
latest_block.files_artifacts[0] if latest_block != "" else "",
......
......@@ -23,7 +23,6 @@ def generate_el_cl_genesis_data(
max_churn,
ejection_balance,
eth1_follow_distance,
capella_fork_epoch,
deneb_fork_epoch,
electra_fork_epoch,
latest_block,
......@@ -47,7 +46,6 @@ def generate_el_cl_genesis_data(
max_churn,
ejection_balance,
eth1_follow_distance,
capella_fork_epoch,
deneb_fork_epoch,
electra_fork_epoch,
shadowfork_file,
......@@ -123,7 +121,6 @@ def new_env_file_for_el_cl_genesis_data(
max_churn,
ejection_balance,
eth1_follow_distance,
capella_fork_epoch,
deneb_fork_epoch,
electra_fork_epoch,
shadowfork_file,
......@@ -141,7 +138,6 @@ def new_env_file_for_el_cl_genesis_data(
"MaxChurn": max_churn,
"EjectionBalance": ejection_balance,
"Eth1FollowDistance": eth1_follow_distance,
"CapellaForkEpoch": capella_fork_epoch,
"DenebForkEpoch": deneb_fork_epoch,
"ElectraForkEpoch": electra_fork_epoch,
"GenesisForkVersion": constants.GENESIS_FORK_VERSION,
......
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