mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-29 10:54:24 +00:00
update minimal spec, fix all tests
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use types::{
|
||||
typenum::{U64, U8},
|
||||
ChainSpec, EthSpec, FewValidatorsEthSpec, FoundationEthSpec,
|
||||
};
|
||||
|
||||
/// "Minimal" testing specification, as defined here:
|
||||
///
|
||||
/// https://github.com/ethereum/eth2.0-specs/blob/v0.6.1/configs/constant_presets/minimal.yaml
|
||||
///
|
||||
/// Spec v0.6.1
|
||||
#[derive(Clone, PartialEq, Debug, Default, Serialize, Deserialize)]
|
||||
pub struct MinimalEthSpec;
|
||||
|
||||
impl EthSpec for MinimalEthSpec {
|
||||
type ShardCount = U8;
|
||||
type SlotsPerHistoricalRoot = U64;
|
||||
type LatestRandaoMixesLength = U64;
|
||||
type LatestActiveIndexRootsLength = U64;
|
||||
type LatestSlashedExitLength = U64;
|
||||
|
||||
fn spec() -> ChainSpec {
|
||||
let mut spec = FewValidatorsEthSpec::spec();
|
||||
spec.target_committee_size = 4;
|
||||
spec.shuffle_round_count = 10;
|
||||
spec.min_attestation_inclusion_delay = 2;
|
||||
spec.slots_per_epoch = 8;
|
||||
spec.slots_per_eth1_voting_period = 16;
|
||||
spec
|
||||
}
|
||||
}
|
||||
|
||||
pub type MainnetEthSpec = FoundationEthSpec;
|
||||
@@ -98,7 +98,6 @@ fn operations_exit() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn operations_proposer_slashing() {
|
||||
yaml_files_in_test_dir(&Path::new("operations").join("proposer_slashing"))
|
||||
.into_par_iter()
|
||||
@@ -108,7 +107,6 @@ fn operations_proposer_slashing() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn operations_attester_slashing() {
|
||||
yaml_files_in_test_dir(&Path::new("operations").join("attester_slashing"))
|
||||
.into_par_iter()
|
||||
@@ -118,7 +116,6 @@ fn operations_attester_slashing() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn operations_attestation() {
|
||||
yaml_files_in_test_dir(&Path::new("operations").join("attestation"))
|
||||
.into_par_iter()
|
||||
@@ -137,7 +134,6 @@ fn operations_block_header() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn sanity_blocks() {
|
||||
yaml_files_in_test_dir(&Path::new("sanity").join("blocks"))
|
||||
.into_par_iter()
|
||||
|
||||
Reference in New Issue
Block a user