Update to spec v0.11 (#959)

* Update process_final_updates() hysteresis computation

* Update core to v0.11.1

* Bump tags to v0.11.1

* Update docs and deposit contract

* Add compute_fork_digest

* Address review comments

Co-authored-by: Herman Alonso Junge <alonso.junge@gmail.com>
This commit is contained in:
Michael Sproul
2020-04-01 22:03:03 +11:00
committed by GitHub
parent e04fc8ddb4
commit 26bdc2927b
84 changed files with 1060 additions and 496 deletions

View File

@@ -11,7 +11,7 @@ use types::*;
///
/// Utilises lazy-loading from separate storage for its vector fields.
///
/// Spec v0.10.1
/// Spec v0.11.1
#[derive(Debug, PartialEq, Clone, Encode, Decode)]
pub struct PartialBeaconState<T>
where
@@ -19,6 +19,7 @@ where
{
// Versioning
pub genesis_time: u64,
pub genesis_validators_root: Hash256,
pub slot: Slot,
pub fork: Fork,
@@ -72,6 +73,7 @@ impl<T: EthSpec> PartialBeaconState<T> {
// TODO: could use references/Cow for fields to avoid cloning
PartialBeaconState {
genesis_time: s.genesis_time,
genesis_validators_root: s.genesis_validators_root,
slot: s.slot,
fork: s.fork.clone(),
@@ -181,6 +183,7 @@ impl<E: EthSpec> TryInto<BeaconState<E>> for PartialBeaconState<E> {
Ok(BeaconState {
genesis_time: self.genesis_time,
genesis_validators_root: self.genesis_validators_root,
slot: self.slot,
fork: self.fork,