Extend chain config
This commit is contained in:
parent
da25a66196
commit
cc28b7370d
@ -3,8 +3,10 @@ use super::ValidatorRegistration;
|
|||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct ChainConfig {
|
pub struct ChainConfig {
|
||||||
pub cycle_length: u8,
|
pub cycle_length: u8,
|
||||||
|
pub deposit_size_gwei: u64,
|
||||||
pub shard_count: u16,
|
pub shard_count: u16,
|
||||||
pub min_committee_size: u64,
|
pub min_committee_size: u64,
|
||||||
|
pub max_validator_churn_quotient: u64,
|
||||||
pub genesis_time: u64,
|
pub genesis_time: u64,
|
||||||
pub slot_duration_millis: u64,
|
pub slot_duration_millis: u64,
|
||||||
pub initial_validators: Vec<ValidatorRegistration>,
|
pub initial_validators: Vec<ValidatorRegistration>,
|
||||||
@ -13,15 +15,17 @@ pub struct ChainConfig {
|
|||||||
/*
|
/*
|
||||||
* Presently this is just some arbitrary time in Sept 2018.
|
* Presently this is just some arbitrary time in Sept 2018.
|
||||||
*/
|
*/
|
||||||
const GENESIS_TIME: u64 = 1_537_488_655;
|
const TEST_GENESIS_TIME: u64 = 1_537_488_655;
|
||||||
|
|
||||||
impl ChainConfig {
|
impl ChainConfig {
|
||||||
pub fn standard() -> Self {
|
pub fn standard() -> Self {
|
||||||
Self {
|
Self {
|
||||||
cycle_length: 64,
|
cycle_length: 64,
|
||||||
|
deposit_size_gwei: 32 * 10^9,
|
||||||
shard_count: 1024,
|
shard_count: 1024,
|
||||||
min_committee_size: 128,
|
min_committee_size: 128,
|
||||||
genesis_time: GENESIS_TIME,
|
max_validator_churn_quotient: 32,
|
||||||
|
genesis_time: TEST_GENESIS_TIME,
|
||||||
slot_duration_millis: 16 * 1000,
|
slot_duration_millis: 16 * 1000,
|
||||||
initial_validators: vec![],
|
initial_validators: vec![],
|
||||||
}
|
}
|
||||||
@ -45,9 +49,11 @@ impl ChainConfig {
|
|||||||
pub fn super_fast_tests() -> Self {
|
pub fn super_fast_tests() -> Self {
|
||||||
Self {
|
Self {
|
||||||
cycle_length: 2,
|
cycle_length: 2,
|
||||||
|
deposit_size_gwei: 32 * 10^9,
|
||||||
shard_count: 2,
|
shard_count: 2,
|
||||||
min_committee_size: 2,
|
min_committee_size: 2,
|
||||||
genesis_time: GENESIS_TIME, // arbitrary
|
max_validator_churn_quotient: 32,
|
||||||
|
genesis_time: TEST_GENESIS_TIME, // arbitrary
|
||||||
slot_duration_millis: 16 * 1000,
|
slot_duration_millis: 16 * 1000,
|
||||||
initial_validators: vec![],
|
initial_validators: vec![],
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user