Skip to content

Commit 5512099

Browse files
authored
Merge pull request #2412 from input-output-hk/curiecrypt/module-participant
Organize STM - Module participant
2 parents 7c1f5aa + af7e967 commit 5512099

File tree

26 files changed

+389
-307
lines changed

26 files changed

+389
-307
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/protocol-demo/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithrildemo"
3-
version = "0.1.50"
3+
version = "0.1.51"
44
authors = { workspace = true }
55
edition = { workspace = true }
66
documentation = { workspace = true }

demo/protocol-demo/src/types.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
use mithril_stm::key_reg::KeyReg;
2-
use mithril_stm::stm::{
3-
Stake, StmAggrSig, StmClerk, StmInitializer, StmParameters, StmSig, StmSigner,
1+
use mithril_stm::{
2+
KeyReg, Stake, StmAggrSig, StmClerk, StmInitializer, StmParameters, StmSig, StmSigner,
43
StmVerificationKeyPoP,
54
};
65

mithril-common/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-common"
3-
version = "0.5.29"
3+
version = "0.5.30"
44
description = "Common types, interfaces, and utilities for Mithril nodes."
55
authors = { workspace = true }
66
edition = { workspace = true }
@@ -47,7 +47,9 @@ kes-summed-ed25519 = { version = "0.2.1", features = [
4747
"serde_enabled",
4848
"sk_clone_enabled",
4949
] }
50-
mithril-stm = { path = "../mithril-stm", version = "0.3", default-features = false, features = ["batch-verify-aggregates"] }
50+
mithril-stm = { path = "../mithril-stm", version = ">=0.3", default-features = false, features = [
51+
"batch-verify-aggregates"
52+
] }
5153
nom = "8.0.0"
5254
pallas-addresses = { version = "0.32.0", optional = true }
5355
pallas-codec = { version = "0.32.0", optional = true }

mithril-common/src/crypto_helper/cardano/key_certification.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ use crate::{
1515
StdError, StdResult,
1616
};
1717

18-
use mithril_stm::key_reg::{ClosedKeyReg, KeyReg};
19-
use mithril_stm::stm::{Stake, StmInitializer, StmParameters, StmSigner, StmVerificationKeyPoP};
20-
use mithril_stm::RegisterError;
18+
use mithril_stm::{
19+
ClosedKeyReg, KeyReg, RegisterError, Stake, StmInitializer, StmParameters, StmSigner,
20+
StmVerificationKeyPoP,
21+
};
2122

2223
use crate::crypto_helper::cardano::Sum6KesBytes;
2324
use anyhow::{anyhow, Context};

mithril-common/src/crypto_helper/types/alias.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ use crate::crypto_helper::cardano::{
44
};
55

66
use mithril_stm::{
7-
key_reg::ClosedKeyReg,
8-
stm::{Index, Stake, StmClerk, StmParameters, StmSigner},
9-
AggregationError,
7+
AggregationError, ClosedKeyReg, Index, Stake, StmClerk, StmParameters, StmSigner,
108
};
119

1210
use blake2::{digest::consts::U32, Blake2b};
@@ -20,31 +18,31 @@ pub(crate) type D = Blake2b<U32>;
2018
/// The id of a mithril party.
2119
pub type ProtocolPartyId = String;
2220

23-
/// Alias of [MithrilStm:Stake](type@mithril_stm::stm::Stake).
21+
/// Alias of [MithrilStm:Stake](type@mithril_stm::Stake).
2422
pub type ProtocolStake = Stake;
2523

2624
/// A list of [Party Id][ProtocolPartyId] associated with its [Stake][ProtocolStake].
2725
pub type ProtocolStakeDistribution = Vec<(ProtocolPartyId, ProtocolStake)>;
2826

29-
/// Alias of [MithrilStm::StmParameters](struct@mithril_stm::stm::StmParameters).
27+
/// Alias of [MithrilStm::StmParameters](struct@mithril_stm::StmParameters).
3028
pub type ProtocolParameters = StmParameters;
3129

32-
/// Alias of [MithrilStm::Index](type@mithril_stm::stm::Index).
30+
/// Alias of [MithrilStm::Index](type@mithril_stm::Index).
3331
pub type ProtocolLotteryIndex = Index;
3432

35-
/// Alias of [MithrilStm:StmSigner](struct@mithril_stm::stm::StmSigner).
33+
/// Alias of [MithrilStm:StmSigner](struct@mithril_stm::StmSigner).
3634
pub type ProtocolSigner = StmSigner<D>;
3735

38-
/// Alias of a wrapper of [MithrilStm:StmInitializer](struct@mithril_stm::stm::StmInitializer).
36+
/// Alias of a wrapper of [MithrilStm:StmInitializer](struct@mithril_stm::StmInitializer).
3937
pub type ProtocolInitializer = StmInitializerWrapper;
4038

41-
/// Alias of [MithrilStm:StmClerk](struct@mithril_stm::stm::StmClerk).
39+
/// Alias of [MithrilStm:StmClerk](struct@mithril_stm::StmClerk).
4240
pub type ProtocolClerk = StmClerk<D>;
4341

44-
/// Alias of a wrapper of [MithrilStm:KeyReg](struct@mithril_stm::key_reg::KeyReg).
42+
/// Alias of a wrapper of [MithrilStm:KeyReg](struct@mithril_stm::KeyReg).
4543
pub type ProtocolKeyRegistration = KeyRegWrapper;
4644

47-
/// Alias of a wrapper of [MithrilStm:ClosedKeyReg](struct@mithril_stm::key_reg::KeyReg).
45+
/// Alias of a wrapper of [MithrilStm:ClosedKeyReg](struct@mithril_stm::KeyReg).
4846
pub type ProtocolClosedKeyRegistration = ClosedKeyReg<D>;
4947

5048
// Error alias

mithril-common/src/crypto_helper/types/protocol_key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ mod test {
222222
crypto_helper::ProtocolKey,
223223
test_utils::{fake_keys, TempDir},
224224
};
225-
use mithril_stm::stm::StmVerificationKeyPoP;
225+
use mithril_stm::StmVerificationKeyPoP;
226226
use serde::{Deserialize, Serialize};
227227

228228
static VERIFICATION_KEY: &str = fake_keys::signer_verification_key()[0];

mithril-common/src/crypto_helper/types/wrappers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use anyhow::Context;
22
use hex::{FromHex, ToHex};
33
use kes_summed_ed25519::kes::Sum6KesSig;
4-
use mithril_stm::stm::{StmAggrSig, StmAggrVerificationKey, StmSig, StmVerificationKeyPoP};
4+
use mithril_stm::{StmAggrSig, StmAggrVerificationKey, StmSig, StmVerificationKeyPoP};
55

66
use crate::crypto_helper::{MKMapProof, MKProof, OpCert, ProtocolKey, ProtocolKeyCodec, D};
77
use crate::entities::BlockRange;

mithril-common/src/entities/single_signature.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use mithril_stm::stm::StmSig;
1+
use mithril_stm::StmSig;
22
use serde::{Deserialize, Serialize};
33
use std::fmt::{Debug, Formatter};
44

mithril-common/src/protocol/multi_signer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use anyhow::{anyhow, Context};
2-
use mithril_stm::stm::StmParameters;
2+
use mithril_stm::StmParameters;
33

44
use crate::{
55
crypto_helper::{

0 commit comments

Comments
 (0)