diff --git a/common/eth2_config/src/lib.rs b/common/eth2_config/src/lib.rs index e5ad1909caf..45f398f327e 100644 --- a/common/eth2_config/src/lib.rs +++ b/common/eth2_config/src/lib.rs @@ -117,3 +117,10 @@ define_net!( "altair-devnet-0", true ); + +define_net!( + altair_devnet_1, + include_altair_devnet_1_file, + "altair-devnet-1", + true +); diff --git a/common/eth2_network_config/build.rs b/common/eth2_network_config/build.rs index 9a060cb075b..c9cab5dc903 100644 --- a/common/eth2_network_config/build.rs +++ b/common/eth2_network_config/build.rs @@ -1,6 +1,7 @@ //! Extracts zipped genesis states on first run. use eth2_config::{ - altair_devnet_0, mainnet, prater, pyrmont, Eth2NetArchiveAndDirectory, GENESIS_FILE_NAME, + altair_devnet_0, altair_devnet_1, mainnet, prater, pyrmont, Eth2NetArchiveAndDirectory, + GENESIS_FILE_NAME, }; use std::fs::File; use std::io; @@ -11,6 +12,7 @@ const ETH2_NET_DIRS: &[Eth2NetArchiveAndDirectory<'static>] = &[ pyrmont::ETH2_NET_DIR, prater::ETH2_NET_DIR, altair_devnet_0::ETH2_NET_DIR, + altair_devnet_1::ETH2_NET_DIR, ]; fn main() { diff --git a/common/eth2_network_config/built_in_network_configs/altair-devnet-1/boot_enr.yaml b/common/eth2_network_config/built_in_network_configs/altair-devnet-1/boot_enr.yaml new file mode 100644 index 00000000000..f5e486bb01a --- /dev/null +++ b/common/eth2_network_config/built_in_network_configs/altair-devnet-1/boot_enr.yaml @@ -0,0 +1,3 @@ +# EF bootnode +# # /ip4/18.192.182.103/udp/9000/p2p/16Uiu2HAmVHXRwinNmyfyN9jVTR7wbKuGd8dEkSLX3iTQThpMNAXi +- enr:-Ku4QJTSfjugOE_5xyEDYceUlHTd8QiP1QF5q4o6APwk9V7QXV6POQKfhXixhLNMI-_-tGRRorbzR_vMAFe_vQT5XWYBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpCFITryGVBHAP__________gmlkgnY0gmlwhBLAtmeJc2VjcDI1NmsxoQP3FwrhFYB60djwRjAoOjttq6du94DtkQuaN99wvgqaIYN1ZHCCIyg diff --git a/common/eth2_network_config/built_in_network_configs/altair-devnet-1/config.yaml b/common/eth2_network_config/built_in_network_configs/altair-devnet-1/config.yaml new file mode 100644 index 00000000000..329e321fa24 --- /dev/null +++ b/common/eth2_network_config/built_in_network_configs/altair-devnet-1/config.yaml @@ -0,0 +1,73 @@ +# Altair interop devnet config + +# Extends the mainnet preset +PRESET_BASE: 'mainnet' + +CONFIG_NAME: "altair-devnet-1" + +# Genesis +# --------------------------------------------------------------- +MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 10000 +# July 14, 2021, 12pm UTC +MIN_GENESIS_TIME: 1626264000 +# Location for the altair star is 19h 50m 46.99855 + 1, since its the second devnet +GENESIS_FORK_VERSION: 0x19504700 +# 86400 seconds (1 day) +GENESIS_DELAY: 86400 + + +# Forking +# --------------------------------------------------------------- +# Some forks are disabled for now: +# - These may be re-assigned to another fork-version later +# - Temporarily set to max uint64 value: 2**64 - 1 + +# Altair +# increasing altair fork version by 1 to differentiate from altair-devnet-0 +ALTAIR_FORK_VERSION: 0x01000001 +ALTAIR_FORK_EPOCH: 10 +# Merge +MERGE_FORK_VERSION: 0x02000000 +MERGE_FORK_EPOCH: 18446744073709551615 +# Sharding +SHARDING_FORK_VERSION: 0x03000000 +SHARDING_FORK_EPOCH: 18446744073709551615 + +# TBD, 2**32 is a placeholder. Merge transition approach is in active R&D. +MIN_ANCHOR_POW_BLOCK_DIFFICULTY: 4294967296 + + +# Time parameters +# --------------------------------------------------------------- +# 12 seconds +SECONDS_PER_SLOT: 12 +# 14 (estimate from Eth1 mainnet) +SECONDS_PER_ETH1_BLOCK: 14 +# 2**8 (= 256) epochs ~27 hours +MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256 +# 2**8 (= 256) epochs ~27 hours +SHARD_COMMITTEE_PERIOD: 256 +# 2**11 (= 2,048) Eth1 blocks ~8 hours +ETH1_FOLLOW_DISTANCE: 2048 + + +# Validator cycle +# --------------------------------------------------------------- +# 2**2 (= 4) +INACTIVITY_SCORE_BIAS: 4 +# 2**4 (= 16) +INACTIVITY_SCORE_RECOVERY_RATE: 16 +# 2**4 * 10**9 (= 16,000,000,000) Gwei +EJECTION_BALANCE: 16000000000 +# 2**2 (= 4) +MIN_PER_EPOCH_CHURN_LIMIT: 4 +# 2**16 (= 65,536) +CHURN_LIMIT_QUOTIENT: 65536 + + +# Deposit contract +# --------------------------------------------------------------- +# Ethereum Goerli testnet +DEPOSIT_CHAIN_ID: 5 +DEPOSIT_NETWORK_ID: 5 +DEPOSIT_CONTRACT_ADDRESS: 0x5004957f885F5A5408e6Ff50B338435aD3fE4E17 diff --git a/common/eth2_network_config/built_in_network_configs/altair-devnet-1/deploy_block.txt b/common/eth2_network_config/built_in_network_configs/altair-devnet-1/deploy_block.txt new file mode 100644 index 00000000000..baa7718f058 --- /dev/null +++ b/common/eth2_network_config/built_in_network_configs/altair-devnet-1/deploy_block.txt @@ -0,0 +1 @@ +5110538 diff --git a/common/eth2_network_config/built_in_network_configs/altair-devnet-1/genesis.ssz.zip b/common/eth2_network_config/built_in_network_configs/altair-devnet-1/genesis.ssz.zip new file mode 100644 index 00000000000..d8536ccbb81 Binary files /dev/null and b/common/eth2_network_config/built_in_network_configs/altair-devnet-1/genesis.ssz.zip differ diff --git a/common/eth2_network_config/src/lib.rs b/common/eth2_network_config/src/lib.rs index 3c2c4af2044..e0ef0253f43 100644 --- a/common/eth2_network_config/src/lib.rs +++ b/common/eth2_network_config/src/lib.rs @@ -40,8 +40,10 @@ const PYRMONT: HardcodedNet = define_net!(pyrmont, include_pyrmont_file); const MAINNET: HardcodedNet = define_net!(mainnet, include_mainnet_file); const PRATER: HardcodedNet = define_net!(prater, include_prater_file); const ALTAIR_DEVNET_0: HardcodedNet = define_net!(altair_devnet_0, include_altair_devnet_0_file); +const ALTAIR_DEVNET_1: HardcodedNet = define_net!(altair_devnet_1, include_altair_devnet_1_file); -const HARDCODED_NETS: &[HardcodedNet] = &[PYRMONT, MAINNET, PRATER, ALTAIR_DEVNET_0]; +const HARDCODED_NETS: &[HardcodedNet] = + &[PYRMONT, MAINNET, PRATER, ALTAIR_DEVNET_0, ALTAIR_DEVNET_1]; pub const DEFAULT_HARDCODED_NETWORK: &str = "mainnet"; /// Specifies an Eth2 network. diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index f728e97c669..1b4f127082e 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -123,7 +123,7 @@ fn main() { .long("network") .value_name("network") .help("Name of the Eth2 chain Lighthouse will sync and follow.") - .possible_values(&["pyrmont", "mainnet", "prater", "altair-devnet-0"]) + .possible_values(&["pyrmont", "mainnet", "prater", "altair-devnet-0", "altair-devnet-1"]) .conflicts_with("testnet-dir") .takes_value(true) .global(true)