Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add merge spec constants to config #2663

Merged
merged 1 commit into from
Oct 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions consensus/types/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,12 @@ pub struct Config {
#[serde(deserialize_with = "deserialize_fork_epoch")]
pub altair_fork_epoch: Option<MaybeQuoted<Epoch>>,

#[serde(with = "eth2_serde_utils::bytes_4_hex")]
merge_fork_version: [u8; 4],
#[serde(serialize_with = "serialize_fork_epoch")]
#[serde(deserialize_with = "deserialize_fork_epoch")]
pub merge_fork_epoch: Option<MaybeQuoted<Epoch>>,

#[serde(with = "eth2_serde_utils::quoted_u64")]
seconds_per_slot: u64,
#[serde(with = "eth2_serde_utils::quoted_u64")]
Expand Down Expand Up @@ -659,6 +665,10 @@ impl Config {
altair_fork_epoch: spec
.altair_fork_epoch
.map(|epoch| MaybeQuoted { value: epoch }),
merge_fork_version: spec.merge_fork_version,
merge_fork_epoch: spec
.merge_fork_epoch
.map(|epoch| MaybeQuoted { value: epoch }),

seconds_per_slot: spec.seconds_per_slot,
seconds_per_eth1_block: spec.seconds_per_eth1_block,
Expand Down Expand Up @@ -695,6 +705,8 @@ impl Config {
genesis_delay,
altair_fork_version,
altair_fork_epoch,
merge_fork_epoch,
merge_fork_version,
seconds_per_slot,
seconds_per_eth1_block,
min_validator_withdrawability_delay,
Expand All @@ -721,6 +733,8 @@ impl Config {
genesis_delay,
altair_fork_version,
altair_fork_epoch: altair_fork_epoch.map(|q| q.value),
merge_fork_epoch: merge_fork_epoch.map(|q| q.value),
merge_fork_version,
seconds_per_slot,
seconds_per_eth1_block,
min_validator_withdrawability_delay,
Expand Down