chore: regenerate umbrella crate, fix feature propagation

This commit is contained in:
2025-12-16 11:28:32 +03:00
parent dd6d48f528
commit 620b0e3aa0
1358 changed files with 9464 additions and 7656 deletions
@@ -28,8 +28,8 @@ use pezframe_support::{
};
use pezframe_system::{
pezpallet_prelude::*, CheckGenesis, CheckMortality, CheckNonZeroSender, CheckNonce,
CheckSpecVersion, CheckTxVersion, CheckWeight, Config, ExtensionsWeightInfo, Pezpallet as System,
RawOrigin, WeightReclaim,
CheckSpecVersion, CheckTxVersion, CheckWeight, Config, ExtensionsWeightInfo,
Pezpallet as System, RawOrigin, WeightReclaim,
};
use pezsp_runtime::{
generic::Era,
@@ -260,7 +260,8 @@ mod benchmarks {
let base_extrinsic = <T as pezframe_system::Config>::BlockWeights::get()
.get(DispatchClass::Normal)
.base_extrinsic;
let extension_weight = <T as pezframe_system::Config>::ExtensionsWeightInfo::weight_reclaim();
let extension_weight =
<T as pezframe_system::Config>::ExtensionsWeightInfo::weight_reclaim();
let info = DispatchInfo {
call_weight: Weight::from_parts(base_extrinsic.ref_time() * 5, 0),
extension_weight,
@@ -230,8 +230,9 @@ mod tests {
let info = tx.get_dispatch_info();
let len = tx.using_encoded(|e| e.len());
let checked = Checkable::check(tx, &pezframe_system::ChainContext::<Runtime>::default())
.expect("Transaction is general so signature is good");
let checked =
Checkable::check(tx, &pezframe_system::ChainContext::<Runtime>::default())
.expect("Transaction is general so signature is good");
let valid_tx = checked
.validate::<Runtime>(TransactionSource::External, &info, len)
@@ -263,8 +264,9 @@ mod tests {
let info = tx.get_dispatch_info();
let len = tx.using_encoded(|e| e.len());
let checked = Checkable::check(tx, &pezframe_system::ChainContext::<Runtime>::default())
.expect("Transaction is general so signature is good");
let checked =
Checkable::check(tx, &pezframe_system::ChainContext::<Runtime>::default())
.expect("Transaction is general so signature is good");
let validate_err = checked
.validate::<Runtime>(TransactionSource::External, &info, len)
@@ -292,8 +294,9 @@ mod tests {
let info = tx.get_dispatch_info();
let len = tx.using_encoded(|e| e.len());
let checked = Checkable::check(tx, &pezframe_system::ChainContext::<Runtime>::default())
.expect("Signature is good");
let checked =
Checkable::check(tx, &pezframe_system::ChainContext::<Runtime>::default())
.expect("Signature is good");
checked
.validate::<Runtime>(TransactionSource::External, &info, len)
@@ -314,7 +317,8 @@ mod tests {
fn call_filter_preserved() {
new_test_ext().execute_with(|| {
let ext = pezframe_system::AuthorizeCall::<Runtime>::new();
let filtered_call = RuntimeCall::System(pezframe_system::Call::remark { remark: vec![] });
let filtered_call =
RuntimeCall::System(pezframe_system::Call::remark { remark: vec![] });
let origin = {
let mut o: RuntimeOrigin = crate::Origin::<Runtime>::Signed(42).into();
@@ -17,12 +17,12 @@
use crate::{pezpallet_prelude::BlockNumberFor, Config, Pezpallet};
use codec::{Decode, DecodeWithMemTracking, Encode};
use scale_info::TypeInfo;
use pezsp_runtime::{
impl_tx_ext_default,
traits::{TransactionExtension, Zero},
transaction_validity::TransactionValidityError,
};
use scale_info::TypeInfo;
/// Genesis hash check to provide replay protection between different networks.
///
@@ -18,13 +18,13 @@
use crate::{pezpallet_prelude::BlockNumberFor, BlockHash, Config, Pezpallet};
use codec::{Decode, DecodeWithMemTracking, Encode};
use pezframe_support::pezpallet_prelude::TransactionSource;
use scale_info::TypeInfo;
use pezsp_runtime::{
generic::Era,
impl_tx_ext_default,
traits::{DispatchInfoOf, SaturatedConversion, TransactionExtension, ValidateResult},
transaction_validity::{InvalidTransaction, TransactionValidityError, ValidTransaction},
};
use scale_info::TypeInfo;
/// Check for transaction mortality.
///
@@ -19,12 +19,12 @@ use crate::Config;
use codec::{Decode, DecodeWithMemTracking, Encode};
use core::marker::PhantomData;
use pezframe_support::{pezpallet_prelude::TransactionSource, traits::OriginTrait, DefaultNoBound};
use scale_info::TypeInfo;
use pezsp_runtime::{
impl_tx_ext_default,
traits::{DispatchInfoOf, TransactionExtension},
transaction_validity::InvalidTransaction,
};
use scale_info::TypeInfo;
/// Check to ensure that the sender is not the zero address.
#[derive(Encode, Decode, DecodeWithMemTracking, DefaultNoBound, Clone, Eq, PartialEq, TypeInfo)]
@@ -24,7 +24,6 @@ use codec::{Decode, DecodeWithMemTracking, Encode};
use pezframe_support::{
dispatch::DispatchInfo, pezpallet_prelude::TransactionSource, RuntimeDebugNoBound,
};
use scale_info::TypeInfo;
use pezsp_runtime::{
traits::{
AsSystemOriginSigner, CheckedAdd, DispatchInfoOf, Dispatchable, One, PostDispatchInfoOf,
@@ -36,6 +35,7 @@ use pezsp_runtime::{
DispatchResult, Saturating,
};
use pezsp_weights::Weight;
use scale_info::TypeInfo;
/// Nonce check and increment to give replay protection for transactions.
///
@@ -17,11 +17,11 @@
use crate::{Config, Pezpallet};
use codec::{Decode, DecodeWithMemTracking, Encode};
use scale_info::TypeInfo;
use pezsp_runtime::{
impl_tx_ext_default, traits::TransactionExtension,
transaction_validity::TransactionValidityError,
};
use scale_info::TypeInfo;
/// Ensure the runtime version registered in the transaction is the same as at present.
///
@@ -17,11 +17,11 @@
use crate::{Config, Pezpallet};
use codec::{Decode, DecodeWithMemTracking, Encode};
use scale_info::TypeInfo;
use pezsp_runtime::{
impl_tx_ext_default, traits::TransactionExtension,
transaction_validity::TransactionValidityError,
};
use scale_info::TypeInfo;
/// Ensure the transaction version registered in the transaction is the same as at present.
///
@@ -22,7 +22,6 @@ use pezframe_support::{
pezpallet_prelude::TransactionSource,
traits::Get,
};
use scale_info::TypeInfo;
use pezsp_runtime::{
traits::{
DispatchInfoOf, Dispatchable, PostDispatchInfoOf, TransactionExtension, ValidateResult,
@@ -31,6 +30,7 @@ use pezsp_runtime::{
DispatchResult,
};
use pezsp_weights::Weight;
use scale_info::TypeInfo;
/// Block resource (weight) limit check.
///
@@ -18,7 +18,6 @@
use crate::Config;
use codec::{Decode, DecodeWithMemTracking, Encode};
use pezframe_support::dispatch::{DispatchInfo, PostDispatchInfo};
use scale_info::TypeInfo;
use pezsp_runtime::{
traits::{
DispatchInfoOf, Dispatchable, PostDispatchInfoOf, TransactionExtension, ValidateResult,
@@ -27,6 +26,7 @@ use pezsp_runtime::{
DispatchResult,
};
use pezsp_weights::Weight;
use scale_info::TypeInfo;
/// Reclaim the unused weight using the post dispatch information
///
+11 -11
View File
@@ -17,8 +17,8 @@
//! # System Pezpallet
//!
//! The System pezpallet provides low-level access to core types and cross-cutting utilities. It acts
//! as the base layer for other pallets to interact with the Bizinikiwi framework components.
//! The System pezpallet provides low-level access to core types and cross-cutting utilities. It
//! acts as the base layer for other pallets to interact with the Bizinikiwi framework components.
//!
//! - [`Config`]
//!
@@ -37,8 +37,8 @@
//!
//! ### Dispatchable Functions
//!
//! The System pezpallet provides dispatchable functions that, with the exception of `remark`, manage
//! low-level or privileged functionality of a Bizinikiwi-based runtime.
//! The System pezpallet provides dispatchable functions that, with the exception of `remark`,
//! manage low-level or privileged functionality of a Bizinikiwi-based runtime.
//!
//! - `remark`: Make some on-chain remark.
//! - `set_heap_pages`: Set the number of pages in the WebAssembly environment's heap.
@@ -102,8 +102,6 @@ extern crate alloc;
use alloc::{borrow::Cow, boxed::Box, vec, vec::Vec};
use core::{fmt::Debug, marker::PhantomData};
use pezpallet_prelude::{BlockNumberFor, HeaderFor};
#[cfg(feature = "std")]
use serde::Serialize;
use pezsp_io::hashing::blake2_256;
#[cfg(feature = "runtime-benchmarks")]
use pezsp_runtime::traits::TrailingZeroInput;
@@ -121,6 +119,8 @@ use pezsp_runtime::{
DispatchError, RuntimeDebug,
};
use pezsp_version::RuntimeVersion;
#[cfg(feature = "std")]
use serde::Serialize;
use codec::{Decode, DecodeWithMemTracking, Encode, EncodeLike, FullCodec, MaxEncodedLen};
#[cfg(feature = "std")]
@@ -142,13 +142,13 @@ use pezframe_support::{
},
Parameter,
};
use scale_info::TypeInfo;
use pezsp_core::storage::well_known_keys;
use pezsp_runtime::{
traits::{DispatchInfoOf, PostDispatchInfoOf},
transaction_validity::TransactionValidityError,
};
use pezsp_weights::{RuntimeDbWeight, Weight, WeightMeter};
use scale_info::TypeInfo;
#[cfg(any(feature = "std", test))]
use pezsp_io::TestExternalities;
@@ -592,8 +592,8 @@ pub mod pezpallet {
///
/// Used to define the type and conversion mechanism for referencing accounts in
/// transactions. It's perfectly reasonable for this to be an identity conversion (with the
/// source type being `AccountId`), but other pallets (e.g. Indices pezpallet) may provide more
/// functional/efficient alternatives.
/// source type being `AccountId`), but other pallets (e.g. Indices pezpallet) may provide
/// more functional/efficient alternatives.
type Lookup: StaticLookup<Target = Self::AccountId>;
/// The Block type used by the runtime. This is used by `construct_runtime` to retrieve the
@@ -672,8 +672,8 @@ pub mod pezpallet {
/// The migrator that is used to run Multi-Block-Migrations.
///
/// Can be set to [`pezpallet-migrations`] or an alternative implementation of the interface.
/// The diagram in `pezframe_executive::block_flowchart` explains when it runs.
/// Can be set to [`pezpallet-migrations`] or an alternative implementation of the
/// interface. The diagram in `pezframe_executive::block_flowchart` explains when it runs.
type MultiBlockMigrator: MultiStepMigrator;
/// A callback that executes in *every block* directly before all inherents were applied.
+1 -1
View File
@@ -29,8 +29,8 @@ use pezframe_support::{
dispatch::{DispatchClass, OneOrMany, PerDispatchClass},
weights::{constants, Weight},
};
use scale_info::TypeInfo;
use pezsp_runtime::{traits::Bounded, Perbill, RuntimeDebug};
use scale_info::TypeInfo;
/// Block length limit configuration.
#[derive(RuntimeDebug, Clone, codec::Encode, codec::Decode, TypeInfo)]
+2 -1
View File
@@ -33,7 +33,8 @@ pub type MockBlock<T> = generic::Block<
MockUncheckedExtrinsic<T>,
>;
/// An implementation of `pezsp_runtime::traits::Block` to be used in tests with u32 BlockNumber type.
/// An implementation of `pezsp_runtime::traits::Block` to be used in tests with u32 BlockNumber
/// type.
pub type MockBlockU32<T> = generic::Block<
generic::Header<u32, pezsp_runtime::traits::BlakeTwo256>,
MockUncheckedExtrinsic<T>,
+7 -5
View File
@@ -26,8 +26,8 @@
//!
//! ## Usage
//!
//! Please refer to [`example-offchain-worker`](../../pezpallet_example_offchain_worker/index.html) for
//! a concrete example usage of this crate.
//! Please refer to [`example-offchain-worker`](../../pezpallet_example_offchain_worker/index.html)
//! for a concrete example usage of this crate.
//!
//! ### Submit a raw unsigned transaction
//!
@@ -58,12 +58,12 @@
use alloc::{boxed::Box, collections::btree_set::BTreeSet, vec::Vec};
use codec::Encode;
use scale_info::TypeInfo;
use pezsp_runtime::{
app_crypto::RuntimeAppPublic,
traits::{ExtrinsicLike, IdentifyAccount, One},
RuntimeDebug,
};
use scale_info::TypeInfo;
/// Marker struct used to flag using all supported keys to sign a payload.
pub struct ForAll {}
@@ -542,12 +542,14 @@ pub trait SignMessage<T: SigningTypes> {
pub trait CreateAuthorizedTransaction<LocalCall>: CreateTransaction<LocalCall> {
/// Create the transaction extension to be used alongside an authorized call.
///
/// For more information about authorized call see [`pezframe_support::pezpallet_prelude::authorize`].
/// For more information about authorized call see
/// [`pezframe_support::pezpallet_prelude::authorize`].
fn create_extension() -> Self::Extension;
/// Create a new transaction for an authorized call.
///
/// For more information about authorized call see [`pezframe_support::pezpallet_prelude::authorize`].
/// For more information about authorized call see
/// [`pezframe_support::pezpallet_prelude::authorize`].
fn create_authorized_transaction(call: Self::RuntimeCall) -> Self::Extrinsic {
Self::create_transaction(call, Self::create_extension())
}
+7 -4
View File
@@ -16,19 +16,19 @@
// limitations under the License.
use crate::*;
use bizinikiwi_test_runtime_client::WasmExecutor;
use mock::{RuntimeOrigin, *};
use pezframe_support::{
assert_noop, assert_ok,
dispatch::{Pays, PostDispatchInfo, WithPostDispatchInfo},
traits::{OnRuntimeUpgrade, WhitelistedStorageKeys},
};
use mock::{RuntimeOrigin, *};
use pezsp_core::{hexdisplay::HexDisplay, H256};
use pezsp_runtime::{
traits::{BlakeTwo256, Header},
DispatchError, DispatchErrorWithPostInfo,
};
use std::collections::BTreeSet;
use bizinikiwi_test_runtime_client::WasmExecutor;
#[test]
fn check_whitelist() {
@@ -650,7 +650,9 @@ fn set_code_checks_works() {
let read_runtime_version = ReadRuntimeVersion(version.encode());
let mut ext = new_test_ext();
ext.register_extension(pezsp_core::traits::ReadRuntimeVersionExt::new(read_runtime_version));
ext.register_extension(pezsp_core::traits::ReadRuntimeVersionExt::new(
read_runtime_version,
));
ext.execute_with(|| {
let res = System::set_code(RawOrigin::Root.into(), vec![1, 2, 3, 4]);
@@ -744,7 +746,8 @@ fn set_code_via_authorization_works() {
assert_eq!(System::authorized_upgrade().unwrap().code_hash(), &hash);
// Can't be sneaky
let mut bad_runtime = bizinikiwi_test_runtime_client::runtime::wasm_binary_unwrap().to_vec();
let mut bad_runtime =
bizinikiwi_test_runtime_client::runtime::wasm_binary_unwrap().to_vec();
bad_runtime.extend(b"sneaky");
assert_noop!(
System::apply_authorized_upgrade(RawOrigin::None.into(), bad_runtime),