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
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ pallet-staking = { workspace = true }
pallet-staking-async = { workspace = true }
pallet-staking-async-rc-client = { workspace = true }
pallet-staking-runtime-api = { workspace = true }
pallet-state-trie-migration = { workspace = true }
pallet-sudo = { workspace = true }
pallet-timestamp = { workspace = true }
pallet-transaction-payment = { workspace = true }
Expand Down Expand Up @@ -194,7 +193,6 @@ runtime-benchmarks = [
"pallet-staking-async-rc-client/runtime-benchmarks",
"pallet-staking-async/runtime-benchmarks",
"pallet-staking/runtime-benchmarks",
"pallet-state-trie-migration/runtime-benchmarks",
"pallet-sudo/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-transaction-payment/runtime-benchmarks",
Expand Down Expand Up @@ -268,7 +266,6 @@ try-runtime = [
"pallet-staking-async-rc-client/try-runtime",
"pallet-staking-async/try-runtime",
"pallet-staking/try-runtime",
"pallet-state-trie-migration/try-runtime",
"pallet-sudo/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
Expand Down Expand Up @@ -352,7 +349,6 @@ std = [
"pallet-staking-async/std",
"pallet-staking-runtime-api/std",
"pallet-staking/std",
"pallet-state-trie-migration/std",
"pallet-sudo/std",
"pallet-timestamp/std",
"pallet-transaction-payment-rpc-runtime-api/std",
Expand Down
49 changes: 6 additions & 43 deletions cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,7 @@ impl pallet_revive::Config for Runtime {
parameter_types! {
pub MbmServiceWeight: Weight = Perbill::from_percent(80) * RuntimeBlockWeights::get().max_block;
pub FastUnstakeName: &'static str = "FastUnstake";
pub StateTrieMigrationName: &'static str = "StateTrieMigration";
}

impl pallet_migrations::Config for Runtime {
Expand Down Expand Up @@ -1373,8 +1374,6 @@ construct_runtime!(

AssetRewards: pallet_asset_rewards = 61,

StateTrieMigration: pallet_state_trie_migration = 70,

// Staking.
Staking: pallet_staking_async = 80,
NominationPools: pallet_nomination_pools = 81,
Expand Down Expand Up @@ -1492,6 +1491,11 @@ pub type Migrations = (
FastUnstakeName,
<Runtime as frame_system::Config>::DbWeight,
>,
// Remove StateTrieMigration pallet - migration complete
frame_support::migrations::RemovePallet<
StateTrieMigrationName,
<Runtime as frame_system::Config>::DbWeight,
>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
cumulus_pallet_aura_ext::migration::MigrateV0ToV1<Runtime>,
Expand Down Expand Up @@ -2665,47 +2669,6 @@ cumulus_pallet_parachain_system::register_validate_block! {
BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,
}

parameter_types! {
// The deposit configuration for the singed migration. Specially if you want to allow any signed account to do the migration (see `SignedFilter`, these deposits should be high)
pub const MigrationSignedDepositPerItem: Balance = CENTS;
pub const MigrationSignedDepositBase: Balance = 2_000 * CENTS;
pub const MigrationMaxKeyLen: u32 = 512;
}

impl pallet_state_trie_migration::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type RuntimeHoldReason = RuntimeHoldReason;
type SignedDepositPerItem = MigrationSignedDepositPerItem;
type SignedDepositBase = MigrationSignedDepositBase;
// An origin that can control the whole pallet: should be Root, or a part of your council.
type ControlOrigin = frame_system::EnsureSignedBy<RootMigController, AccountId>;
// specific account for the migration, can trigger the signed migrations.
type SignedFilter = frame_system::EnsureSignedBy<MigController, AccountId>;

// Replace this with weight based on your runtime.
type WeightInfo = pallet_state_trie_migration::weights::SubstrateWeight<Runtime>;

type MaxKeyLen = MigrationMaxKeyLen;
}

frame_support::ord_parameter_types! {
pub const MigController: AccountId = AccountId::from(hex_literal::hex!("8458ed39dc4b6f6c7255f7bc42be50c2967db126357c999d44e12ca7ac80dc52"));
pub const RootMigController: AccountId = AccountId::from(hex_literal::hex!("8458ed39dc4b6f6c7255f7bc42be50c2967db126357c999d44e12ca7ac80dc52"));
}

#[test]
fn ensure_key_ss58() {
use frame_support::traits::SortedMembers;
use sp_core::crypto::Ss58Codec;
let acc =
AccountId::from_ss58check("5F4EbSkZz18X36xhbsjvDNs6NuZ82HyYtq5UiJ1h9SBHJXZD").unwrap();
assert_eq!(acc, MigController::sorted_members()[0]);
let acc =
AccountId::from_ss58check("5F4EbSkZz18X36xhbsjvDNs6NuZ82HyYtq5UiJ1h9SBHJXZD").unwrap();
assert_eq!(acc, RootMigController::sorted_members()[0]);
}

#[test]
fn ensure_epmb_weights_sane() {
use sp_io::TestExternalities;
Expand Down
4 changes: 3 additions & 1 deletion docs/sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
#![warn(rustdoc::private_intra_doc_links)]
// Frame macros reference features which this crate does not have
#![allow(unexpected_cfgs)]
#![doc(html_favicon_url = "https://polkadot.com/favicon.ico")]
#![doc(
html_favicon_url = "https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/docs/images/Polkadot_Logo_Horizontal_Pink_White.png"
)]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/docs/images/Polkadot_Logo_Horizontal_Pink_White.png"
)]
Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/src/polkadot_sdk/polkadot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//! - [Dashboard](https://polkadot-fellows.github.io/dashboard/)
//! - [Polkadot Specs](http://spec.polkadot.network)
//! - [The Polkadot Parachain Host Implementers' Guide](https://paritytech.github.io/polkadot-sdk/book/)
//! - [Polkadot papers](https://polkadot.com/papers/)
//! - [Polkadot papers](https://github.com/polkadot-io/polkadot-white-paper)
//! - [JAM Graypaper](https://graypaper.com)
//!
//! ## Alternative Node Implementations 🌈
Expand Down Expand Up @@ -54,7 +54,7 @@
//! the validity of the block execution of multiple parachains using the same set of validators as
//! the Relay Chain. In practice, this means that the shards (parachains) share the same economic
//! security as the Relay Chain.
//! Learn about this process called [Approval Checking](https://polkadot.com/blog/polkadot-v1-0-sharding-and-economic-security#approval-checking-and-finality).
//! Learn about this process called [Approval Checking](https://wiki.polkadot.com/docs/learn-parachains-protocol).
//! * A framework to build blockchains: In order to materialize the ecosystem of parachains, an easy
//! blockchain framework must exist. This is [Substrate](crate::polkadot_sdk::substrate),
//! [FRAME](crate::polkadot_sdk::frame_runtime) and [Cumulus](crate::polkadot_sdk::cumulus).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ in case of disputes. Any validator can be selected as the next relay-chain block
advance for security reasons. As a result, all validators must have a up to date view of all possible parachain
candidates + backing statements that could be placed on-chain in the next block.

[This blog post](https://polkadot.com/blog/polkadot-v1-0-sharding-and-economic-security) puts it another way:
[The wiki](https://wiki.polkadot.com/docs/learn-parachains-protocol) puts it another way:
"Validators who aren't assigned to the parachain still listen for the attestations [statements] because whichever
validator ends up being the author of the relay-chain block needs to bundle up attested parachain blocks for several
parachains and place them into the relay-chain block."
Expand Down
31 changes: 31 additions & 0 deletions prdoc/pr_10694.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json

title: "[Westend] Remove StateTrieMigration pallet - V0→V1 migration complete"

doc:
- audience: Runtime Dev
description: |
Removes the `pallet-state-trie-migration` from Westend Asset Hub runtime.

The V0 to V1 state trie format migration has completed successfully on Westend Asset Hub,
with 2,082,626 top keys and 28,095 child keys migrated. The pallet is no longer needed
and its storage will be cleaned up via RemovePallet migration.

This change:
- Removes pallet-state-trie-migration dependency from Cargo.toml
- Removes the pallet's Config implementation and parameter_types
- Removes the pallet from construct_runtime! macro
- Adds RemovePallet migration to clean up orphaned storage

crates:
- name: asset-hub-westend-runtime
bump: major
- name: pallet-bags-list
bump: patch
- name: pallet-fast-unstake
bump: patch
- name: polkadot
bump: patch
- name: polkadot-sdk-docs
bump: patch
2 changes: 1 addition & 1 deletion substrate/frame/bags-list/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
//! can be used.
//!
//! Additional reading, about how this pallet is used in the context of Polkadot's staking system:
//! <https://polkadot.com/blog/staking-update-september-2021/#bags-list-in-depth>
//! <https://wiki.polkadot.com/docs/learn-staking-advanced#bags-list>
//!
//! ## Examples
//!
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/fast-unstake/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
//! *Being exposed with validator* from the point of view of the staking system means earning
//! rewards with the validator, and also being at the risk of slashing with the validator. This is
//! equivalent to the "Active Nominator" role explained in
//! [here](https://polkadot.com/blog/staking-update-february-2022/).
//! [here](https://wiki.polkadot.com/learn/learn-nominator/).
//!
//! Stakers who are certain about NOT being exposed can register themselves with
//! [`Pallet::register_fast_unstake`]. This will chill, fully unbond the staker and place them
Expand Down
Loading