Skip to content

Commit e140acb

Browse files
committed
module visibilities
broken intra doc links clippy
1 parent 7ed4bac commit e140acb

File tree

17 files changed

+57
-67
lines changed

17 files changed

+57
-67
lines changed

demo/protocol-demo/src/types.rs

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

76
use blake2::{digest::consts::U32, Blake2b};

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ use crate::{
1616
};
1717

1818
use mithril_stm::{
19-
key_reg::{ClosedKeyReg, KeyReg},
20-
participant::{StmInitializer, StmSigner, StmVerificationKeyPoP},
21-
stm::{Stake, StmParameters},
22-
RegisterError,
19+
ClosedKeyReg, KeyReg, RegisterError, Stake, StmInitializer, StmParameters, StmSigner,
20+
StmVerificationKeyPoP,
2321
};
2422

2523
use crate::crypto_helper::cardano::Sum6KesBytes;

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

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

66
use mithril_stm::{
7-
key_reg::ClosedKeyReg,
8-
participant::StmSigner,
9-
stm::{Index, Stake, StmClerk, StmParameters},
10-
AggregationError,
7+
AggregationError, ClosedKeyReg, Index, Stake, StmClerk, StmParameters, StmSigner,
118
};
129

1310
use blake2::{digest::consts::U32, Blake2b};
@@ -21,31 +18,31 @@ pub(crate) type D = Blake2b<U32>;
2118
/// The id of a mithril party.
2219
pub type ProtocolPartyId = String;
2320

24-
/// Alias of [MithrilStm:Stake](type@mithril_stm::stm::Stake).
21+
/// Alias of [MithrilStm:Stake](type@mithril_stm::Stake).
2522
pub type ProtocolStake = Stake;
2623

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

30-
/// Alias of [MithrilStm::StmParameters](struct@mithril_stm::stm::StmParameters).
27+
/// Alias of [MithrilStm::StmParameters](struct@mithril_stm::StmParameters).
3128
pub type ProtocolParameters = StmParameters;
3229

33-
/// Alias of [MithrilStm::Index](type@mithril_stm::stm::Index).
30+
/// Alias of [MithrilStm::Index](type@mithril_stm::Index).
3431
pub type ProtocolLotteryIndex = Index;
3532

36-
/// Alias of [MithrilStm:StmSigner](struct@mithril_stm::participant::StmSigner).
33+
/// Alias of [MithrilStm:StmSigner](struct@mithril_stm::StmSigner).
3734
pub type ProtocolSigner = StmSigner<D>;
3835

39-
/// Alias of a wrapper of [MithrilStm:StmInitializer](struct@mithril_stm::participant::StmInitializer).
36+
/// Alias of a wrapper of [MithrilStm:StmInitializer](struct@mithril_stm::StmInitializer).
4037
pub type ProtocolInitializer = StmInitializerWrapper;
4138

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

45-
/// 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).
4643
pub type ProtocolKeyRegistration = KeyRegWrapper;
4744

48-
/// 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).
4946
pub type ProtocolClosedKeyRegistration = ClosedKeyReg<D>;
5047

5148
// 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::participant::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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use anyhow::Context;
22
use hex::{FromHex, ToHex};
33
use kes_summed_ed25519::kes::Sum6KesSig;
4-
use mithril_stm::participant::StmVerificationKeyPoP;
5-
use mithril_stm::stm::{StmAggrSig, StmAggrVerificationKey, StmSig};
4+
use mithril_stm::{StmAggrSig, StmAggrVerificationKey, StmSig, StmVerificationKeyPoP};
65

76
use crate::crypto_helper::{MKMapProof, MKProof, OpCert, ProtocolKey, ProtocolKeyCodec, D};
87
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::{

mithril-common/src/test_utils/fake_keys.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Pre hex encoded StmTypes for testing.
22
3-
/// A list of pre json hex encoded [MithrilStm:StmSig](type@mithril_stm::stm::StmSig)
3+
/// A list of pre json hex encoded [MithrilStm:StmSig](type@mithril_stm::StmSig)
44
pub const fn single_signature<'a>() -> [&'a str; 4] {
55
[
66
"7b227369676d61223a5b3133302c3137372c31352c3232392c32342c3235312c3234372c3137312c3139362c32\
@@ -52,7 +52,7 @@ pub const fn single_signature<'a>() -> [&'a str; 4] {
5252
]
5353
}
5454

55-
/// A list of pre json hex encoded [MithrilStm:StmAggrSig](struct@mithril_stm::stm::StmAggrSig)
55+
/// A list of pre json hex encoded [MithrilStm:StmAggrSig](struct@mithril_stm::StmAggrSig)
5656
pub const fn multi_signature<'a>() -> [&'a str; 2] {
5757
[
5858
"7b227369676e617475726573223a5b5b7b227369676d61223a5b3137312c3136312c3232352c3139342c32382c\
@@ -158,7 +158,7 @@ pub const fn signable_manifest_signature<'a>() -> [&'a str; 2] {
158158
]
159159
}
160160

161-
/// A list of pre json hex encoded [MithrilStm:StmVerificationKeyPoP](type@mithril_stm::participant::StmVerificationKeyPoP)
161+
/// A list of pre json hex encoded [MithrilStm:StmVerificationKeyPoP](type@mithril_stm::StmVerificationKeyPoP)
162162
pub const fn signer_verification_key<'a>() -> [&'a str; 4] {
163163
[
164164
"7b22766b223a5b3134352c32332c3135382c31322c3138332c3230392c33322c3134302c33372c3132342c3136\
@@ -366,7 +366,7 @@ pub const fn operational_certificate<'a>() -> [&'a str; 2] {
366366
]
367367
}
368368

369-
/// A list of pre json hex encoded [MithrilStm:StmAggrVerificationKey](struct@mithril_stm::stm::StmAggrVerificationKey)
369+
/// A list of pre json hex encoded [MithrilStm:StmAggrVerificationKey](struct@mithril_stm::StmAggrVerificationKey)
370370
pub const fn aggregate_verification_key<'a>() -> [&'a str; 3] {
371371
[
372372
"7b226d745f636f6d6d69746d656e74223a7b22726f6f74223a5b3134302c31332c3135352c3134312c3136332c\
@@ -392,8 +392,7 @@ mod test {
392392
use super::*;
393393
use ed25519_dalek::VerifyingKey;
394394
use kes_summed_ed25519::kes::Sum6KesSig;
395-
use mithril_stm::stm::{StmAggrSig, StmAggrVerificationKey, StmSig};
396-
use mithril_stm::participant::StmVerificationKeyPoP;
395+
use mithril_stm::{StmAggrSig, StmAggrVerificationKey, StmSig, StmVerificationKeyPoP};
397396
use serde::{de::DeserializeOwned, Serialize};
398397
use std::any::type_name;
399398

mithril-stm/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ cargo bench
6262
The following is a simple example of the STM implementation:
6363

6464
```rust
65-
use mithril_stm::key_reg::KeyReg;
66-
use mithril_stm::stm::{StmClerk, StmParameters, StmSig};
67-
use mithril_stm::participant::{StmInitializer, StmSigner};
68-
use mithril_stm::AggregationError;
65+
use mithril_stm::{StmClerk, StmParameters, StmSig, KeyReg, StmInitializer, StmSigner, AggregationError};
6966

7067
use blake2::{digest::consts::U32, Blake2b};
7168
use rayon::prelude::*;

mithril-stm/benches/multi_sig.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use blake2::{digest::consts::U64, Blake2b, Digest};
22
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
3-
use mithril_stm::bls_multi_signature::{Signature, SigningKey, VerificationKey};
3+
use mithril_stm::{Signature, SigningKey, VerificationKey};
44
use rand_chacha::ChaCha20Rng;
55
use rand_core::{RngCore, SeedableRng};
66

0 commit comments

Comments
 (0)