diff --git a/Cargo.lock b/Cargo.lock index ca965102f9170..eed2ec65a65ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1397,7 +1397,6 @@ dependencies = [ "pallet-staking-async", "pallet-staking-async-rc-client", "pallet-staking-runtime-api", - "pallet-state-trie-migration", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml index 23bc88a16ccf0..c9ac9530152dc 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml @@ -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 } @@ -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", @@ -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", @@ -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", diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 34834129d6800..60e6f133bfadc 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -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 { @@ -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, @@ -1492,6 +1491,11 @@ pub type Migrations = ( FastUnstakeName, ::DbWeight, >, + // Remove StateTrieMigration pallet - migration complete + frame_support::migrations::RemovePallet< + StateTrieMigrationName, + ::DbWeight, + >, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, cumulus_pallet_aura_ext::migration::MigrateV0ToV1, @@ -2665,47 +2669,6 @@ cumulus_pallet_parachain_system::register_validate_block! { BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, } -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; - // specific account for the migration, can trigger the signed migrations. - type SignedFilter = frame_system::EnsureSignedBy; - - // Replace this with weight based on your runtime. - type WeightInfo = pallet_state_trie_migration::weights::SubstrateWeight; - - 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; diff --git a/docs/sdk/src/lib.rs b/docs/sdk/src/lib.rs index ca53a6d103cff..d1095a0823598 100644 --- a/docs/sdk/src/lib.rs +++ b/docs/sdk/src/lib.rs @@ -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" )] diff --git a/docs/sdk/src/polkadot_sdk/polkadot.rs b/docs/sdk/src/polkadot_sdk/polkadot.rs index 8f547fec52b12..9bacea4440f45 100644 --- a/docs/sdk/src/polkadot_sdk/polkadot.rs +++ b/docs/sdk/src/polkadot_sdk/polkadot.rs @@ -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 🌈 @@ -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). diff --git a/polkadot/roadmap/implementers-guide/src/node/backing/statement-distribution.md b/polkadot/roadmap/implementers-guide/src/node/backing/statement-distribution.md index c065e51c99093..b588c1440400b 100644 --- a/polkadot/roadmap/implementers-guide/src/node/backing/statement-distribution.md +++ b/polkadot/roadmap/implementers-guide/src/node/backing/statement-distribution.md @@ -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." diff --git a/prdoc/pr_10694.prdoc b/prdoc/pr_10694.prdoc new file mode 100644 index 0000000000000..076e93cf68820 --- /dev/null +++ b/prdoc/pr_10694.prdoc @@ -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 diff --git a/substrate/frame/bags-list/src/lib.rs b/substrate/frame/bags-list/src/lib.rs index 46da2e36dc76f..b21c4da0ee493 100644 --- a/substrate/frame/bags-list/src/lib.rs +++ b/substrate/frame/bags-list/src/lib.rs @@ -54,7 +54,7 @@ //! can be used. //! //! Additional reading, about how this pallet is used in the context of Polkadot's staking system: -//! +//! //! //! ## Examples //! diff --git a/substrate/frame/fast-unstake/src/lib.rs b/substrate/frame/fast-unstake/src/lib.rs index 5006ed391da21..cd6aeecbd9b3b 100644 --- a/substrate/frame/fast-unstake/src/lib.rs +++ b/substrate/frame/fast-unstake/src/lib.rs @@ -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