1616
1717// If you feel like getting in touch with us, you can do so at [email protected] 1818
19- use did:: {
20- did_details:: { DidEncryptionKey , DidPublicKeyDetails , DidVerificationKey } ,
21- DidSignature , DidVerificationKeyRelationship , KeyIdOf ,
22- } ;
19+ use did:: { DidVerificationKeyRelationship , KeyIdOf } ;
2320use dip_provider_runtime_template:: {
24- AccountId as ProviderAccountId , Runtime as ProviderRuntime , MAX_REVEALABLE_LINKED_ACCOUNTS ,
25- MAX_TOTAL_KEY_AGREEMENT_KEYS ,
21+ AccountId as ProviderAccountId , Runtime as ProviderRuntime , MAX_PUBLIC_KEYS_PER_DID , MAX_REVEALABLE_LINKED_ACCOUNTS ,
2622} ;
27- use frame_support:: { pallet_prelude :: ValueQuery , storage_alias , traits:: Contains } ;
23+ use frame_support:: traits:: Contains ;
2824use frame_system:: { pallet_prelude:: BlockNumberFor , EnsureSigned } ;
2925use kilt_dip_primitives:: {
3026 parachain:: {
@@ -33,22 +29,17 @@ use kilt_dip_primitives::{
3329 DEFAULT_MAX_PROVIDER_HEAD_PROOF_LEAVE_COUNT , DEFAULT_MAX_PROVIDER_HEAD_PROOF_LEAVE_SIZE ,
3430 } ,
3531 traits:: DipCallOriginFilter ,
36- DidKeyRelationship , DidMerkleProof , DipCommitmentStateProof , KiltVersionedParachainVerifier , ParachainDipDidProof ,
37- ProviderHeadStateProof , RelayStateRootsViaRelayStorePallet , RevealedAccountId , RevealedDidKey , RevealedWeb3Name ,
38- TimeBoundDidSignature ,
32+ KiltVersionedParachainVerifier , RelayStateRootsViaRelayStorePallet , RevealedDidKey ,
3933} ;
40- use pallet_dip_consumer:: { benchmarking:: WorstCaseOf , traits:: IdentityProofVerifier } ;
41- use pallet_relay_store:: RelayParentInfo ;
34+ use pallet_dip_consumer:: traits:: IdentityProofVerifier ;
4235use rococo_runtime:: Runtime as RelaychainRuntime ;
4336use sp_core:: ConstU32 ;
44- use sp_runtime:: AccountId32 ;
4537use sp_std:: { marker:: PhantomData , vec:: Vec } ;
4638
4739use crate :: { weights, AccountId , DidIdentifier , Runtime , RuntimeCall , RuntimeOrigin } ;
4840
49- // 3 is the attestation, delegation, and authentication key.
50- // 1 is the web3name.
51- const MAX_PROVIDER_REVEALABLE_KEYS_COUNT : u32 = MAX_TOTAL_KEY_AGREEMENT_KEYS + 3 + 1 + MAX_REVEALABLE_LINKED_ACCOUNTS ;
41+ // +1 for the web3name.
42+ const MAX_PROVIDER_REVEALABLE_KEYS_COUNT : u32 = MAX_PUBLIC_KEYS_PER_DID + MAX_REVEALABLE_LINKED_ACCOUNTS + 1 ;
5243
5344/// The verifier logic is tied to the provider template runtime definition.
5445pub type ProviderTemplateProofVerifier = KiltVersionedParachainVerifier <
@@ -99,12 +90,23 @@ impl IdentityProofVerifier<Runtime> for ProviderTemplateProofVerifierWrapper {
9990// Implement worst-case logic for this specific verifier.
10091#[ cfg( feature = "runtime-benchmarks" ) ]
10192impl kilt_support:: traits:: GetWorstCase for ProviderTemplateProofVerifierWrapper {
102- type Output = WorstCaseOf < Runtime > ;
93+ type Output = pallet_dip_consumer :: benchmarking :: WorstCaseOf < Runtime > ;
10394
10495 fn worst_case ( _context : ( ) ) -> Self :: Output {
105- use frame_support:: Twox64Concat ;
96+ use did:: {
97+ did_details:: { DidEncryptionKey , DidPublicKeyDetails , DidVerificationKey } ,
98+ DidSignature ,
99+ } ;
100+ use frame_support:: { pallet_prelude:: ValueQuery , storage_alias, Twox64Concat } ;
106101 use hex_literal:: hex;
102+ use kilt_dip_primitives:: {
103+ DidKeyRelationship , DidMerkleProof , DipCommitmentStateProof , ParachainDipDidProof , ProviderHeadStateProof ,
104+ RevealedAccountId , RevealedWeb3Name , TimeBoundDidSignature ,
105+ } ;
106+ use pallet_dip_consumer:: benchmarking:: WorstCaseOf ;
107+ use pallet_relay_store:: RelayParentInfo ;
107108 use sp_core:: { ed25519, sr25519, H256 } ;
109+ use sp_runtime:: AccountId32 ;
108110 use sp_std:: vec;
109111
110112 #[ storage_alias]
0 commit comments