From b007d5aa92f183be7eb8001db09d205767b2838b Mon Sep 17 00:00:00 2001 From: Diederik Loerakker Date: Sat, 22 Jun 2019 17:38:30 +0200 Subject: [PATCH] Add note on default zero-values, and be explicit with state-root (#1208) * Add note on default zero-values, and be explicit with state-root --- specs/core/0_beacon-chain.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index a955bcab8..094c04a11 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -180,9 +180,7 @@ The following values are (non-configurable) constants used throughout the specif ## Configuration -*Note*: The default mainnet configuration values are included here for spec-design purposes. -The different configurations for mainnet, testnets, and YAML-based testing can be found in the `configs/constant_presets/` directory. -These configurations are updated for releases, but may be out of sync during `dev` changes. +*Note*: The default mainnet configuration values are included here for spec-design purposes. The different configurations for mainnet, testnets, and YAML-based testing can be found in the `configs/constant_presets/` directory. These configurations are updated for releases and may be out of sync during `dev` changes. ### Misc @@ -292,6 +290,8 @@ The following types are [SimpleSerialize (SSZ)](../simple-serialize.md) containe *Note*: The definitions are ordered topologically to facilitate execution of the spec. +*Note*: Fields missing in container instantiations default to their zero value. + ### Misc dependencies #### `Fork` @@ -1585,6 +1585,7 @@ def process_block_header(state: BeaconState, block: BeaconBlock) -> None: state.latest_block_header = BeaconBlockHeader( slot=block.slot, parent_root=block.parent_root, + state_root=ZERO_HASH, # Overwritten in next `process_slot` call body_root=hash_tree_root(block.body), ) # Verify proposer is not slashed