mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 04:21:01 +00:00
State trie migration rococo runtime changes. (#6127)
* add state-trie-migration (warn key need to be changed) * rococo root * restore master benchs (weights from substrate are used). * use ord_parameter macro. * do not upgrade runtime version yet * apply review changes * to test ci * Revert "to test ci" This reverts commit 5df6c5c74c5d172f254579cbb76caeb44af80ec2. * test ci * Revert "test ci" This reverts commit 0747761644ba566f9756e195e5304758370dc52c. Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -115,7 +115,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
#[cfg(feature = "disable-runtime-api")]
|
||||
apis: sp_version::create_apis_vec![[]],
|
||||
transaction_version: 15,
|
||||
state_version: 0,
|
||||
state_version: 1,
|
||||
};
|
||||
|
||||
/// The BABE epoch configuration at genesis.
|
||||
@@ -1416,6 +1416,9 @@ construct_runtime! {
|
||||
// Validator Manager pallet.
|
||||
ValidatorManager: validator_manager::{Pallet, Call, Storage, Event<T>} = 252,
|
||||
|
||||
// State trie migration pallet, only temporary.
|
||||
StateTrieMigration: pallet_state_trie_migration = 254,
|
||||
|
||||
// Sudo.
|
||||
Sudo: pallet_sudo::{Pallet, Call, Storage, Event<T>, Config<T>} = 255,
|
||||
}
|
||||
@@ -1466,6 +1469,31 @@ pub type Executive = frame_executive::Executive<
|
||||
/// The payload being signed in transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;
|
||||
|
||||
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 = 1 * CENTS;
|
||||
pub const MigrationSignedDepositBase: Balance = 20 * CENTS * 100;
|
||||
pub const MigrationMaxKeyLen: u32 = 512;
|
||||
}
|
||||
|
||||
impl pallet_state_trie_migration::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type SignedDepositPerItem = MigrationSignedDepositPerItem;
|
||||
type SignedDepositBase = MigrationSignedDepositBase;
|
||||
type ControlOrigin = EnsureRoot<AccountId>;
|
||||
// specific account for the migration, can trigger the signed migrations.
|
||||
type SignedFilter = frame_system::EnsureSignedBy<MigController, AccountId>;
|
||||
|
||||
// Use same weights as substrate ones.
|
||||
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!("52bc71c1eca5353749542dfdf0af97bf764f9c2f44e860cd485f1cd86400f649"));
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
#[macro_use]
|
||||
extern crate frame_benchmarking;
|
||||
|
||||
Reference in New Issue
Block a user