Skip to content

Commit 58cb869

Browse files
curiecryptiquerejeta
authored andcommitted
path and batch path errors updated
1 parent db4a0a8 commit 58cb869

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

mithril-core/benches/size_benches.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ where
2727
.collect::<Vec<_>>();
2828

2929
let mut ps: Vec<StmInitializer> = Vec::with_capacity(nparties);
30-
let params = StmParameters {
31-
k,
32-
m,
33-
phi_f: 0.2,
34-
};
30+
let params = StmParameters { k, m, phi_f: 0.2 };
3531

3632
let mut key_reg = KeyReg::init();
3733
for stake in parties {

mithril-core/src/error.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ pub enum StmSignatureError<D: Digest + FixedOutput> {
5050
#[error("Indeces are not unique.")]
5151
IndexNotUnique,
5252

53-
/// The path is not valid for the Merkle Tree
54-
#[error("The path of the Merkle Tree is invalid.")]
55-
PathInvalid(Path<D>),
56-
5753
/// MSP.Eval was computed incorrectly
5854
#[error("The claimed evaluation of function phi is incorrect.")]
5955
EvalInvalid([u8; 64]),
@@ -76,7 +72,7 @@ pub enum StmSignatureError<D: Digest + FixedOutput> {
7672

7773
/// Invalid merkle batch path
7874
#[error("Batch path does not verify against root")]
79-
BatchPathInvalid(BatchPath<D>),
75+
PathInvalid(BatchPath<D>),
8076
}
8177

8278
/// Error types for aggregation.
@@ -141,9 +137,9 @@ impl<D: Digest + FixedOutput> From<RegisterError> for StmSignatureError<D> {
141137
impl<D: Digest + FixedOutput> From<MerkleTreeError<D>> for StmSignatureError<D> {
142138
fn from(e: MerkleTreeError<D>) -> Self {
143139
match e {
144-
MerkleTreeError::PathInvalid(e) => Self::PathInvalid(e),
140+
MerkleTreeError::BatchPathInvalid(e) => Self::PathInvalid(e),
145141
MerkleTreeError::SerializationError => Self::SerializationError,
146-
MerkleTreeError::BatchPathInvalid(e) => Self::BatchPathInvalid(e),
142+
MerkleTreeError::PathInvalid(_e) => unreachable!(),
147143
}
148144
}
149145
}

0 commit comments

Comments
 (0)