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
@@ -32,7 +32,7 @@
)]
//!
//! For a much more comprehensive example, be sure to look at the source for broker (the "coretime")
//! pallet.
//! pezpallet.
//!
//! #### Fixed Point Types in Practice
//!
@@ -39,8 +39,8 @@
//! which can be used.
//!
//! Each of these can be used to construct and represent ratios within our runtime.
//! You will find types like [`Perbill`](Perbill) being used often in pallet
//! development. `pezpallet_referenda` is a good example of a pallet which makes good use of fixed
//! You will find types like [`Perbill`](Perbill) being used often in pezpallet
//! development. `pezpallet_referenda` is a good example of a pezpallet which makes good use of fixed
//! point arithmetic, as it relies on representing various curves and thresholds relating to
//! governance.
//!
@@ -225,7 +225,7 @@ pub mod ecdsa_bls_crypto {
/// The `ConsensusEngineId` of BEEFY.
pub const BEEFY_ENGINE_ID: pezsp_runtime::ConsensusEngineId = *b"BEEF";
/// Authority set id starts with zero at BEEFY pallet genesis.
/// Authority set id starts with zero at BEEFY pezpallet genesis.
pub const GENESIS_AUTHORITY_SET_ID: u64 = 0;
/// A typedef for validator set id.
@@ -423,7 +423,7 @@ where
/// New BEEFY validator set notification hook.
pub trait OnNewValidatorSet<AuthorityId> {
/// Function called by the pallet when BEEFY validator set changes.
/// Function called by the pezpallet when BEEFY validator set changes.
fn on_new_validator_set(
validator_set: &ValidatorSet<AuthorityId>,
next_validator_set: &ValidatorSet<AuthorityId>,
@@ -56,7 +56,7 @@ pub trait LeafDataProvider {
/// in the leaf node appended MMR at this block.
///
/// This is being called by the `on_initialize` method of
/// this pallet at the very beginning of each block.
/// this pezpallet at the very beginning of each block.
fn leaf_data() -> Self::LeafData;
}
@@ -70,7 +70,7 @@ impl LeafDataProvider for () {
/// New MMR root notification hook.
pub trait OnNewRoot<Hash> {
/// Function called by the pallet in case new MMR root has been computed.
/// Function called by the pezpallet in case new MMR root has been computed.
fn on_new_root(root: &Hash);
}
@@ -402,8 +402,8 @@ pub enum Error {
/// Leaf not found in the storage.
#[cfg_attr(feature = "std", error("Leaf was not found"))]
LeafNotFound,
/// Mmr Pallet not included in runtime
#[cfg_attr(feature = "std", error("MMR pallet not included in runtime"))]
/// Mmr Pezpallet not included in runtime
#[cfg_attr(feature = "std", error("MMR pezpallet not included in runtime"))]
PalletNotIncluded,
/// Cannot find the requested leaf index
#[cfg_attr(feature = "std", error("Requested leaf index invalid"))]
@@ -439,7 +439,7 @@ impl Error {
}
pezsp_api::decl_runtime_apis! {
/// API to interact with MMR pallet.
/// API to interact with MMR pezpallet.
#[api_version(3)]
pub trait MmrApi<Hash: codec::Codec, BlockNumber: codec::Codec> {
/// Return the on-chain MMR root hash.
+25 -25
View File
@@ -31,7 +31,7 @@ use scale_info::{
/// When the IR does not contain enough information to generate a specific version
/// of the runtime metadata an appropriate default value is used (ie, empty vector).
pub struct MetadataIR<T: Form = MetaForm> {
/// Pallet metadata.
/// Pezpallet metadata.
pub pallets: Vec<PalletMetadataIR<T>>,
/// Metadata of the extrinsic.
pub extrinsic: ExtrinsicMetadataIR<T>,
@@ -121,7 +121,7 @@ impl IntoPortable for RuntimeApiMethodParamMetadataIR {
}
}
/// Metadata of a pallet view function method.
/// Metadata of a pezpallet view function method.
#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug)]
pub struct PalletViewFunctionMetadataIR<T: Form = MetaForm> {
/// Method name.
@@ -153,7 +153,7 @@ impl IntoPortable for PalletViewFunctionMetadataIR {
}
}
/// Metadata of a pallet view function method argument.
/// Metadata of a pezpallet view function method argument.
#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug)]
pub struct PalletViewFunctionParamMetadataIR<T: Form = MetaForm> {
/// Parameter name.
@@ -173,29 +173,29 @@ impl IntoPortable for PalletViewFunctionParamMetadataIR {
}
}
/// The intermediate representation for a pallet metadata.
/// The intermediate representation for a pezpallet metadata.
#[derive(Clone, PartialEq, Eq, Encode, Debug)]
pub struct PalletMetadataIR<T: Form = MetaForm> {
/// Pallet name.
/// Pezpallet name.
pub name: T::String,
/// Pallet storage metadata.
/// Pezpallet storage metadata.
pub storage: Option<PalletStorageMetadataIR<T>>,
/// Pallet calls metadata.
/// Pezpallet calls metadata.
pub calls: Option<PalletCallMetadataIR<T>>,
/// Pallet view functions metadata.
/// Pezpallet view functions metadata.
pub view_functions: Vec<PalletViewFunctionMetadataIR<T>>,
/// Pallet event metadata.
/// Pezpallet event metadata.
pub event: Option<PalletEventMetadataIR<T>>,
/// Pallet constants metadata.
/// Pezpallet constants metadata.
pub constants: Vec<PalletConstantMetadataIR<T>>,
/// Pallet error metadata.
/// Pezpallet error metadata.
pub error: Option<PalletErrorMetadataIR<T>>,
/// Config's trait associated types.
pub associated_types: Vec<PalletAssociatedTypeMetadataIR<T>>,
/// Define the index of the pallet, this index will be used for the encoding of pallet event,
/// Define the index of the pezpallet, this index will be used for the encoding of pezpallet event,
/// call and origin variants.
pub index: u8,
/// Pallet documentation.
/// Pezpallet documentation.
pub docs: Vec<T::String>,
/// Deprecation info
pub deprecation_info: ItemDeprecationInfoIR<T>,
@@ -263,7 +263,7 @@ impl IntoPortable for ExtrinsicMetadataIR {
}
}
/// Metadata of a pallet's associated type.
/// Metadata of a pezpallet's associated type.
#[derive(Clone, PartialEq, Eq, Encode, Debug)]
pub struct PalletAssociatedTypeMetadataIR<T: Form = MetaForm> {
/// The name of the associated type.
@@ -309,7 +309,7 @@ impl IntoPortable for TransactionExtensionMetadataIR {
}
}
/// All metadata of the pallet's storage.
/// All metadata of the pezpallet's storage.
#[derive(Clone, PartialEq, Eq, Encode, Debug)]
/// The common prefix used by all storage entries.
pub struct PalletStorageMetadataIR<T: Form = MetaForm> {
@@ -427,12 +427,12 @@ impl IntoPortable for StorageEntryTypeIR {
}
}
/// Metadata for all calls in a pallet
/// Metadata for all calls in a pezpallet
#[derive(Clone, PartialEq, Eq, Encode, Debug)]
pub struct PalletCallMetadataIR<T: Form = MetaForm> {
/// The corresponding enum type for the pallet call.
/// The corresponding enum type for the pezpallet call.
pub ty: T::Type,
/// Deprecation status of the pallet call
/// Deprecation status of the pezpallet call
pub deprecation_info: EnumDeprecationInfoIR<T>,
}
@@ -447,7 +447,7 @@ impl IntoPortable for PalletCallMetadataIR {
}
}
/// Metadata about the pallet Event type.
/// Metadata about the pezpallet Event type.
#[derive(Clone, PartialEq, Eq, Encode, Debug)]
pub struct PalletEventMetadataIR<T: Form = MetaForm> {
/// The Event type.
@@ -467,12 +467,12 @@ impl IntoPortable for PalletEventMetadataIR {
}
}
/// Metadata about one pallet constant.
/// Metadata about one pezpallet constant.
#[derive(Clone, PartialEq, Eq, Encode, Debug)]
pub struct PalletConstantMetadataIR<T: Form = MetaForm> {
/// Name of the pallet constant.
/// Name of the pezpallet constant.
pub name: T::String,
/// Type of the pallet constant.
/// Type of the pezpallet constant.
pub ty: T::Type,
/// Value stored in the constant (SCALE encoded).
pub value: Vec<u8>,
@@ -496,7 +496,7 @@ impl IntoPortable for PalletConstantMetadataIR {
}
}
/// Metadata about a pallet error.
/// Metadata about a pezpallet error.
#[derive(Clone, PartialEq, Eq, Encode, Debug)]
pub struct PalletErrorMetadataIR<T: Form = MetaForm> {
/// The error type information.
@@ -528,8 +528,8 @@ pub struct OuterEnumsIR<T: Form = MetaForm> {
///
/// The `Module` variant will be 5 scale encoded bytes which are normally decoded into
/// an `{ index: u8, error: [u8; 4] }` struct. This type ID points to an enum type which
/// instead interprets the first `index` byte as a pallet variant, and the remaining `error`
/// bytes as the appropriate `pallet::Error` type. It is an equally valid way to decode the
/// instead interprets the first `index` byte as a pezpallet variant, and the remaining `error`
/// bytes as the appropriate `pezpallet::Error` type. It is an equally valid way to decode the
/// error bytes, and can be more informative.
///
/// # Note
@@ -481,7 +481,7 @@ pub struct ElectionResult<AccountId, P: PerThing> {
///
/// This complements the [`ElectionResult`] and is needed to run the balancing post-processing.
///
/// This, at the current version, resembles the `Exposure` defined in the Staking pallet, yet they
/// This, at the current version, resembles the `Exposure` defined in the Staking pezpallet, yet they
/// do not necessarily have to be the same.
#[derive(RuntimeDebug, Encode, Decode, DecodeWithMemTracking, Clone, Eq, PartialEq, TypeInfo)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
+2 -2
View File
@@ -134,7 +134,7 @@ pub use pezsp_weights::Weight;
pub use either::Either;
/// The number of bytes of the module-specific `error` field defined in [`ModuleError`].
/// In FRAME, this is the maximum encoded size of a pallet error type.
/// In FRAME, this is the maximum encoded size of a pezpallet error type.
pub const MAX_MODULE_ERROR_ENCODED_SIZE: usize = 4;
/// An abstraction over justification for a block's validity under a consensus algorithm.
@@ -566,7 +566,7 @@ pub type DispatchResult = core::result::Result<(), DispatchError>;
/// about the `Dispatchable` that is only known post dispatch.
pub type DispatchResultWithInfo<T> = core::result::Result<T, DispatchErrorWithPostInfo<T>>;
/// Reason why a pallet call failed.
/// Reason why a pezpallet call failed.
#[derive(
Eq, Clone, Copy, Encode, Decode, DecodeWithMemTracking, Debug, TypeInfo, MaxEncodedLen,
)]
@@ -19,7 +19,7 @@
//! runtime. The `sp-trie` crate exposes all of these same functionality (and more), but this
//! library is designed to work more easily with runtime native types, which simply need to
//! implement `Encode`/`Decode`. It also exposes a runtime friendly `TrieError` type which can be
//! use inside of a FRAME Pallet.
//! use inside of a FRAME Pezpallet.
//!
//! Proofs are created with latest bizinikiwi trie format (`LayoutV1`), and are not compatible with
//! proofs using `LayoutV0`.
@@ -1279,7 +1279,7 @@ pub trait Header:
// via `HeaderFor` or `BlockNumberFor`.
//
// This is needed to fix the "cyclical" issue in loading Header/BlockNumber as part of a
// `pallet::call`. Essentially, `construct_runtime` aggregates all calls to create a `RuntimeCall`
// `pezpallet::call`. Essentially, `construct_runtime` aggregates all calls to create a `RuntimeCall`
// that is then used to define `UncheckedExtrinsic`.
// ```ignore
// pub type UncheckedExtrinsic =
@@ -2427,11 +2427,11 @@ pub trait BlockNumberProvider {
///
/// In case of using crate `pezsp_runtime` with the crate `pezframe-system`,
/// it is already implemented for
/// `pezframe_system::Pallet<T: Config>` as:
/// `pezframe_system::Pezpallet<T: Config>` as:
///
/// ```ignore
/// fn current_block_number() -> Self {
/// pezframe_system::Pallet<Config>::block_number()
/// pezframe_system::Pezpallet<Config>::block_number()
/// }
/// ```
/// .
+3 -3
View File
@@ -288,7 +288,7 @@ pub trait StakingInterface {
/// Checks whether the staker is a virtual account.
///
/// A virtual staker is an account whose locks are not managed by the [`StakingInterface`]
/// implementation but by an external pallet. See [`StakingUnchecked::virtual_bond`] for more
/// implementation but by an external pezpallet. See [`StakingUnchecked::virtual_bond`] for more
/// details.
fn is_virtual_staker(who: &Self::AccountId) -> bool;
@@ -324,13 +324,13 @@ pub trait StakingInterface {
pub trait StakingUnchecked: StakingInterface {
/// Migrate an existing staker to a virtual staker.
///
/// It would release all funds held by the implementation pallet.
/// It would release all funds held by the implementation pezpallet.
fn migrate_to_virtual_staker(who: &Self::AccountId) -> DispatchResult;
/// Book-keep a new bond for `keyless_who` without applying any locks (hence virtual).
///
/// It is important that `keyless_who` is a keyless account and therefore cannot interact with
/// staking pallet directly. Caller is responsible for ensuring the passed amount is locked and
/// staking pezpallet directly. Caller is responsible for ensuring the passed amount is locked and
/// valid.
fn virtual_bond(
keyless_who: &Self::AccountId,
+1 -1
View File
@@ -201,7 +201,7 @@ pub struct OffenceDetails<Reporter, Offender> {
pub trait OffenceReportSystem<Reporter, Evidence> {
/// Longevity, in blocks, for the evidence report validity.
///
/// For example, when using the staking pallet this should be set equal
/// For example, when using the staking pezpallet this should be set equal
/// to the bonding duration in blocks, not eras.
type Longevity: Get<u64>;
+6 -6
View File
@@ -206,19 +206,19 @@ pub struct RuntimeVersion {
/// All existing calls (dispatchables) are fully compatible when this number doesn't change. If
/// this number changes, then [`spec_version`](Self::spec_version) must change, also.
///
/// This number must change when an existing call (pallet index, call index) is changed,
/// This number must change when an existing call (pezpallet index, call index) is changed,
/// either through an alteration in its user-level semantics, a parameter
/// added/removed, a parameter type changed, or a call/pallet changing its index. An alteration
/// added/removed, a parameter type changed, or a call/pezpallet changing its index. An alteration
/// of the user level semantics is for example when the call was before `transfer` and now is
/// `transfer_all`, the semantics of the call changed completely.
///
/// Removing a pallet or a call doesn't require a *bump* as long as no pallet or call is put at
/// Removing a pezpallet or a call doesn't require a *bump* as long as no pezpallet or call is put at
/// the same index. Removing doesn't require a bump as the chain will reject a transaction
/// referencing this removed call/pallet while decoding and thus, the user isn't at risk to
/// execute any unknown call. FRAME runtime devs have control over the index of a call/pallet
/// referencing this removed call/pezpallet while decoding and thus, the user isn't at risk to
/// execute any unknown call. FRAME runtime devs have control over the index of a call/pezpallet
/// to prevent that an index gets reused.
///
/// Adding a new pallet or call also doesn't require a *bump* as long as they also don't reuse
/// Adding a new pezpallet or call also doesn't require a *bump* as long as they also don't reuse
/// any previously used index.
///
/// This number should never decrease.