Skip to content

Commit

Permalink
revert runtime time constants
Browse files Browse the repository at this point in the history
  • Loading branch information
smohan-dw committed Jan 4, 2024
1 parent 8d4d8e8 commit c2c8f75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions runtime/constants/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ pub mod currency {
/// Time and blocks.
pub mod time {
use cord_primitives::{prod_or_fast, BlockNumber, Moment};
pub const MILLISECS_PER_BLOCK: Moment = 6000;
pub const MILLISECS_PER_BLOCK: Moment = 3000;
pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK;
#[allow(clippy::identity_op)]
pub const EPOCH_DURATION: BlockNumber = prod_or_fast!(5 * MINUTES, 1 * MINUTES);
pub const EPOCH_DURATION: BlockNumber = prod_or_fast!(2 * MINUTES, 1 * MINUTES);
pub const MINIMUM_DURATION: u64 = SLOT_DURATION / 2;

// These time units are defined in number of blocks.
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use frame_support::{
},
weights::{
constants::{
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND,
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_MILLIS,
},
Weight,
},
Expand Down Expand Up @@ -176,7 +176,7 @@ pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(80);
/// We allow for 2 seconds of compute with a 6 second average block
/// time. The storage proof size is not limited so far.
pub const MAXIMUM_BLOCK_WEIGHT: Weight =
Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);
Weight::from_parts(WEIGHT_REF_TIME_PER_MILLIS.saturating_mul(1500), u64::MAX);

const_assert!(NORMAL_DISPATCH_RATIO.deconstruct() >= AVERAGE_ON_INITIALIZE_RATIO.deconstruct());

Expand Down

0 comments on commit c2c8f75

Please sign in to comment.