Skip to content

Commit

Permalink
fix: configure async backing properly (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
th7nder authored Dec 19, 2024
1 parent 4d89958 commit b559dba
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions runtime/src/configs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
mod xcm_config;

// Substrate and Polkadot dependencies
use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use frame_support::{
derive_impl,
Expand Down Expand Up @@ -54,12 +54,11 @@ use xcm_config::{RelayLocation, XcmOriginToTransactDispatchOrigin};
// Local module imports
use super::{
weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight},
AccountId, Aura, Balance, Balances, Block, BlockNumber, CollatorSelection, Hash, MessageQueue,
Nonce, PalletInfo, ParachainSystem, Runtime, RuntimeCall, RuntimeEvent, RuntimeFreezeReason,
RuntimeHoldReason, RuntimeOrigin, RuntimeTask, Session, SessionKeys, System, WeightToFee,
XcmpQueue, AVERAGE_ON_INITIALIZE_RATIO, BLOCK_PROCESSING_VELOCITY, EXISTENTIAL_DEPOSIT, HOURS,
MAXIMUM_BLOCK_WEIGHT, MICROUNIT, NORMAL_DISPATCH_RATIO, RELAY_CHAIN_SLOT_DURATION_MILLIS,
SLOT_DURATION, UNINCLUDED_SEGMENT_CAPACITY, VERSION,
AccountId, Aura, Balance, Balances, Block, BlockNumber, CollatorSelection, ConsensusHook, Hash,
MessageQueue, Nonce, PalletInfo, ParachainSystem, Runtime, RuntimeCall, RuntimeEvent,
RuntimeFreezeReason, RuntimeHoldReason, RuntimeOrigin, RuntimeTask, Session, SessionKeys,
System, WeightToFee, XcmpQueue, AVERAGE_ON_INITIALIZE_RATIO, EXISTENTIAL_DEPOSIT, HOURS,
MAXIMUM_BLOCK_WEIGHT, MICROUNIT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, VERSION,
};
use crate::{BabeDataGetter, DAYS, MINUTES};

Expand Down Expand Up @@ -129,7 +128,7 @@ impl pallet_timestamp::Config for Runtime {
/// A timestamp: milliseconds since the unix epoch.
type Moment = u64;
type OnTimestampSet = Aura;
type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>;
type MinimumPeriod = ConstU64<0>;
type WeightInfo = ();
}

Expand Down Expand Up @@ -196,13 +195,8 @@ impl cumulus_pallet_parachain_system::Config for Runtime {
type ReservedDmpWeight = ReservedDmpWeight;
type XcmpMessageHandler = XcmpQueue;
type ReservedXcmpWeight = ReservedXcmpWeight;
type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases;
type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<
Runtime,
RELAY_CHAIN_SLOT_DURATION_MILLIS,
BLOCK_PROCESSING_VELOCITY,
UNINCLUDED_SEGMENT_CAPACITY,
>;
type CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases;
type ConsensusHook = ConsensusHook;
}

impl parachain_info::Config for Runtime {}
Expand Down Expand Up @@ -274,8 +268,8 @@ impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
type AllowMultipleBlocksPerSlot = ConstBool<true>;
type SlotDuration = ConstU64<SLOT_DURATION>;
}

parameter_types! {
Expand Down

0 comments on commit b559dba

Please sign in to comment.