fix: Complete snowbridge pezpallet rebrand and critical bug fixes

- snowbridge-pezpallet-* → pezsnowbridge-pezpallet-* (201 refs)
- pallet/ directories → pezpallet/ (4 locations)
- Fixed pezpallet.rs self-include recursion bug
- Fixed sc-chain-spec hardcoded crate name in derive macro
- Reverted .pezpallet_by_name() to .pallet_by_name() (subxt API)
- Added BizinikiwiConfig type alias for zombienet tests
- Deleted obsolete session state files

Verified: pezsnowbridge-pezpallet-*, pezpallet-staking,
pezpallet-staking-async, pezframe-benchmarking-cli all pass cargo check
This commit is contained in:
2025-12-16 09:57:23 +03:00
parent eea003e14d
commit 3139ffa25e
3022 changed files with 42157 additions and 23579 deletions
@@ -100,7 +100,7 @@ mod benchmarks {
}
impl_benchmark_test_suite!(
Pallet,
Pezpallet,
crate::mock::new_test_ext(Default::default()),
crate::mock::Test
);
@@ -16,7 +16,7 @@
//! A module that is responsible for migration of storage.
use crate::configuration::{Config, Pallet};
use crate::configuration::{Config, Pezpallet};
use alloc::vec::Vec;
use pezframe_support::{
pezpallet_prelude::*,
@@ -139,11 +139,11 @@ mod v9 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V9HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V9HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V9HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -154,11 +154,11 @@ mod v10 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V10HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V10HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V10HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -180,7 +180,7 @@ impl<T: Config> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateToV10<T> {
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade() for HostConfiguration MigrateToV10");
ensure!(
Pallet::<T>::on_chain_storage_version() >= StorageVersion::new(10),
Pezpallet::<T>::on_chain_storage_version() >= StorageVersion::new(10),
"Storage version should be >= 10 after the migration"
);
@@ -192,7 +192,7 @@ pub type MigrateToV10<T> = pezframe_support::migrations::VersionedMigration<
9,
10,
VersionUncheckedMigrateToV10<T>,
Pallet<T>,
Pezpallet<T>,
<T as pezframe_system::Config>::DbWeight,
>;
@@ -366,7 +366,7 @@ mod tests {
}
// Test that migration doesn't panic in case there're no pending configurations upgrades in
// pallet's storage.
// pezpallet's storage.
#[test]
fn test_migrate_to_v10_no_pending() {
let v9 = V9HostConfiguration::<pezkuwi_primitives::BlockNumber>::default();
@@ -16,7 +16,7 @@
//! A module that is responsible for migration of storage.
use crate::configuration::{self, Config, Pallet};
use crate::configuration::{self, Config, Pezpallet};
use alloc::vec::Vec;
use pezframe_support::{
migrations::VersionedMigration,
@@ -144,11 +144,11 @@ mod v10 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V10HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V10HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V10HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -159,11 +159,11 @@ mod v11 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V11HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V11HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V11HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -173,7 +173,7 @@ pub type MigrateToV11<T> = VersionedMigration<
10,
11,
UncheckedMigrateToV11<T>,
Pallet<T>,
Pezpallet<T>,
<T as pezframe_system::Config>::DbWeight,
>;
@@ -198,7 +198,7 @@ impl<T: Config> UncheckedOnRuntimeUpgrade for UncheckedMigrateToV11<T> {
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade() for HostConfiguration MigrateToV11");
ensure!(
StorageVersion::get::<Pallet<T>>() >= 11,
StorageVersion::get::<Pezpallet<T>>() >= 11,
"Storage version should be >= 11 after the migration"
);
@@ -422,7 +422,7 @@ mod tests {
}
// Test that migration doesn't panic in case there're no pending configurations upgrades in
// pallet's storage.
// pezpallet's storage.
#[test]
fn test_migrate_to_v11_no_pending() {
let v10 = V10HostConfiguration::<pezkuwi_primitives::BlockNumber>::default();
@@ -16,7 +16,7 @@
//! A module that is responsible for migration of storage.
use crate::configuration::{self, migration::v11::V11HostConfiguration, Config, Pallet};
use crate::configuration::{self, migration::v11::V11HostConfiguration, Config, Pezpallet};
use alloc::vec::Vec;
use pezframe_support::{
migrations::VersionedMigration,
@@ -35,11 +35,11 @@ mod v11 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V11HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V11HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V11HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -50,11 +50,11 @@ mod v12 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V12HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V12HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V12HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -64,7 +64,7 @@ pub type MigrateToV12<T> = VersionedMigration<
11,
12,
UncheckedMigrateToV12<T>,
Pallet<T>,
Pezpallet<T>,
<T as pezframe_system::Config>::DbWeight,
>;
@@ -90,7 +90,7 @@ impl<T: Config> UncheckedOnRuntimeUpgrade for UncheckedMigrateToV12<T> {
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade() for HostConfiguration MigrateToV12");
ensure!(
StorageVersion::get::<Pallet<T>>() >= 12,
StorageVersion::get::<Pezpallet<T>>() >= 12,
"Storage version should be >= 12 after the migration"
);
@@ -340,7 +340,7 @@ mod tests {
}
// Test that migration doesn't panic in case there are no pending configurations upgrades in
// pallet's storage.
// pezpallet's storage.
#[test]
fn test_migrate_to_v12_no_pending() {
let v11 = V11HostConfiguration::<pezkuwi_primitives::BlockNumber>::default();
@@ -16,7 +16,7 @@
//! Contains the V6 storage definition of the host configuration.
use crate::configuration::{Config, Pallet};
use crate::configuration::{Config, Pezpallet};
use alloc::vec::Vec;
use pezframe_support::pezpallet_prelude::*;
use pezframe_system::pezpallet_prelude::BlockNumberFor;
@@ -124,11 +124,11 @@ mod v6 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V6HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V6HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V6HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -16,7 +16,7 @@
//! A module that is responsible for migration of storage.
use crate::configuration::{self, Config, Pallet};
use crate::configuration::{self, Config, Pezpallet};
use alloc::vec::Vec;
use pezframe_support::{
pezpallet_prelude::*,
@@ -129,11 +129,11 @@ mod v6 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V6HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V6HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V6HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -144,11 +144,11 @@ mod v7 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V7HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V7HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V7HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -164,11 +164,11 @@ impl<T: Config> OnRuntimeUpgrade for MigrateToV7<T> {
fn on_runtime_upgrade() -> Weight {
log::info!(target: configuration::LOG_TARGET, "MigrateToV7 started");
if StorageVersion::get::<Pallet<T>>() == 6 {
if StorageVersion::get::<Pezpallet<T>>() == 6 {
let weight_consumed = migrate_to_v7::<T>();
log::info!(target: configuration::LOG_TARGET, "MigrateToV7 executed successfully");
StorageVersion::new(7).put::<Pallet<T>>();
StorageVersion::new(7).put::<Pezpallet<T>>();
weight_consumed
} else {
@@ -181,7 +181,7 @@ impl<T: Config> OnRuntimeUpgrade for MigrateToV7<T> {
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()");
ensure!(
StorageVersion::get::<Pallet<T>>() >= 7,
StorageVersion::get::<Pezpallet<T>>() >= 7,
"Storage version should be >= 7 after the migration"
);
@@ -388,7 +388,7 @@ mod tests {
}
// Test that migration doesn't panic in case there're no pending configurations upgrades in
// pallet's storage.
// pezpallet's storage.
#[test]
fn test_migrate_to_v7_no_pending() {
let v6 = V6HostConfiguration::<pezkuwi_primitives::BlockNumber>::default();
@@ -16,7 +16,7 @@
//! A module that is responsible for migration of storage.
use crate::configuration::{self, Config, Pallet};
use crate::configuration::{self, Config, Pezpallet};
use alloc::vec::Vec;
use pezframe_support::{
pezpallet_prelude::*,
@@ -136,11 +136,11 @@ mod v7 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V7HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V7HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V7HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -151,11 +151,11 @@ mod v8 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V8HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V8HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V8HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -171,11 +171,11 @@ impl<T: Config> OnRuntimeUpgrade for MigrateToV8<T> {
fn on_runtime_upgrade() -> Weight {
log::info!(target: configuration::LOG_TARGET, "HostConfiguration MigrateToV8 started");
if StorageVersion::get::<Pallet<T>>() == 7 {
if StorageVersion::get::<Pezpallet<T>>() == 7 {
let weight_consumed = migrate_to_v8::<T>();
log::info!(target: configuration::LOG_TARGET, "HostConfiguration MigrateToV8 executed successfully");
StorageVersion::new(8).put::<Pallet<T>>();
StorageVersion::new(8).put::<Pezpallet<T>>();
weight_consumed
} else {
@@ -188,7 +188,7 @@ impl<T: Config> OnRuntimeUpgrade for MigrateToV8<T> {
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade() for HostConfiguration MigrateToV8");
ensure!(
StorageVersion::get::<Pallet<T>>() >= 8,
StorageVersion::get::<Pezpallet<T>>() >= 8,
"Storage version should be >= 8 after the migration"
);
@@ -401,7 +401,7 @@ mod tests {
}
// Test that migration doesn't panic in case there're no pending configurations upgrades in
// pallet's storage.
// pezpallet's storage.
#[test]
fn test_migrate_to_v8_no_pending() {
let v7 = V7HostConfiguration::<pezkuwi_primitives::BlockNumber>::default();
@@ -16,7 +16,7 @@
//! A module that is responsible for migration of storage.
use crate::configuration::{self, Config, Pallet};
use crate::configuration::{self, Config, Pezpallet};
use alloc::vec::Vec;
use pezframe_support::{
pezpallet_prelude::*,
@@ -139,11 +139,11 @@ mod v8 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V8HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V8HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V8HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -154,11 +154,11 @@ mod v9 {
#[pezframe_support::storage_alias]
pub(crate) type ActiveConfig<T: Config> =
StorageValue<Pallet<T>, V9HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
StorageValue<Pezpallet<T>, V9HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
#[pezframe_support::storage_alias]
pub(crate) type PendingConfigs<T: Config> = StorageValue<
Pallet<T>,
Pezpallet<T>,
Vec<(SessionIndex, V9HostConfiguration<BlockNumberFor<T>>)>,
OptionQuery,
>;
@@ -174,11 +174,11 @@ impl<T: Config> OnRuntimeUpgrade for MigrateToV9<T> {
fn on_runtime_upgrade() -> Weight {
log::info!(target: configuration::LOG_TARGET, "HostConfiguration MigrateToV9 started");
if StorageVersion::get::<Pallet<T>>() == 8 {
if StorageVersion::get::<Pezpallet<T>>() == 8 {
let weight_consumed = migrate_to_v9::<T>();
log::info!(target: configuration::LOG_TARGET, "HostConfiguration MigrateToV9 executed successfully");
StorageVersion::new(9).put::<Pallet<T>>();
StorageVersion::new(9).put::<Pezpallet<T>>();
weight_consumed
} else {
@@ -191,7 +191,7 @@ impl<T: Config> OnRuntimeUpgrade for MigrateToV9<T> {
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade() for HostConfiguration MigrateToV9");
ensure!(
StorageVersion::get::<Pallet<T>>() >= 9,
StorageVersion::get::<Pezpallet<T>>() >= 9,
"Storage version should be >= 9 after the migration"
);
@@ -406,7 +406,7 @@ mod tests {
}
// Test that migration doesn't panic in case there're no pending configurations upgrades in
// pallet's storage.
// pezpallet's storage.
#[test]
fn test_migrate_to_v9_no_pending() {
let v8 = V8HostConfiguration::<pezkuwi_primitives::BlockNumber>::default();