Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mithril-stm/src/aggregate_signature/aggregate_key.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use blake2::digest::{Digest, FixedOutput};
use serde::{Deserialize, Serialize};

use crate::merkle_tree::{MerkleBatchPath, MerkleTreeBatchCommitment};
use crate::membership_commitment::{MerkleBatchPath, MerkleTreeBatchCommitment};
use crate::{ClosedKeyRegistration, Stake};

/// Stm aggregate key (batch compatible), which contains the merkle tree commitment and the total stake of the system.
Expand Down
4 changes: 2 additions & 2 deletions mithril-stm/src/aggregate_signature/basic_verifier.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use anyhow::{Context, anyhow};
use std::collections::{BTreeMap, HashMap, HashSet};

use crate::bls_multi_signature::{BlsSignature, BlsVerificationKey};
use crate::key_registration::RegisteredParty;
use crate::merkle_tree::MerkleTreeLeaf;
use crate::membership_commitment::MerkleTreeLeaf;
use crate::signature_scheme::{BlsSignature, BlsVerificationKey};
use crate::{
AggregationError, Index, Parameters, SingleSignature, SingleSignatureWithRegisteredParty,
Stake, StmResult,
Expand Down
2 changes: 1 addition & 1 deletion mithril-stm/src/aggregate_signature/clerk.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
AggregateSignature, AggregateSignatureType, AggregateVerificationKey, ClosedKeyRegistration,
Index, Parameters, Signer, SingleSignature, Stake, StmResult, VerificationKey,
aggregate_signature::ConcatenationProof,
proof_system::ConcatenationProof,
};
use anyhow::Context;
use blake2::digest::{Digest, FixedOutput};
Expand Down
6 changes: 2 additions & 4 deletions mithril-stm/src/aggregate_signature/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
mod aggregate_key;
mod basic_verifier;
mod clerk;
mod proof;
mod signature;

pub use aggregate_key::*;
pub use basic_verifier::*;
pub use clerk::*;
pub use proof::*;
pub use signature::*;

#[cfg(test)]
Expand All @@ -26,9 +24,9 @@ mod tests {
use crate::{
AggregateSignature, AggregateSignatureType, AggregationError, BasicVerifier, Clerk,
Initializer, KeyRegistration, Parameters, Signer, SingleSignature,
SingleSignatureWithRegisteredParty, Stake, bls_multi_signature::BlsVerificationKey,
SingleSignatureWithRegisteredParty, Stake, signature_scheme::BlsVerificationKey,
};
use crate::{StmResult, merkle_tree::MerkleBatchPath};
use crate::{StmResult, membership_commitment::MerkleBatchPath};

type Sig = AggregateSignature<D>;
type D = Blake2b<U32>;
Expand Down
249 changes: 0 additions & 249 deletions mithril-stm/src/aggregate_signature/proof/concatenation.rs

This file was deleted.

3 changes: 0 additions & 3 deletions mithril-stm/src/aggregate_signature/proof/mod.rs

This file was deleted.

8 changes: 3 additions & 5 deletions mithril-stm/src/aggregate_signature/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ use blake2::digest::{Digest, FixedOutput};
use serde::{Deserialize, Serialize};

use crate::error::AggregateSignatureError;
use crate::merkle_tree::MerkleBatchPath;
use crate::{AggregateVerificationKey, Parameters, StmResult};

use super::ConcatenationProof;
use crate::membership_commitment::MerkleBatchPath;
use crate::{AggregateVerificationKey, Parameters, StmResult, proof_system::ConcatenationProof};

/// The type of STM aggregate signature.
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
Expand Down Expand Up @@ -211,7 +209,7 @@ mod tests {
use rand_chacha::ChaCha20Rng;
use rand_core::SeedableRng;

use crate::bls_multi_signature::{BlsSigningKey, BlsVerificationKeyProofOfPossession};
use crate::signature_scheme::{BlsSigningKey, BlsVerificationKeyProofOfPossession};
use crate::{
AggregateSignature, AggregateSignatureType, Clerk, ClosedKeyRegistration,
KeyRegistration, Parameters, Signer,
Expand Down
2 changes: 1 addition & 1 deletion mithril-stm/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use blst::BLST_ERROR;

use crate::StmResult;
use crate::aggregate_signature::AggregateSignatureType;
use crate::bls_multi_signature::{
use crate::signature_scheme::{
BlsSignature, BlsVerificationKey, BlsVerificationKeyProofOfPossession,
};

Expand Down
6 changes: 3 additions & 3 deletions mithril-stm/src/key_registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use std::{
use anyhow::anyhow;
use blake2::digest::{Digest, FixedOutput};

use crate::bls_multi_signature::{BlsVerificationKey, BlsVerificationKeyProofOfPossession};
use crate::error::RegisterError;
use crate::merkle_tree::{MerkleTree, MerkleTreeLeaf};
use crate::membership_commitment::{MerkleTree, MerkleTreeLeaf};
use crate::signature_scheme::{BlsVerificationKey, BlsVerificationKeyProofOfPossession};
use crate::{Stake, StmResult};

/// Stores a registered party with its public key and the associated stake.
Expand Down Expand Up @@ -94,7 +94,7 @@ mod tests {
use rand_chacha::ChaCha20Rng;
use rand_core::SeedableRng;

use crate::bls_multi_signature::BlsSigningKey;
use crate::signature_scheme::BlsSigningKey;

use super::*;

Expand Down
7 changes: 4 additions & 3 deletions mithril-stm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@
//! ```
mod aggregate_signature;
mod bls_multi_signature;
mod eligibility_check;
mod error;
mod key_registration;
mod merkle_tree;
mod membership_commitment;
mod parameters;
mod participant;
mod proof_system;
mod signature_scheme;
mod single_signature;

pub use aggregate_signature::{
Expand All @@ -133,7 +134,7 @@
pub use single_signature::{SingleSignature, SingleSignatureWithRegisteredParty};

#[cfg(feature = "benchmark-internals")]
pub use bls_multi_signature::{
pub use signature_scheme::{
BlsProofOfPossession, BlsSignature, BlsSigningKey, BlsVerificationKey,
BlsVerificationKeyProofOfPossession,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ use serde::{Deserialize, Serialize};

use crate::StmResult;
use crate::error::MerkleTreeError;
use crate::merkle_tree::{MerkleBatchPath, MerklePath, MerkleTreeLeaf, parent, sibling};
use crate::membership_commitment::merkle_tree::{
MerkleBatchPath, MerklePath, MerkleTreeLeaf, parent, sibling,
};
use anyhow::{Context, anyhow};
/// `MerkleTree` commitment.
/// This structure differs from `MerkleTree` in that it does not contain all elements, which are not always necessary.
Expand Down
Loading
Loading