@@ -9,8 +9,7 @@ use mithril_common::{
9
9
crypto_helper:: {
10
10
key_decode_hex, key_encode_hex, ProtocolAggregateVerificationKey , ProtocolAggregationError ,
11
11
ProtocolClerk , ProtocolKeyRegistration , ProtocolMultiSignature , ProtocolParameters ,
12
- ProtocolPartyId , ProtocolRegistrationError , ProtocolSignerVerificationKey ,
13
- ProtocolSingleSignature , ProtocolStakeDistribution ,
12
+ ProtocolRegistrationError , ProtocolSingleSignature , ProtocolStakeDistribution ,
14
13
} ,
15
14
entities:: { self , Epoch , SignerWithStake , StakeDistribution } ,
16
15
store:: { StakeStorer , StoreError } ,
@@ -169,12 +168,6 @@ pub trait MultiSigner: Sync + Send {
169
168
}
170
169
}
171
170
172
- /// Get signer
173
- async fn get_signer_verification_key (
174
- & self ,
175
- party_id : ProtocolPartyId ,
176
- ) -> Result < Option < ProtocolSignerVerificationKey > , ProtocolError > ;
177
-
178
171
/// Get signers
179
172
async fn get_signers ( & self ) -> Result < Vec < entities:: Signer > , ProtocolError > {
180
173
debug ! ( "Get signers" ) ;
@@ -224,9 +217,6 @@ pub struct MultiSignerImpl {
224
217
/// Created multi signature for message signed
225
218
multi_signature : Option < ProtocolMultiSignature > ,
226
219
227
- /// Created aggregate verification key
228
- avk : Option < ProtocolAggregateVerificationKey > ,
229
-
230
220
/// Verification key store
231
221
verification_key_store : Arc < VerificationKeyStore > ,
232
222
@@ -255,7 +245,6 @@ impl MultiSignerImpl {
255
245
current_initiated_at : None ,
256
246
clerk : None ,
257
247
multi_signature : None ,
258
- avk : None ,
259
248
verification_key_store,
260
249
stake_store,
261
250
single_signature_store,
@@ -513,31 +502,6 @@ impl MultiSigner for MultiSignerImpl {
513
502
}
514
503
}
515
504
516
- /// Get signer verification key
517
- async fn get_signer_verification_key (
518
- & self ,
519
- party_id : ProtocolPartyId ,
520
- ) -> Result < Option < ProtocolSignerVerificationKey > , ProtocolError > {
521
- debug ! ( "Get signer {}" , party_id) ;
522
- let epoch = self
523
- . current_beacon
524
- . as_ref ( )
525
- . ok_or_else ( ProtocolError :: UnavailableBeacon ) ?
526
- . epoch
527
- . offset_to_signer_retrieval_epoch ( ) ?;
528
- let signers = self
529
- . verification_key_store
530
- . get_verification_keys ( epoch)
531
- . await ?
532
- . unwrap_or_default ( ) ;
533
- match signers. get ( & party_id) {
534
- Some ( signer) => Ok ( Some (
535
- key_decode_hex ( & signer. verification_key ) . map_err ( ProtocolError :: Codec ) ?,
536
- ) ) ,
537
- _ => Ok ( None ) ,
538
- }
539
- }
540
-
541
505
async fn get_signers_with_stake ( & self ) -> Result < Vec < SignerWithStake > , ProtocolError > {
542
506
debug ! ( "Get signers with stake" ) ;
543
507
let epoch = self
@@ -705,7 +669,6 @@ impl MultiSigner for MultiSignerImpl {
705
669
. ok_or_else ( ProtocolError :: UnavailableClerk ) ?;
706
670
match clerk. aggregate ( & signatures, message. compute_hash ( ) . as_bytes ( ) ) {
707
671
Ok ( multi_signature) => {
708
- self . avk = Some ( clerk. compute_avk ( ) ) ;
709
672
self . multi_signature = Some ( multi_signature. clone ( ) ) ;
710
673
Ok ( Some ( multi_signature) )
711
674
}
0 commit comments