Skip to content

Commit

Permalink
rev 02 documentation for SignerCore and StmSigner
Browse files Browse the repository at this point in the history
  • Loading branch information
curiecrypt committed Jun 5, 2023
1 parent ec36878 commit f65d642
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mithril-stm/src/stm.rs
Expand Up @@ -167,8 +167,11 @@ pub struct StmInitializer {
pub(crate) pk: StmVerificationKeyPoP,
}

/// Participant in the protocol can sign messages.
/// This instance can only be generated out of an `StmInitializer`.
/// Core signer in the protocol can sign messages.
/// A full-node verifier does not need to receive the registration information
/// of a signature, since it has all the identities already.
/// So, the signatures to be verified by a full-node verifier can be generated by
/// the signers that do not contain `closed_reg`.
#[derive(Debug, Clone)]
pub struct SignerCore {
mt_index: u64,
Expand All @@ -178,7 +181,8 @@ pub struct SignerCore {
vk: StmVerificationKey,
}

/// Participant in the protocol can sign messages.
/// Participant in the protocol can sign messages that depend on `closed_reg`.
/// So, `StmSigner` is built on `SignerCore` with one additional field: `ClosedKeyReg`.
/// This instance can only be generated out of an `StmInitializer` and a `ClosedKeyReg`.
/// This ensures that a `MerkleTree` root is not computed before all participants have registered.
#[derive(Debug, Clone)]
Expand Down

0 comments on commit f65d642

Please sign in to comment.