Skip to content
Merged
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
18 changes: 9 additions & 9 deletions parachain/pallets/parachain-staking/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ fn set_blocks_per_round_event_emits_correctly() {
first_block: 0,
old: 5,
new: 6,
new_per_round_inflation_min: Perbill::from_parts(926),
new_per_round_inflation_ideal: Perbill::from_parts(926),
new_per_round_inflation_max: Perbill::from_parts(926),
new_per_round_inflation_min: Perbill::from_parts(463),
new_per_round_inflation_ideal: Perbill::from_parts(463),
new_per_round_inflation_max: Perbill::from_parts(463),
}));
});
}
Expand Down Expand Up @@ -424,9 +424,9 @@ fn set_inflation_event_emits_correctly() {
annual_min: min,
annual_ideal: ideal,
annual_max: max,
round_min: Perbill::from_parts(57),
round_ideal: Perbill::from_parts(75),
round_max: Perbill::from_parts(93),
round_min: Perbill::from_parts(29),
round_ideal: Perbill::from_parts(38),
round_max: Perbill::from_parts(47),
}));
});
}
Expand Down Expand Up @@ -460,9 +460,9 @@ fn set_inflation_storage_updates_correctly() {
assert_eq!(
ParachainStaking::inflation_config().round,
Range {
min: Perbill::from_parts(57),
ideal: Perbill::from_parts(75),
max: Perbill::from_parts(93)
min: Perbill::from_parts(29),
ideal: Perbill::from_parts(38),
max: Perbill::from_parts(47)
}
);
});
Expand Down
18 changes: 8 additions & 10 deletions parachain/runtime/heima/src/migration/block_time_6s/vesting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ type BalanceOf<T> = <<T as pallet_vesting::Config>::Currency as frame_support::t
<T as frame_system::Config>::AccountId,
>>::Balance;

/// An account's full vesting-schedule list, as stored by `pallet_vesting`.
type ScheduleList<T> = BoundedVec<
VestingInfo<BalanceOf<T>, BlockNumberFor<T>>,
pallet_vesting::MaxVestingSchedulesGet<T>,
>;

pub struct VestingRescaleMigration<T>(PhantomData<T>);

impl<T> VestingRescaleMigration<T>
Expand All @@ -69,16 +75,8 @@ where
/// no longer has any live schedule (everything was fully vested).
fn rescale_account(
now: BlockNumberFor<T>,
schedules: BoundedVec<
VestingInfo<BalanceOf<T>, BlockNumberFor<T>>,
pallet_vesting::MaxVestingSchedulesGet<T>,
>,
) -> Option<
BoundedVec<
VestingInfo<BalanceOf<T>, BlockNumberFor<T>>,
pallet_vesting::MaxVestingSchedulesGet<T>,
>,
> {
schedules: ScheduleList<T>,
) -> Option<ScheduleList<T>> {
let mut out: Vec<VestingInfo<BalanceOf<T>, BlockNumberFor<T>>> = Vec::new();

for s in schedules.into_iter() {
Expand Down
26 changes: 10 additions & 16 deletions parachain/runtime/paseo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@ pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;

/// Migrations to apply on runtime upgrade.
pub type Migrations = (
// one-shot: rescale bounded block-number/per-block state for the 12s -> 6s block-time change
// (spec_version 9262). Remove in the release after this one. The large `pallet_vesting` map is
// migrated separately as a multi-block migration, see `pallet_migrations::Config::Migrations`.
migration::block_time_6s::OnePassRescale<Runtime>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
);
Expand Down Expand Up @@ -250,7 +246,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
impl_name: alloc::borrow::Cow::Borrowed("heima"),
authoring_version: 1,
// same versioning-mechanism as polkadot: use last digit for minor updates
spec_version: 9262,
spec_version: 9263,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -480,12 +476,7 @@ parameter_types! {
impl pallet_migrations::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
#[cfg(not(feature = "runtime-benchmarks"))]
type Migrations = (
pallet_identity::migration::v2::LazyMigrationV1ToV2<Runtime>,
// one-shot: rescale vesting schedules for the 12s -> 6s block-time change (spec 9262).
// Remove in the release after this one.
migration::block_time_6s::VestingRescaleMigration<Runtime>,
);
type Migrations = pallet_identity::migration::v2::LazyMigrationV1ToV2<Runtime>;
// Benchmarks need mocked migrations to guarantee that they succeed.
#[cfg(feature = "runtime-benchmarks")]
type Migrations = pallet_migrations::mock_helpers::MockedMigrations;
Expand Down Expand Up @@ -898,11 +889,14 @@ impl cumulus_pallet_parachain_system::Config for Runtime {
type XcmpMessageHandler = XcmpQueue;
type ReservedXcmpWeight = ReservedXcmpWeight;
type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases;
// note here we intentionally use this hook to ignore relay chain proof so that
// it's possible to launch as standalone chain
//
// Litentry parachain has a different(standard) setting
type ConsensusHook = cumulus_pallet_parachain_system::consensus_hook::ExpectParentIncluded;
// Use the fixed-velocity hook (same as the heima runtime). The legacy `ExpectParentIncluded`
// hook requires each block's parent to already be included by the relay chain and does not
// support an unincluded segment, so it cannot pipeline blocks for async backing — at 6s block
// time it stalls the chain (`expected parent to be included` panics / reorgs). The
// `ConsensusHook` defined above is parameterised by RELAY_CHAIN_SLOT_DURATION_MILLIS /
// BLOCK_PROCESSING_VELOCITY / UNINCLUDED_SEGMENT_CAPACITY and is the correct hook for a
// relay-attached parachain.
type ConsensusHook = ConsensusHook;
type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector<Runtime>;
type WeightInfo = ();
}
Expand Down
33 changes: 0 additions & 33 deletions parachain/runtime/paseo/src/migration/block_time_6s/mod.rs

This file was deleted.

Loading