diff --git a/consensus/types/src/chain_spec.rs b/consensus/types/src/chain_spec.rs index 0bd0acb96..f191eb867 100644 --- a/consensus/types/src/chain_spec.rs +++ b/consensus/types/src/chain_spec.rs @@ -611,9 +611,15 @@ pub struct Config { #[serde(default)] pub preset_base: String, + // TODO(merge): remove this default + #[serde(default = "default_terminal_total_difficulty")] #[serde(with = "eth2_serde_utils::quoted_u256")] pub terminal_total_difficulty: Uint256, + // TODO(merge): remove this default + #[serde(default = "default_terminal_block_hash")] pub terminal_block_hash: Hash256, + // TODO(merge): remove this default + #[serde(default = "default_terminal_block_hash_activation_epoch")] pub terminal_block_hash_activation_epoch: Epoch, #[serde(with = "eth2_serde_utils::quoted_u64")] @@ -682,6 +688,20 @@ fn default_bellatrix_fork_epoch() -> Option> { None } +fn default_terminal_total_difficulty() -> Uint256 { + "115792089237316195423570985008687907853269984665640564039457584007913129638912" + .parse() + .unwrap() +} + +fn default_terminal_block_hash() -> Hash256 { + Hash256::zero() +} + +fn default_terminal_block_hash_activation_epoch() -> Epoch { + Epoch::new(u64::MAX) +} + impl Default for Config { fn default() -> Self { let chain_spec = MainnetEthSpec::default_spec();