Skip to content

Commit

Permalink
fix the hook for the cumulus consensus
Browse files Browse the repository at this point in the history
  • Loading branch information
asiniscalchi committed Sep 20, 2024
1 parent f732859 commit 68a78b5
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions runtime/laos/src/configs/cumulus_parachain_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,29 @@ impl cumulus_pallet_parachain_system::Config for Runtime {
type ReservedDmpWeight = ReservedDmpWeight;
type XcmpMessageHandler = XcmpQueue;
type ReservedXcmpWeight = ReservedXcmpWeight;
type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
type ConsensusHook = cumulus_pallet_parachain_system::ExpectParentIncluded;
type CheckAssociatedRelayNumber =
cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases;
type ConsensusHook = ConsensusHook;
type DmpQueue = frame_support::traits::EnqueueWithOrigin<MessageQueue, RelayOrigin>;
type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo<Runtime>;
}

/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included
/// into the relay chain.
const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;
/// 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;
/// Relay chain slot duration, in milliseconds.
const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;

type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<
Runtime,
RELAY_CHAIN_SLOT_DURATION_MILLIS,
BLOCK_PROCESSING_VELOCITY,
UNINCLUDED_SEGMENT_CAPACITY,
>;

// This struct is never instantiated, it is only used for the `CheckInherents` implementation.
// It will be deprecated soon:
// https://github.com/moonbeam-foundation/moonbeam/blob/26a88a553563647992f39fbd1cce3d45a363e991/runtime/moonbeam/src/lib.rs#L1585-L1614
Expand Down

0 comments on commit 68a78b5

Please sign in to comment.