Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tweak consensus params #920

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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