Skip to content

Commit

Permalink
fix: add public credentials to benchmark (#455)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
weichweich authored Jan 23, 2023
1 parent eecde66 commit 59f8452
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions runtimes/peregrine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Runtime>;

Expand Down Expand Up @@ -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[..]),
Expand Down
9 changes: 4 additions & 5 deletions runtimes/spiritnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -1084,6 +1082,7 @@ mod benches {
[pallet_inflation, Inflation]
[parachain_staking, ParachainStaking]
[pallet_web3_names, Web3Names]
[public_credentials, PublicCredentials]
// Substrate
[frame_benchmarking::baseline, Baseline::<Runtime>]
[frame_system, SystemBench::<Runtime>]
Expand Down

0 comments on commit 59f8452

Please sign in to comment.