Skip to content

Commit 64ec73b

Browse files
committed
formatting updates
1 parent 9ecdb44 commit 64ec73b

File tree

25 files changed

+327
-296
lines changed

25 files changed

+327
-296
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
...
2+
cumulus-primitives-aura = { path = "../../../../primitives/aura", default-features = false }
3+
...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn impl_slot_duration() -> sp_consensus_aura::SlotDuration {
2+
sp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION)
3+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
impl cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> for Runtime {
2+
fn can_build_upon(
3+
included_hash: <Block as BlockT>::Hash,
4+
slot: cumulus_primitives_aura::Slot,
5+
) -> bool {
6+
Runtime::impl_can_build_upon(included_hash, slot)
7+
}
8+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
...
2+
"async_backing_params": {
3+
"max_candidate_depth": 3,
4+
"allowed_ancestry_len": 2
5+
},
6+
...
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Maximum number of blocks simultaneously accepted by the runtime, not yet included into the
2+
// relay chain.
3+
pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;
4+
// How many parachain blocks are processed by the relay chain per parent. Limits the number of
5+
// blocks authored per slot.
6+
pub const BLOCK_PROCESSING_VELOCITY: u32 = 1;
7+
// Relay chain slot duration, in milliseconds.
8+
pub const RELAY_chain_SLOT_DURATION_MILLIS: u32 = 6000;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked
2+
// up by `pallet_aura` to implement `fn slot_duration()`.
3+
//
4+
// Change this to adjust the block time.
5+
pub const MILLISECS_PER_BLOCK: u64 = 12000;
6+
pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<
2+
Runtime,
3+
RELAY_CHAIN_SLOT_DURATION_MILLIS,
4+
BLOCK_PROCESSING_VELOCITY,
5+
UNINCLUDED_SEGMENT_CAPACITY,
6+
>;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
impl cumulus_pallet_parachain_system::Config for Runtime {
2+
...
3+
type ConsensusHook = ConsensusHook;
4+
...
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
impl cumulus_pallet_parachain_system::Config for Runtime {
2+
...
3+
type CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases;
4+
...
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
impl pallet_aura::Config for Runtime {
2+
...
3+
type AllowMultipleBlocksPerSlot = ConstBool<false>;
4+
#[cfg(feature = "experimental")]
5+
type SlotDuration = ConstU64<SLOT_DURATION>;
6+
...
7+
}

0 commit comments

Comments
 (0)