Fix issues when starting with mainnet spec (#674)

* Update lcli to parse spec at boot, remove pycli

* Fix issues when starting with mainnet spec

* Set default spec to mainnet

* Ensure ETH1_FOLLOW_DISTANCE is in YamlConfig

* Set testnet ETH1_FOLLOW_DISTANCE to 16

* Set testnet min validator count

* Add validator count CLI flag to lcli contract deploy

* Extend genesis delay time
This commit is contained in:
Paul Hauner
2019-12-09 17:23:56 +11:00
committed by GitHub
parent bfbb556f02
commit 988059bc9c
8 changed files with 81 additions and 119 deletions

View File

@@ -4,9 +4,9 @@ use state_processing::{per_block_processing, per_slot_processing, BlockSignature
use std::fs::File;
use std::io::prelude::*;
use std::path::PathBuf;
use types::{BeaconBlock, BeaconState, EthSpec, MinimalEthSpec};
use types::{BeaconBlock, BeaconState, EthSpec};
pub fn run_transition_blocks(matches: &ArgMatches) -> Result<(), String> {
pub fn run_transition_blocks<T: EthSpec>(matches: &ArgMatches) -> Result<(), String> {
let pre_state_path = matches
.value_of("pre-state")
.ok_or_else(|| "No pre-state file supplied".to_string())?
@@ -29,8 +29,8 @@ pub fn run_transition_blocks(matches: &ArgMatches) -> Result<(), String> {
info!("Pre-state path: {:?}", pre_state_path);
info!("Block path: {:?}", block_path);
let pre_state: BeaconState<MinimalEthSpec> = load_from_ssz(pre_state_path)?;
let block: BeaconBlock<MinimalEthSpec> = load_from_ssz(block_path)?;
let pre_state: BeaconState<T> = load_from_ssz(pre_state_path)?;
let block: BeaconBlock<T> = load_from_ssz(block_path)?;
let post_state = do_transition(pre_state, block)?;