Update consensus code and tests to v0.12.3 (#1655)

## Proposed Changes

Update test vectors for v0.12.3, and introduced configurable `proportional_slashing_multiplier`.

Also makes `YamlConfig` a bit safer by making every field access in `apply_to_chain_spec` explicit, and removing the `#[serde(default)]` attribute, which would instantiate missing fields to type defaults! Risky!
This commit is contained in:
Michael Sproul
2020-09-26 01:58:29 +00:00
parent 3412a3ec54
commit 258b28469e
9 changed files with 264 additions and 100 deletions

View File

@@ -3,7 +3,7 @@
use environment::EnvironmentBuilder;
use eth2_testnet_config::Eth2TestnetConfig;
use std::path::PathBuf;
use types::{Epoch, MainnetEthSpec, YamlConfig};
use types::{MainnetEthSpec, YamlConfig};
fn builder() -> EnvironmentBuilder<MainnetEthSpec> {
EnvironmentBuilder::mainnet()
@@ -36,8 +36,8 @@ mod setup_eth2_config {
.expect("should build environment");
assert_eq!(
environment.eth2_config.spec.far_future_epoch,
Epoch::new(999) // see testnet_dir/config.yaml
environment.eth2_config.spec.max_committees_per_slot,
128 // see testnet_dir/config.yaml
);
}
}