Skip to content

Commit

Permalink
Bake in altair-devnet-2
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhauner committed Jul 28, 2021
1 parent ff1f92e commit 6250b6c
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 6 deletions.
7 changes: 7 additions & 0 deletions common/eth2_config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,10 @@ define_net!(
"altair-devnet-1",
true
);

define_net!(
altair_devnet_2,
include_altair_devnet_2_file,
"altair-devnet-2",
true
);
5 changes: 3 additions & 2 deletions common/eth2_network_config/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Extracts zipped genesis states on first run.
use eth2_config::{
altair_devnet_0, altair_devnet_1, mainnet, prater, pyrmont, Eth2NetArchiveAndDirectory,
GENESIS_FILE_NAME,
altair_devnet_0, altair_devnet_1, altair_devnet_2, mainnet, prater, pyrmont,
Eth2NetArchiveAndDirectory, GENESIS_FILE_NAME,
};
use std::fs::File;
use std::io;
Expand All @@ -13,6 +13,7 @@ const ETH2_NET_DIRS: &[Eth2NetArchiveAndDirectory<'static>] = &[
prater::ETH2_NET_DIR,
altair_devnet_0::ETH2_NET_DIR,
altair_devnet_1::ETH2_NET_DIR,
altair_devnet_2::ETH2_NET_DIR,
];

fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# EF bootnode
# # /ip4/18.184.200.173/udp/9000/p2p/16Uiu2HAm8KdBVKsRWCGa2T5wpMjCVnYqvYDiN2CFJeEmmo3t3MbU
- enr:-Ku4QLEvQ0IJnMGeZn1RsiPXvIho0LH8_XmHzq9FiF1uuwAdcFxt94-qfoT7VrBxU3-Nt7t-R3luvFhJlcCQI6VDV0oBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpCKO0zOGVBHAf__________gmlkgnY0gmlwhBK4yK2Jc2VjcDI1NmsxoQK_m0f1DzDc9Cjrspm36zuRa7072HSiMGYWLsKiVSbP34N1ZHCCIyg
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Altair interop devnet config

# Extends the mainnet preset
PRESET_BASE: 'mainnet'

CONFIG_NAME: "altair-devnet-2"

# Genesis
# ---------------------------------------------------------------
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 13000
# July 28, 2021, 12pm UTC
MIN_GENESIS_TIME: 1627473600
# Location for the altair star is 19h 50m 46.99855 + 2, since its the third devnet
GENESIS_FORK_VERSION: 0x19504701
# 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-1
ALTAIR_FORK_VERSION: 0x01000002
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: 0xF40eb070317e56F243ea1968882d2938D4125a69
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5208017
Binary file not shown.
13 changes: 10 additions & 3 deletions common/eth2_network_config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,16 @@ 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, ALTAIR_DEVNET_1];
const ALTAIR_DEVNET_2: HardcodedNet = define_net!(altair_devnet_2, include_altair_devnet_2_file);

const HARDCODED_NETS: &[HardcodedNet] = &[
PYRMONT,
MAINNET,
PRATER,
ALTAIR_DEVNET_0,
ALTAIR_DEVNET_1,
ALTAIR_DEVNET_2,
];
pub const DEFAULT_HARDCODED_NETWORK: &str = "mainnet";

/// Specifies an Eth2 network.
Expand Down
2 changes: 1 addition & 1 deletion lighthouse/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,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", "altair-devnet-1"])
.possible_values(&["pyrmont", "mainnet", "prater", "altair-devnet-0", "altair-devnet-1", "altair-devnet-2"])
.conflicts_with("testnet-dir")
.takes_value(true)
.global(true)
Expand Down

0 comments on commit 6250b6c

Please sign in to comment.