Skip to content

Commit 776f48a

Browse files
committed
Remove unused code from multi-signer
1 parent f5055ed commit 776f48a

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed

mithril-aggregator/src/multi_signer.rs

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ use mithril_common::{
99
crypto_helper::{
1010
key_decode_hex, key_encode_hex, ProtocolAggregateVerificationKey, ProtocolAggregationError,
1111
ProtocolClerk, ProtocolKeyRegistration, ProtocolMultiSignature, ProtocolParameters,
12-
ProtocolPartyId, ProtocolRegistrationError, ProtocolSignerVerificationKey,
13-
ProtocolSingleSignature, ProtocolStakeDistribution,
12+
ProtocolRegistrationError, ProtocolSingleSignature, ProtocolStakeDistribution,
1413
},
1514
entities::{self, Epoch, SignerWithStake, StakeDistribution},
1615
store::{StakeStorer, StoreError},
@@ -169,12 +168,6 @@ pub trait MultiSigner: Sync + Send {
169168
}
170169
}
171170

172-
/// Get signer
173-
async fn get_signer_verification_key(
174-
&self,
175-
party_id: ProtocolPartyId,
176-
) -> Result<Option<ProtocolSignerVerificationKey>, ProtocolError>;
177-
178171
/// Get signers
179172
async fn get_signers(&self) -> Result<Vec<entities::Signer>, ProtocolError> {
180173
debug!("Get signers");
@@ -224,9 +217,6 @@ pub struct MultiSignerImpl {
224217
/// Created multi signature for message signed
225218
multi_signature: Option<ProtocolMultiSignature>,
226219

227-
/// Created aggregate verification key
228-
avk: Option<ProtocolAggregateVerificationKey>,
229-
230220
/// Verification key store
231221
verification_key_store: Arc<VerificationKeyStore>,
232222

@@ -255,7 +245,6 @@ impl MultiSignerImpl {
255245
current_initiated_at: None,
256246
clerk: None,
257247
multi_signature: None,
258-
avk: None,
259248
verification_key_store,
260249
stake_store,
261250
single_signature_store,
@@ -513,31 +502,6 @@ impl MultiSigner for MultiSignerImpl {
513502
}
514503
}
515504

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-
541505
async fn get_signers_with_stake(&self) -> Result<Vec<SignerWithStake>, ProtocolError> {
542506
debug!("Get signers with stake");
543507
let epoch = self
@@ -705,7 +669,6 @@ impl MultiSigner for MultiSignerImpl {
705669
.ok_or_else(ProtocolError::UnavailableClerk)?;
706670
match clerk.aggregate(&signatures, message.compute_hash().as_bytes()) {
707671
Ok(multi_signature) => {
708-
self.avk = Some(clerk.compute_avk());
709672
self.multi_signature = Some(multi_signature.clone());
710673
Ok(Some(multi_signature))
711674
}

0 commit comments

Comments
 (0)