Skip to content

Commit c798cfd

Browse files
committed
docs(stm): update since version of deprecated structs and functions
To align the version displayed with the one that will be published on the new '0.5.0' minor.
1 parent 959918d commit c798cfd

File tree

10 files changed

+43
-43
lines changed

10 files changed

+43
-43
lines changed

mithril-stm/src/aggregate_signature/aggregate_key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl<D: Digest + Clone + FixedOutput> AggregateVerificationKey<D> {
2222
}
2323

2424
#[deprecated(
25-
since = "0.4.9",
25+
since = "0.5.0",
2626
note = "Use `get_merkle_tree_batch_commitment` instead"
2727
)]
2828
pub fn get_mt_commitment(&self) -> MerkleTreeBatchCommitment<D> {

mithril-stm/src/aggregate_signature/basic_verifier.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl BasicVerifier {
4545
/// * Collect the unique signers in a hash set,
4646
/// * Calculate the total stake of the eligible signers,
4747
/// * Sort the eligible signers.
48-
#[deprecated(since = "0.4.9", note = "Use `new` instead")]
48+
#[deprecated(since = "0.5.0", note = "Use `new` instead")]
4949
pub fn setup(public_signers: &[(BlsVerificationKey, Stake)]) -> Self {
5050
Self::new(public_signers)
5151
}
@@ -181,7 +181,7 @@ impl BasicVerifier {
181181
// todo: We need to agree on a criteria to dedup (by default we use a BTreeMap that guarantees keys order)
182182
// todo: not good, because it only removes index if there is a conflict (see benches)
183183
#[deprecated(
184-
since = "0.4.9",
184+
since = "0.5.0",
185185
note = "Use `select_valid_signatures_for_k_indices` instead"
186186
)]
187187
pub fn dedup_sigs_for_indices(

mithril-stm/src/aggregate_signature/clerk.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl<D: Digest + Clone + FixedOutput> Clerk<D> {
2929

3030
/// Create a new `Clerk` from a closed registration instance.
3131
#[deprecated(
32-
since = "0.4.9",
32+
since = "0.5.0",
3333
note = "Use `new_clerk_from_closed_key_registration` instead"
3434
)]
3535
pub fn from_registration(params: &Parameters, closed_reg: &ClosedKeyRegistration<D>) -> Self {
@@ -51,7 +51,7 @@ impl<D: Digest + Clone + FixedOutput> Clerk<D> {
5151
}
5252

5353
/// Create a Clerk from a signer.
54-
#[deprecated(since = "0.4.9", note = "Use `new_clerk_from_signer` instead")]
54+
#[deprecated(since = "0.5.0", note = "Use `new_clerk_from_signer` instead")]
5555
pub fn from_signer(signer: &Signer<D>) -> Self {
5656
Self::new_clerk_from_signer(signer)
5757
}
@@ -108,7 +108,7 @@ impl<D: Digest + Clone + FixedOutput> Clerk<D> {
108108
/// The list of merkle tree indexes is used to create a batch proof, to prove that all signatures are from eligible signers.
109109
///
110110
/// It returns an instance of `AggregateSignature`.
111-
#[deprecated(since = "0.4.9", note = "Use `aggregate_signatures` instead")]
111+
#[deprecated(since = "0.5.0", note = "Use `aggregate_signatures` instead")]
112112
pub fn aggregate(
113113
&self,
114114
sigs: &[SingleSignature],
@@ -124,7 +124,7 @@ impl<D: Digest + Clone + FixedOutput> Clerk<D> {
124124

125125
/// Compute the `AggregateVerificationKey` related to the used registration.
126126
#[deprecated(
127-
since = "0.4.9",
127+
since = "0.5.0",
128128
note = "Use `compute_aggregate_verification_key` instead"
129129
)]
130130
pub fn compute_avk(&self) -> AggregateVerificationKey<D> {
@@ -143,7 +143,7 @@ impl<D: Digest + Clone + FixedOutput> Clerk<D> {
143143
}
144144

145145
/// Get the (VK, stake) of a party given its index.
146-
#[deprecated(since = "0.4.9", note = "Use `get_registered_party_for_index` instead")]
146+
#[deprecated(since = "0.5.0", note = "Use `get_registered_party_for_index` instead")]
147147
pub fn get_reg_party(&self, party_index: &Index) -> Option<(VerificationKey, Stake)> {
148148
Self::get_registered_party_for_index(self, party_index)
149149
}

mithril-stm/src/bls_multi_signature/verification_key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl BlsVerificationKeyProofOfPossession {
164164
/// manually.
165165
// If we are really looking for performance improvements, we can combine the
166166
// two final exponentiations (for verifying k1 and k2) into a single one.
167-
#[deprecated(since = "0.4.9", note = "Use `verify_proof_of_possesion` instead")]
167+
#[deprecated(since = "0.5.0", note = "Use `verify_proof_of_possesion` instead")]
168168
pub fn check(&self) -> Result<(), MultiSignatureError> {
169169
Self::verify_proof_of_possesion(self)
170170
}

mithril-stm/src/lib.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -140,47 +140,47 @@ pub type Stake = u64;
140140
pub type Index = u64;
141141

142142
// Aliases
143-
#[deprecated(since = "0.4.8", note = "Use `AggregateSignature` instead")]
143+
#[deprecated(since = "0.5.0", note = "Use `AggregateSignature` instead")]
144144
pub use aggregate_signature::AggregateSignature as StmAggrSig;
145145

146-
#[deprecated(since = "0.4.8", note = "Use `AggregateVerificationKey` instead")]
146+
#[deprecated(since = "0.5.0", note = "Use `AggregateVerificationKey` instead")]
147147
pub use aggregate_signature::AggregateVerificationKey as StmAggrVerificationKey;
148148

149-
#[deprecated(since = "0.4.8", note = "Use `Clerk` instead")]
149+
#[deprecated(since = "0.5.0", note = "Use `Clerk` instead")]
150150
pub use aggregate_signature::Clerk as StmClerk;
151151

152-
#[deprecated(since = "0.4.8", note = "Use `ClosedKeyRegistration` instead")]
152+
#[deprecated(since = "0.5.0", note = "Use `ClosedKeyRegistration` instead")]
153153
pub use key_registration::ClosedKeyRegistration as ClosedKeyReg;
154154

155-
#[deprecated(since = "0.4.8", note = "Use `KeyRegistration` instead")]
155+
#[deprecated(since = "0.5.0", note = "Use `KeyRegistration` instead")]
156156
pub use key_registration::KeyRegistration as KeyReg;
157157

158-
#[deprecated(since = "0.4.8", note = "Use `Parameters` instead")]
158+
#[deprecated(since = "0.5.0", note = "Use `Parameters` instead")]
159159
pub use parameters::Parameters as StmParameters;
160160

161-
#[deprecated(since = "0.4.8", note = "Use `Initializer` instead")]
161+
#[deprecated(since = "0.5.0", note = "Use `Initializer` instead")]
162162
pub use participant::Initializer as StmInitializer;
163163

164-
#[deprecated(since = "0.4.8", note = "Use `Signer` instead")]
164+
#[deprecated(since = "0.5.0", note = "Use `Signer` instead")]
165165
pub use participant::Signer as StmSigner;
166166

167-
#[deprecated(since = "0.4.8", note = "Use `VerificationKey` instead")]
167+
#[deprecated(since = "0.5.0", note = "Use `VerificationKey` instead")]
168168
pub use participant::VerificationKey as StmVerificationKey;
169169

170170
#[deprecated(
171-
since = "0.4.8",
171+
since = "0.5.0",
172172
note = "Use `VerificationKeyProofOfPossession` instead"
173173
)]
174174
pub use participant::VerificationKeyProofOfPossession as StmVerificationKeyPoP;
175175

176-
#[deprecated(since = "0.4.8", note = "Use `SingleSignature` instead")]
176+
#[deprecated(since = "0.5.0", note = "Use `SingleSignature` instead")]
177177
pub use single_signature::SingleSignature as StmSig;
178178

179-
#[deprecated(since = "0.4.6", note = "Use `BasicVerifier` instead")]
179+
#[deprecated(since = "0.5.0", note = "Use `BasicVerifier` instead")]
180180
pub use aggregate_signature::BasicVerifier as CoreVerifier;
181181

182182
#[deprecated(
183-
since = "0.4.6",
183+
since = "0.5.0",
184184
note = "Use `SingleSignatureWithRegisteredParty` instead"
185185
)]
186186
pub use single_signature::SingleSignatureWithRegisteredParty as StmSigRegParty;

mithril-stm/src/merkle_tree/commitment.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl<D: Digest + FixedOutput> MerkleTreeCommitment<D> {
5757
/// # Error
5858
/// If the merkle tree path is invalid, then the function fails.
5959
#[deprecated(
60-
since = "0.4.9",
60+
since = "0.5.0",
6161
note = "Use `verify_leaf_membership_from_path` instead"
6262
)]
6363
pub fn check(
@@ -86,7 +86,7 @@ impl<D: Digest + FixedOutput> MerkleTreeCommitment<D> {
8686

8787
/// Serializes the Merkle Tree commitment together with a message in a single vector of bytes.
8888
/// Outputs `msg || self` as a vector of bytes.
89-
#[deprecated(since = "0.4.9", note = "Use `concatenate_with_message` instead")]
89+
#[deprecated(since = "0.5.0", note = "Use `concatenate_with_message` instead")]
9090
pub fn concat_with_msg(&self, msg: &[u8]) -> Vec<u8>
9191
where
9292
D: Digest,
@@ -136,7 +136,7 @@ impl<D: Digest> MerkleTreeBatchCommitment<D> {
136136
/// Serializes the Merkle Tree commitment together with a message in a single vector of bytes.
137137
/// Outputs `msg || self` as a vector of bytes.
138138
// todo: Do we need to concat msg to whole commitment (nr_leaves and root) or just the root?
139-
#[deprecated(since = "0.4.9", note = "Use `concatenate_with_message` instead")]
139+
#[deprecated(since = "0.5.0", note = "Use `concatenate_with_message` instead")]
140140
pub fn concat_with_msg(&self, msg: &[u8]) -> Vec<u8> {
141141
Self::concatenate_with_message(self, msg)
142142
}
@@ -241,7 +241,7 @@ impl<D: Digest> MerkleTreeBatchCommitment<D> {
241241
// todo: Simplify the algorithm.
242242
// todo: Maybe we want more granular errors, rather than only `BatchPathInvalid`
243243
#[deprecated(
244-
since = "0.4.9",
244+
since = "0.5.0",
245245
note = "Use `verify_leaves_membership_from_batch_path` instead"
246246
)]
247247
pub fn check(

mithril-stm/src/merkle_tree/tree.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl<D: Digest + FixedOutput> MerkleTree<D> {
6464
}
6565

6666
/// Provided a non-empty list of leaves, `create` generates its corresponding `MerkleTree`.
67-
#[deprecated(since = "0.4.9", note = "Use `new` instead")]
67+
#[deprecated(since = "0.5.0", note = "Use `new` instead")]
6868
pub fn create(leaves: &[MerkleTreeLeaf]) -> MerkleTree<D> {
6969
Self::new(leaves)
7070
}
@@ -83,7 +83,7 @@ impl<D: Digest + FixedOutput> MerkleTree<D> {
8383
/// Convert merkle tree to a batch compatible commitment.
8484
/// This function simply returns the root and the number of leaves in the tree.
8585
#[deprecated(
86-
since = "0.4.9",
86+
since = "0.5.0",
8787
note = "Use `to_merkle_tree_batch_commitment` instead"
8888
)]
8989
pub fn to_commitment_batch_compat(&self) -> MerkleTreeBatchCommitment<D> {
@@ -169,7 +169,7 @@ impl<D: Digest + FixedOutput> MerkleTree<D> {
169169
/// If the indices provided are out of bounds (higher than the number of elements
170170
/// committed in the `MerkleTree`) or are not ordered, the function fails.
171171
// todo: Update doc.
172-
#[deprecated(since = "0.4.9", note = "Use `compute_merkle_tree_batch_path` instead")]
172+
#[deprecated(since = "0.5.0", note = "Use `compute_merkle_tree_batch_path` instead")]
173173
pub fn get_batched_path(&self, indices: Vec<usize>) -> MerkleBatchPath<D>
174174
where
175175
D: FixedOutput,
@@ -226,7 +226,7 @@ impl<D: Digest + FixedOutput> MerkleTree<D> {
226226
}
227227

228228
/// Convert merkle tree to a commitment. This function simply returns the root.
229-
#[deprecated(since = "0.4.9", note = "Use `to_merkle_tree_commitment` instead")]
229+
#[deprecated(since = "0.5.0", note = "Use `to_merkle_tree_commitment` instead")]
230230
pub fn to_commitment(&self) -> MerkleTreeCommitment<D> {
231231
Self::to_merkle_tree_commitment(self)
232232
}
@@ -260,7 +260,7 @@ impl<D: Digest + FixedOutput> MerkleTree<D> {
260260
/// Get a path (hashes of siblings of the path to the root node)
261261
/// for the `i`th value stored in the tree.
262262
/// Requires `i < self.n`
263-
#[deprecated(since = "0.4.9", note = "Use `compute_merkle_tree_path` instead")]
263+
#[deprecated(since = "0.5.0", note = "Use `compute_merkle_tree_path` instead")]
264264
pub fn get_path(&self, i: usize) -> MerklePath<D> {
265265
Self::compute_merkle_tree_path(self, i)
266266
}

mithril-stm/src/participant/initializer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl Initializer {
4141

4242
/// Builds an `Initializer` that is ready to register with the key registration service.
4343
/// This function generates the signing and verification key with a PoP, and initialises the structure.
44-
#[deprecated(since = "0.4.9", note = "Use `new` instead")]
44+
#[deprecated(since = "0.5.0", note = "Use `new` instead")]
4545
pub fn setup<R: RngCore + CryptoRng>(params: Parameters, stake: Stake, rng: &mut R) -> Self {
4646
Self::new(params, stake, rng)
4747
}
@@ -53,7 +53,7 @@ impl Initializer {
5353

5454
/// Extract the verification key.
5555
#[deprecated(
56-
since = "0.4.9",
56+
since = "0.5.0",
5757
note = "Use `get_verification_key_proof_of_possession` instead"
5858
)]
5959
pub fn verification_key(&self) -> VerificationKeyProofOfPossession {
@@ -109,7 +109,7 @@ impl Initializer {
109109
/// * the current total stake (according to the registration service)
110110
/// # Error
111111
/// This function fails if the initializer is not registered.
112-
#[deprecated(since = "0.4.9", note = "Use `create_signer` instead")]
112+
#[deprecated(since = "0.5.0", note = "Use `create_signer` instead")]
113113
pub fn new_signer<D: Digest + Clone + FixedOutput>(
114114
self,
115115
closed_reg: ClosedKeyRegistration<D>,
@@ -151,7 +151,7 @@ impl Initializer {
151151
/// Takes `eligible_parties` as a parameter and determines the signer's index in the parties.
152152
/// `eligible_parties` is verified and trusted which is only run by a full-node
153153
/// that has already verified the parties.
154-
#[deprecated(since = "0.4.9", note = "Use `create_basic_signer` instead")]
154+
#[deprecated(since = "0.5.0", note = "Use `create_basic_signer` instead")]
155155
pub fn new_core_signer<D: Digest + Clone + FixedOutput>(
156156
self,
157157
eligible_parties: &[RegisteredParty],

mithril-stm/src/participant/signer.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl<D: Clone + Digest + FixedOutput> Signer<D> {
4646
}
4747

4848
/// Create a Signer for given input
49-
#[deprecated(since = "0.4.9", note = "Use `set_signer` instead")]
49+
#[deprecated(since = "0.5.0", note = "Use `set_signer` instead")]
5050
pub fn set_stm_signer(
5151
signer_index: u64,
5252
stake: Stake,
@@ -77,7 +77,7 @@ impl<D: Clone + Digest + FixedOutput> Signer<D> {
7777
}
7878

7979
/// Create a core signer (no registration data) for given input
80-
#[deprecated(since = "0.4.9", note = "Use `set_basic_signer` instead")]
80+
#[deprecated(since = "0.5.0", note = "Use `set_basic_signer` instead")]
8181
pub fn set_core_signer(
8282
signer_index: u64,
8383
stake: Stake,
@@ -115,7 +115,7 @@ impl<D: Clone + Digest + FixedOutput> Signer<D> {
115115
}
116116

117117
/// Extract the verification key.
118-
#[deprecated(since = "0.4.9", note = "Use `get_verification_key` instead")]
118+
#[deprecated(since = "0.5.0", note = "Use `get_verification_key` instead")]
119119
pub fn verification_key(&self) -> VerificationKey {
120120
Self::get_verification_key(self)
121121
}
@@ -150,7 +150,7 @@ impl<D: Clone + Digest + FixedOutput> Signer<D> {
150150
/// Once the signature is produced, this function checks whether any index in `[0,..,self.params.m]`
151151
/// wins the lottery by evaluating the dense mapping.
152152
/// It records all the winning indexes in `Self.indexes`.
153-
#[deprecated(since = "0.4.9", note = "Use `basic_sign` instead")]
153+
#[deprecated(since = "0.5.0", note = "Use `basic_sign` instead")]
154154
pub fn core_sign(&self, msg: &[u8], total_stake: Stake) -> Option<SingleSignature> {
155155
Self::basic_sign(self, msg, total_stake)
156156
}
@@ -177,7 +177,7 @@ impl<D: Clone + Digest + FixedOutput> Signer<D> {
177177
}
178178

179179
/// Get Parameters
180-
#[deprecated(since = "0.4.9", note = "Use `get_parameters` instead")]
180+
#[deprecated(since = "0.5.0", note = "Use `get_parameters` instead")]
181181
pub fn get_params(&self) -> Parameters {
182182
Self::get_parameters(self)
183183
}
@@ -188,7 +188,7 @@ impl<D: Clone + Digest + FixedOutput> Signer<D> {
188188
}
189189

190190
/// Get closed key registration
191-
#[deprecated(since = "0.4.9", note = "Use `get_closed_key_registration` instead")]
191+
#[deprecated(since = "0.5.0", note = "Use `get_closed_key_registration` instead")]
192192
pub fn get_closed_reg(&self) -> Option<ClosedKeyRegistration<D>> {
193193
Self::get_closed_key_registration(self)
194194
}

mithril-stm/src/single_signature/signature.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl SingleSignature {
131131
}
132132

133133
/// Compare two `SingleSignature` by their signers' merkle tree indexes.
134-
#[deprecated(since = "0.4.9", note = "This function will be removed")]
134+
#[deprecated(since = "0.5.0", note = "This function will be removed")]
135135
pub fn cmp_stm_sig(&self, other: &Self) -> Ordering {
136136
Self::compare_signer_index(self, other)
137137
}
@@ -153,7 +153,7 @@ impl SingleSignature {
153153
}
154154

155155
/// Will be deprecated. Use `basic_verify` instead.
156-
#[deprecated(since = "0.4.9", note = "Use `basic_verify` instead")]
156+
#[deprecated(since = "0.5.0", note = "Use `basic_verify` instead")]
157157
pub fn core_verify(
158158
&self,
159159
params: &Parameters,

0 commit comments

Comments
 (0)