Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion node/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ pub struct RunCmd {

fn block_authoring_duration_parser(s: &str) -> Result<Duration, String> {
Ok(Duration::from_millis(clap_num::number_range(
s, 250, 2_000,
s, 250, 6_000,
)?))
}

Expand Down
14 changes: 10 additions & 4 deletions runtime/moonbase/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,12 +743,18 @@ parameter_types! {

/// Relay chain slot duration, in milliseconds.
const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;
/// Build with an offset of 1 behind the relay chain.
pub const RELAY_PARENT_OFFSET: u32 = 1;

/// The upper limit of how many parachain blocks are processed by the relay chain per
/// parent. Limits the number of blocks authored per slot. This determines the minimum
/// block time of the parachain:
/// `RELAY_CHAIN_SLOT_DURATION_MILLIS/BLOCK_PROCESSING_VELOCITY`
pub const BLOCK_PROCESSING_VELOCITY: u32 = 3;

/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included
/// into the relay chain.
const UNINCLUDED_SEGMENT_CAPACITY: u32 = 3;
/// How many parachain blocks are processed by the relay chain per parent. Limits the
/// number of blocks authored per slot.
const BLOCK_PROCESSING_VELOCITY: u32 = 1;
pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = (3 + RELAY_PARENT_OFFSET) * BLOCK_PROCESSING_VELOCITY;

type ConsensusHook = pallet_async_backing::consensus_hook::FixedVelocityConsensusHook<
Runtime,
Expand Down
Loading