mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Modify BeaconState and BeaconBlockBody to reflect changes in the specs. Also add new variable LATEST_RANDAO_MIXES_LENGTH to foundation
Signed-off-by: Kirk Baird <kirk@sigmaprime.io>
This commit is contained in:
@@ -16,6 +16,9 @@ pub fn genesis_beacon_block(state_root: Hash256, spec: &ChainSpec) -> BeaconBloc
|
||||
proposer_slashings: vec![],
|
||||
casper_slashings: vec![],
|
||||
attestations: vec![],
|
||||
custody_reseeds: vec![],
|
||||
custody_challenges: vec![],
|
||||
custody_responses: vec![],
|
||||
deposits: vec![],
|
||||
exits: vec![],
|
||||
},
|
||||
|
||||
@@ -47,11 +47,13 @@ pub fn genesis_beacon_state(spec: &ChainSpec) -> Result<BeaconState, Error> {
|
||||
/*
|
||||
* Randomness and committees
|
||||
*/
|
||||
randao_mix: spec.zero_hash,
|
||||
next_seed: spec.zero_hash,
|
||||
latest_randao_mixes: vec![spec.zero_hash; spec.latest_randao_mixes_length as usize],
|
||||
latest_vdf_outputs: vec![spec.zero_hash; (spec.latest_randao_mixes_length / spec.epoch_length) as usize],
|
||||
shard_committees_at_slots: vec![],
|
||||
persistent_committees: vec![],
|
||||
persistent_committee_reassignments: vec![],
|
||||
/*
|
||||
* Custody challenges
|
||||
*/
|
||||
custody_challenges: vec![],
|
||||
/*
|
||||
* Finality
|
||||
*/
|
||||
@@ -66,6 +68,7 @@ pub fn genesis_beacon_state(spec: &ChainSpec) -> Result<BeaconState, Error> {
|
||||
latest_block_roots: vec![spec.zero_hash; spec.epoch_length as usize],
|
||||
latest_penalized_exit_balances: vec![],
|
||||
latest_attestations: vec![],
|
||||
batched_block_roots: vec![],
|
||||
/*
|
||||
* PoW receipt root
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user