Refactoring Checkpoint: (WIP)

This commit is contained in:
2025-12-14 10:29:31 +03:00
parent 09735eb97a
commit c89d7cac55
1424 changed files with 6415 additions and 6064 deletions
@@ -3,4 +3,4 @@ These runtimes are used for benchmarking the `set_code` intrinsic.
**Don't use them in production environments!**
To update the just copy the new runtime from
`target/release/wbuild/kitchensink-runtime/kitchensink_runtime.compact.compressed.wasm` to here.
`target/release/wbuild/pez-kitchensink-runtime/pez_kitchensink_runtime.compact.compressed.wasm` to here.
@@ -29,9 +29,9 @@ pub struct Pallet<T: Config>(System<T>);
pub trait Config: pezframe_system::Config {
/// Adds ability to the Runtime to test against their sample code.
///
/// Default is `../res/kitchensink_runtime.compact.compressed.wasm`.
/// Default is `../res/pez_kitchensink_runtime.compact.compressed.wasm`.
fn prepare_set_code_data() -> Vec<u8> {
include_bytes!("../res/kitchensink_runtime.compact.compressed.wasm").to_vec()
include_bytes!("../res/pez_kitchensink_runtime.compact.compressed.wasm").to_vec()
}
/// Adds ability to the Runtime to prepare/initialize before running benchmark `set_code`.
+4 -4
View File
@@ -785,20 +785,20 @@ pub mod pallet {
/// Kill all storage items with a key that starts with the given prefix.
///
/// **NOTE:** We rely on the Root origin to provide us the number of subkeys under
/// **NOTE:** We rely on the Root origin to provide us the number of pez_subkeys under
/// the prefix we are removing to accurately calculate the weight of this function.
#[pallet::call_index(6)]
#[pallet::weight((
T::SystemWeightInfo::kill_prefix(subkeys.saturating_add(1)),
T::SystemWeightInfo::kill_prefix(pez_subkeys.saturating_add(1)),
DispatchClass::Operational,
))]
pub fn kill_prefix(
origin: OriginFor<T>,
prefix: Key,
subkeys: u32,
pez_subkeys: u32,
) -> DispatchResultWithPostInfo {
ensure_root(origin)?;
let _ = storage::unhashed::clear_prefix(&prefix, Some(subkeys), None);
let _ = storage::unhashed::clear_prefix(&prefix, Some(pez_subkeys), None);
Ok(().into())
}
+1 -1
View File
@@ -46,7 +46,7 @@
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
// --runtime=target/production/wbuild/pez-kitchensink-runtime/pez_kitchensink_runtime.wasm
// --pallet=pezframe_system
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/bizinikiwi/HEADER-APACHE2
// --output=/__w/pezkuwi-sdk/pezkuwi-sdk/bizinikiwi/pezframe/system/src/weights.rs