Skip to content

Commit 098106d

Browse files
authored
Merge pull request #2705 from damrobi/damrobi/fixing_typo
Fixing typo in bls PoP.
2 parents 29bdff3 + 86439a4 commit 098106d

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mithril-stm/Cargo.toml

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

mithril-stm/src/bls_multi_signature/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ mod tests {
158158
let vk_infinity = BlsVerificationKey(p2_affine_to_vk(&p2));
159159
let vkpop_infinity = BlsVerificationKeyProofOfPossession { vk: vk_infinity, pop };
160160

161-
let result = vkpop_infinity.verify_proof_of_possesion();
161+
let result = vkpop_infinity.verify_proof_of_possession();
162162
assert_eq!(result, Err(MultiSignatureError::VerificationKeyInfinity(Box::new(vkpop_infinity.vk))));
163163
}
164164

mithril-stm/src/bls_multi_signature/verification_key.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl BlsVerificationKeyProofOfPossession {
136136
/// manually.
137137
// If we are really looking for performance improvements, we can combine the
138138
// two final exponentiations (for verifying k1 and k2) into a single one.
139-
pub(crate) fn verify_proof_of_possesion(&self) -> Result<(), MultiSignatureError> {
139+
pub(crate) fn verify_proof_of_possession(&self) -> Result<(), MultiSignatureError> {
140140
match self.vk.to_blst_verification_key().validate() {
141141
Ok(_) => {
142142
let result = verify_pairing(&self.vk, &self.pop);
@@ -164,9 +164,12 @@ 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.5.0", note = "Use `verify_proof_of_possesion` instead")]
167+
#[deprecated(
168+
since = "0.5.0",
169+
note = "The verification of the proof of possession is not part of the public API any more"
170+
)]
168171
pub fn check(&self) -> Result<(), MultiSignatureError> {
169-
Self::verify_proof_of_possesion(self)
172+
Self::verify_proof_of_possession(self)
170173
}
171174

172175
/// Convert to a 144 byte string.

mithril-stm/src/key_registration.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl KeyRegistration {
3737
pk: BlsVerificationKeyProofOfPossession,
3838
) -> Result<(), RegisterError> {
3939
if let Entry::Vacant(e) = self.keys.entry(pk.vk) {
40-
pk.verify_proof_of_possesion()?;
40+
pk.verify_proof_of_possession()?;
4141
e.insert(stake);
4242
return Ok(());
4343
}
@@ -136,7 +136,7 @@ mod tests {
136136
}
137137
Err(RegisterError::KeyInvalid(a)) => {
138138
assert_eq!(fake_it, 0);
139-
assert!(a.verify_proof_of_possesion().is_err());
139+
assert!(a.verify_proof_of_possession().is_err());
140140
}
141141
Err(RegisterError::SerializationError) => unreachable!(),
142142
_ => unreachable!(),

0 commit comments

Comments
 (0)