From 59f845228c21e0445bc36cd642a5e16e515b2aaf Mon Sep 17 00:00:00 2001 From: Albrecht Date: Mon, 23 Jan 2023 15:50:27 +0100 Subject: [PATCH] fix: add public credentials to benchmark (#455) Brings the two runtimes back to sync. The diff between the peregrine and spiritnet runtime is now minimal again. Also one comment was outdated and the public credentials are not part of the benchmarks for spiritnet. --- runtimes/peregrine/src/lib.rs | 3 +-- runtimes/spiritnet/src/lib.rs | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/runtimes/peregrine/src/lib.rs b/runtimes/peregrine/src/lib.rs index f2147f763..57bfa54be 100644 --- a/runtimes/peregrine/src/lib.rs +++ b/runtimes/peregrine/src/lib.rs @@ -660,7 +660,6 @@ impl parachain_staking::Config for Runtime { type MaxUnstakeRequests = constants::staking::MaxUnstakeRequests; type NetworkRewardRate = constants::staking::NetworkRewardRate; type NetworkRewardStart = constants::staking::NetworkRewardStart; - type NetworkRewardBeneficiary = Treasury; type WeightInfo = weights::parachain_staking::WeightInfo; @@ -1010,8 +1009,8 @@ impl did::DeriveDidCallAuthorizationVerificationKeyRelationship for RuntimeCall RuntimeCall::Did(did::Call::create { .. }) => Err(did::RelationshipDeriveError::NotCallableByDid), RuntimeCall::Did { .. } => Ok(did::DidVerificationKeyRelationship::Authentication), RuntimeCall::Web3Names { .. } => Ok(did::DidVerificationKeyRelationship::Authentication), - RuntimeCall::DidLookup { .. } => Ok(did::DidVerificationKeyRelationship::Authentication), RuntimeCall::PublicCredentials { .. } => Ok(did::DidVerificationKeyRelationship::AssertionMethod), + RuntimeCall::DidLookup { .. } => Ok(did::DidVerificationKeyRelationship::Authentication), RuntimeCall::Utility(pallet_utility::Call::batch { calls }) => single_key_relationship(&calls[..]), RuntimeCall::Utility(pallet_utility::Call::batch_all { calls }) => single_key_relationship(&calls[..]), RuntimeCall::Utility(pallet_utility::Call::force_batch { calls }) => single_key_relationship(&calls[..]), diff --git a/runtimes/spiritnet/src/lib.rs b/runtimes/spiritnet/src/lib.rs index 103e43ab9..2d48a4c01 100644 --- a/runtimes/spiritnet/src/lib.rs +++ b/runtimes/spiritnet/src/lib.rs @@ -72,12 +72,12 @@ use sp_version::NativeVersion; #[cfg(feature = "runtime-benchmarks")] use {frame_system::EnsureSigned, kilt_support::signature::AlwaysVerify, runtime_common::benchmarks::DummySignature}; -#[cfg(test)] -mod tests; - #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; +#[cfg(test)] +mod tests; + mod weights; mod xcm_config; @@ -222,8 +222,6 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ReservedDmpWeight = ReservedDmpWeight; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; - // We temporarily control this via the RelayMigration pallet which can toggle - // between strict and any. type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; } @@ -1084,6 +1082,7 @@ mod benches { [pallet_inflation, Inflation] [parachain_staking, ParachainStaking] [pallet_web3_names, Web3Names] + [public_credentials, PublicCredentials] // Substrate [frame_benchmarking::baseline, Baseline::] [frame_system, SystemBench::]