Skip to content

Commit

Permalink
Merge pull request #198 from input-output-hk/jpraynaud/176-add-real-k…
Browse files Browse the repository at this point in the history
…ey-registration

Add real key registration to Mithril Aggregator and Mithril Signer
  • Loading branch information
jpraynaud authored May 17, 2022
2 parents 03e0875 + 0684448 commit fe4010b
Show file tree
Hide file tree
Showing 16 changed files with 994 additions and 252 deletions.
6 changes: 2 additions & 4 deletions demo/protocol-demo/src/demonstrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct PlayerArtifact {
party_id: ProtocolPartyId,
stake: ProtocolStake,
verification_key: String,
secret_key: String,
initializer: String,
}

/// Single Signature artifacts
Expand Down Expand Up @@ -136,7 +136,6 @@ impl Party {
signatures: &[(ProtocolSingleSignature, u64)],
) -> Option<&ProtocolMultiSignature> {
let unzipped_signatures: (Vec<_>, Vec<_>) = signatures.iter().cloned().unzip();
println!("123 {}", signatures.len());
let msig = self
.clerk
.as_ref()
Expand Down Expand Up @@ -365,12 +364,11 @@ impl ProtocolDemonstrator for Demonstrator {
ProtocolInitializer::setup(self.params.unwrap(), party_id, stake, &mut rng);
let verification_key: ProtocolSignerVerificationKey =
protocol_initializer.verification_key();
let secret_key: ProtocolSignerSecretKey = protocol_initializer.secret_key();
players_artifacts.push(PlayerArtifact {
party_id: protocol_initializer.party_id(),
stake: protocol_initializer.stake(),
verification_key: key_encode_hex(verification_key).unwrap(),
secret_key: key_encode_hex(secret_key).unwrap(),
initializer: key_encode_hex(protocol_initializer).unwrap(),
})
}
let players_with_keys = players_artifacts
Expand Down
2 changes: 1 addition & 1 deletion demo/protocol-demo/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use clap::Parser;
#[derive(Parser, Debug, PartialEq, Clone, Copy)]
pub struct Config {
/// Security parameter, upper bound on indices
#[clap(short, long, default_value_t = 100)]
#[clap(short, long, default_value_t = 200)]
m: u64,

/// Quorum parameter
Expand Down
Loading

0 comments on commit fe4010b

Please sign in to comment.