mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 21:51:06 +00:00
* update benchmark * add host function * update Substrate * fix unused Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+153
-153
File diff suppressed because it is too large
Load Diff
@@ -804,8 +804,12 @@ impl_runtime_apis! {
|
|||||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||||
fn dispatch_benchmark(
|
fn dispatch_benchmark(
|
||||||
config: frame_benchmarking::BenchmarkConfig,
|
config: frame_benchmarking::BenchmarkConfig,
|
||||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
|
) -> Result<
|
||||||
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, add_benchmark};
|
(Vec<frame_benchmarking::BenchmarkBatch>, Vec<frame_support::traits::StorageInfo>),
|
||||||
|
sp_runtime::RuntimeString,
|
||||||
|
> {
|
||||||
|
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
|
||||||
|
use frame_support::traits::StorageInfoTrait;
|
||||||
|
|
||||||
let whitelist: Vec<TrackedStorageKey> = vec![
|
let whitelist: Vec<TrackedStorageKey> = vec![
|
||||||
// Block Number
|
// Block Number
|
||||||
@@ -1047,7 +1051,8 @@ impl_runtime_apis! {
|
|||||||
add_benchmark!(params, batches, pallet_bridge_grandpa, BridgeMillauGrandpa);
|
add_benchmark!(params, batches, pallet_bridge_grandpa, BridgeMillauGrandpa);
|
||||||
|
|
||||||
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
||||||
Ok(batches)
|
let storage_info = AllPalletsWithSystem::storage_info();
|
||||||
|
Ok((batches, storage_info))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,6 +213,10 @@ impl sp_externalities::Externalities for ValidationExternalities {
|
|||||||
fn set_offchain_storage(&mut self, _: &[u8], _: std::option::Option<&[u8]>) {
|
fn set_offchain_storage(&mut self, _: &[u8], _: std::option::Option<&[u8]>) {
|
||||||
panic!("set_offchain_storage: unsupported feature for parachain validation")
|
panic!("set_offchain_storage: unsupported feature for parachain validation")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn get_read_and_written_keys(&self) -> Vec<(Vec<u8>, u32, u32, bool)> {
|
||||||
|
panic!("get_read_and_written_keys: unsupported feature for parachain validation")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl sp_externalities::ExtensionStore for ValidationExternalities {
|
impl sp_externalities::ExtensionStore for ValidationExternalities {
|
||||||
|
|||||||
@@ -73,8 +73,6 @@ use sp_runtime::{
|
|||||||
Extrinsic as ExtrinsicT, SaturatedConversion, Verify,
|
Extrinsic as ExtrinsicT, SaturatedConversion, Verify,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
|
||||||
use sp_runtime::RuntimeString;
|
|
||||||
use sp_version::RuntimeVersion;
|
use sp_version::RuntimeVersion;
|
||||||
use pallet_grandpa::{AuthorityId as GrandpaId, fg_primitives};
|
use pallet_grandpa::{AuthorityId as GrandpaId, fg_primitives};
|
||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
@@ -1841,8 +1839,12 @@ sp_api::impl_runtime_apis! {
|
|||||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||||
fn dispatch_benchmark(
|
fn dispatch_benchmark(
|
||||||
config: frame_benchmarking::BenchmarkConfig
|
config: frame_benchmarking::BenchmarkConfig
|
||||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, RuntimeString> {
|
) -> Result<
|
||||||
|
(Vec<frame_benchmarking::BenchmarkBatch>, Vec<frame_support::traits::StorageInfo>),
|
||||||
|
sp_runtime::RuntimeString,
|
||||||
|
> {
|
||||||
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
|
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
|
||||||
|
use frame_support::traits::StorageInfoTrait;
|
||||||
// Trying to add benchmarks directly to the Session Pallet caused cyclic dependency issues.
|
// Trying to add benchmarks directly to the Session Pallet caused cyclic dependency issues.
|
||||||
// To get around that, we separated the Session benchmarks into its own crate, which is why
|
// To get around that, we separated the Session benchmarks into its own crate, which is why
|
||||||
// we need these two lines below.
|
// we need these two lines below.
|
||||||
@@ -1905,7 +1907,8 @@ sp_api::impl_runtime_apis! {
|
|||||||
add_benchmark!(params, batches, pallet_vesting, Vesting);
|
add_benchmark!(params, batches, pallet_vesting, Vesting);
|
||||||
|
|
||||||
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
||||||
Ok(batches)
|
let storage_info = AllPalletsWithSystem::storage_info();
|
||||||
|
Ok((batches, storage_info))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ use sp_runtime::{
|
|||||||
Extrinsic as ExtrinsicT, SaturatedConversion, Verify,
|
Extrinsic as ExtrinsicT, SaturatedConversion, Verify,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
|
||||||
use sp_runtime::RuntimeString;
|
|
||||||
use sp_version::RuntimeVersion;
|
use sp_version::RuntimeVersion;
|
||||||
use pallet_grandpa::{AuthorityId as GrandpaId, fg_primitives};
|
use pallet_grandpa::{AuthorityId as GrandpaId, fg_primitives};
|
||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
@@ -1397,8 +1395,12 @@ sp_api::impl_runtime_apis! {
|
|||||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||||
fn dispatch_benchmark(
|
fn dispatch_benchmark(
|
||||||
config: frame_benchmarking::BenchmarkConfig
|
config: frame_benchmarking::BenchmarkConfig
|
||||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, RuntimeString> {
|
) -> Result<
|
||||||
|
(Vec<frame_benchmarking::BenchmarkBatch>, Vec<frame_support::traits::StorageInfo>),
|
||||||
|
sp_runtime::RuntimeString,
|
||||||
|
> {
|
||||||
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
|
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
|
||||||
|
use frame_support::traits::StorageInfoTrait;
|
||||||
// Trying to add benchmarks directly to the Session Pallet caused cyclic dependency issues.
|
// Trying to add benchmarks directly to the Session Pallet caused cyclic dependency issues.
|
||||||
// To get around that, we separated the Session benchmarks into its own crate, which is why
|
// To get around that, we separated the Session benchmarks into its own crate, which is why
|
||||||
// we need these two lines below.
|
// we need these two lines below.
|
||||||
@@ -1456,7 +1458,8 @@ sp_api::impl_runtime_apis! {
|
|||||||
add_benchmark!(params, batches, pallet_vesting, Vesting);
|
add_benchmark!(params, batches, pallet_vesting, Vesting);
|
||||||
|
|
||||||
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
||||||
Ok(batches)
|
let storage_info = AllPalletsWithSystem::storage_info();
|
||||||
|
Ok((batches, storage_info))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,8 +73,6 @@ use sp_runtime::{
|
|||||||
Extrinsic as ExtrinsicT, SaturatedConversion, Verify,
|
Extrinsic as ExtrinsicT, SaturatedConversion, Verify,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
|
||||||
use sp_runtime::RuntimeString;
|
|
||||||
use sp_version::RuntimeVersion;
|
use sp_version::RuntimeVersion;
|
||||||
use pallet_grandpa::{AuthorityId as GrandpaId, fg_primitives};
|
use pallet_grandpa::{AuthorityId as GrandpaId, fg_primitives};
|
||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
@@ -1433,8 +1431,12 @@ sp_api::impl_runtime_apis! {
|
|||||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||||
fn dispatch_benchmark(
|
fn dispatch_benchmark(
|
||||||
config: frame_benchmarking::BenchmarkConfig,
|
config: frame_benchmarking::BenchmarkConfig,
|
||||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, RuntimeString> {
|
) -> Result<
|
||||||
|
(Vec<frame_benchmarking::BenchmarkBatch>, Vec<frame_support::traits::StorageInfo>),
|
||||||
|
sp_runtime::RuntimeString,
|
||||||
|
> {
|
||||||
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
|
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
|
||||||
|
use frame_support::traits::StorageInfoTrait;
|
||||||
// Trying to add benchmarks directly to the Session Pallet caused cyclic dependency issues.
|
// Trying to add benchmarks directly to the Session Pallet caused cyclic dependency issues.
|
||||||
// To get around that, we separated the Session benchmarks into its own crate, which is why
|
// To get around that, we separated the Session benchmarks into its own crate, which is why
|
||||||
// we need these two lines below.
|
// we need these two lines below.
|
||||||
@@ -1489,7 +1491,8 @@ sp_api::impl_runtime_apis! {
|
|||||||
add_benchmark!(params, batches, pallet_vesting, Vesting);
|
add_benchmark!(params, batches, pallet_vesting, Vesting);
|
||||||
|
|
||||||
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
||||||
Ok(batches)
|
let storage_info = AllPalletsWithSystem::storage_info();
|
||||||
|
Ok((batches, storage_info))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user