Skip to content

Commit

Permalink
Merge pull request #920 from zhangsoledad/zhangsoledad/consensus_params
Browse files Browse the repository at this point in the history
feat: tweak consensus params
  • Loading branch information
Jan Xie authored May 30, 2019
2 parents 768296a + 392cc5f commit 9a7985a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ pub(crate) const MEDIAN_TIME_BLOCK_COUNT: usize = 11;
pub(crate) const ORPHAN_RATE_TARGET_RECIP: u64 = 20;

const MAX_BLOCK_INTERVAL: u64 = 60 * 1000; // 60s
const MIN_BLOCK_INTERVAL: u64 = 5 * 1000; // 5s
const MIN_BLOCK_INTERVAL: u64 = 8 * 1000; // 8s
const TWO_IN_TWO_OUT_CYCLES: Cycle = 2_580_000;
pub(crate) const EPOCH_DURATION_TARGET: u64 = 8 * 60 * 60 * 1000; // 8 hours
pub(crate) const MAX_EPOCH_LENGTH: u64 = EPOCH_DURATION_TARGET / MIN_BLOCK_INTERVAL; // 2880
pub(crate) const MIN_EPOCH_LENGTH: u64 = EPOCH_DURATION_TARGET / MAX_BLOCK_INTERVAL; // 240
pub(crate) const MAX_EPOCH_LENGTH: u64 = EPOCH_DURATION_TARGET / MIN_BLOCK_INTERVAL; // 3600
pub(crate) const MIN_EPOCH_LENGTH: u64 = EPOCH_DURATION_TARGET / MAX_BLOCK_INTERVAL; // 480
pub(crate) const GENESIS_EPOCH_LENGTH: u64 = 2_000;
pub(crate) const MAX_BLOCK_BYTES: u64 = 2_000_000; // 2mb
pub(crate) const MAX_BLOCK_CYCLES: u64 = 10_000_000_000;
pub(crate) const MAX_BLOCK_CYCLES: u64 = TWO_IN_TWO_OUT_CYCLES * 200 * 8;
pub(crate) const MAX_BLOCK_PROPOSALS_LIMIT: u64 = 3_000;
pub(crate) const BLOCK_VERSION: u32 = 0;

Expand Down

0 comments on commit 9a7985a

Please sign in to comment.