From 6cbef7b58bc84c43c1dcbf29d5e9eef63fd7c7ad Mon Sep 17 00:00:00 2001 From: Luke Anderson Date: Thu, 5 Sep 2019 20:06:46 +1000 Subject: [PATCH] Undoing changes to ChainSpec. The discrepancies from the Eth2.0 spec are necessary in our case. --- docs/api_spec.yaml | 4 ---- eth2/types/src/chain_spec.rs | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/api_spec.yaml b/docs/api_spec.yaml index ced07e96d..23608807e 100644 --- a/docs/api_spec.yaml +++ b/docs/api_spec.yaml @@ -1896,10 +1896,6 @@ components: type: object description: "Stores all of the values which specify a particular chain. The `ChainSpec` object in Lighthouse" properties: - far_future_epoch: - type: integer - format: uint64 - example: 18446744073709551615 base_rewards_per_epoch: type: integer format: uint64 diff --git a/eth2/types/src/chain_spec.rs b/eth2/types/src/chain_spec.rs index 17e9dba49..d59e0db0a 100644 --- a/eth2/types/src/chain_spec.rs +++ b/eth2/types/src/chain_spec.rs @@ -24,13 +24,11 @@ pub struct ChainSpec { /* * Constants */ + #[serde(skip_serializing)] // skipped because Serde TOML has trouble with u64::max pub far_future_epoch: Epoch, - // The above may need to be skipped because Serde TOML has trouble with u64::max. - // Use: #[serde(skip_serializing)] pub base_rewards_per_epoch: u64, pub deposit_contract_tree_depth: u64, pub seconds_per_day: u64, - //TODO missing JUSTIFICATION_BITS_LENGTH and ENDIANNESS /* * Misc @@ -54,7 +52,6 @@ pub struct ChainSpec { * Initial Values */ pub genesis_slot: Slot, - //TODO Missing genesis_epoch #[serde(deserialize_with = "u8_from_hex_str", serialize_with = "u8_to_hex_str")] pub bls_withdrawal_prefix_byte: u8, @@ -62,7 +59,6 @@ pub struct ChainSpec { * Time parameters */ pub milliseconds_per_slot: u64, - //TODO should we also have SECONDS_PER_SLOT? pub min_attestation_inclusion_delay: u64, pub min_seed_lookahead: Epoch, pub activation_exit_delay: u64,