spec v0.6: update beacon_node, validator_client

This commit is contained in:
Michael Sproul
2019-06-03 16:13:51 +10:00
parent 7fbcdd54d7
commit 6bde64bd6a
7 changed files with 26 additions and 16 deletions

View File

@@ -75,6 +75,7 @@ fn test_yaml_vectors(
let spec = FoundationEthSpec::spec();
let zero_hash = Hash256::zero();
let eth1_data = Eth1Data {
deposit_count: 0,
deposit_root: zero_hash.clone(),
block_hash: zero_hash.clone(),
};
@@ -83,6 +84,7 @@ fn test_yaml_vectors(
let body = BeaconBlockBody {
eth1_data,
randao_reveal,
graffiti: [0; 32],
proposer_slashings: vec![],
attester_slashings: vec![],
attestations: vec![],

View File

@@ -67,7 +67,7 @@ fn invalid_block_signature() {
let keypair = Keypair::random();
let message = block.signed_root();
let epoch = block.slot.epoch(spec.slots_per_epoch);
let domain = spec.get_domain(epoch, Domain::BeaconBlock, &state.fork);
let domain = spec.get_domain(epoch, Domain::BeaconProposer, &state.fork);
block.signature = Signature::new(&message, domain, &keypair.sk);
// process block with invalid block signature

View File

@@ -738,11 +738,9 @@ impl<T: EthSpec> BeaconState<T> {
/// Returns the `slot`, `shard` and `committee_index` for which a validator must produce an
/// attestation.
///
/// Only reads the current epoch.
///
/// Note: Utilizes the cache and will fail if the appropriate cache is not initialized.
///
/// Spec v0.5.1
/// Spec v0.6.2
pub fn get_attestation_duties(
&self,
validator_index: usize,