@@ -63,22 +63,10 @@ pub enum StmSignatureError {
6363 #[ error( "Received index, {0}, is higher than what the security parameter allows, {1}." ) ]
6464 IndexBoundFailed ( u64 , u64 ) ,
6565
66- /// MSP.Eval was computed incorrectly
67- #[ error( "The claimed evaluation of function phi is incorrect." ) ]
68- EvalInvalid ( [ u8 ; 64 ] ) ,
69-
7066 /// The lottery was actually lost for the signature
7167 #[ error( "Lottery for this epoch was lost." ) ]
7268 LotteryLost ,
7369
74- /// A party submitted an invalid signature
75- #[ error( "A provided signature is invalid" ) ]
76- SignatureInvalid ( BlsSignature ) ,
77-
78- /// Batch verification of STM signatures failed
79- #[ error( "Batch verification of STM signatures failed" ) ]
80- BatchInvalid ,
81-
8270 /// This error occurs when the the serialization of the raw bytes failed
8371 #[ error( "Invalid bytes" ) ]
8472 SerializationError ,
@@ -91,58 +79,25 @@ pub enum AggregationError {
9179 #[ error( "Not enough signatures. Got only {0} out of {1}." ) ]
9280 NotEnoughSignatures ( u64 , u64 ) ,
9381
94- /// This error happens when we try to convert a u64 to a usize and it does not fit
95- #[ error( "Invalid usize conversion" ) ]
96- UsizeConversionInvalid ,
97-
98- /// The proof system used in the aggregate signature is not supported
9982 #[ error( "Unsupported proof system: {0}" ) ]
10083 UnsupportedProofSystem ( AggregateSignatureType ) ,
101- }
102-
103- /// Errors which can be output by `CoreVerifier`.
104- #[ derive( Debug , Clone , thiserror:: Error ) ]
105- pub enum CoreVerifierError {
106- /// No quorum was found
107- #[ error( "No Quorum was found. Expected {0} signatures but got {1}" ) ]
108- NoQuorum ( u64 , u64 ) ,
10984
11085 /// There is a duplicate index
11186 #[ error( "Indices are not unique." ) ]
11287 IndexNotUnique ,
113-
114- /// The aggregated signature is invalid
115- #[ error( "Aggregate signature is invalid" ) ]
116- AggregateSignatureInvalid ,
117-
118- /// One of the aggregated signatures is invalid
119- #[ error( "Individual signature is invalid: {0}" ) ]
120- IndividualSignatureInvalid ( #[ source] StmSignatureError ) ,
12188}
12289
12390/// Errors which can be output by Mithril aggregate verification.
12491#[ derive( Debug , Clone , thiserror:: Error ) ]
12592pub enum StmAggregateSignatureError {
126- /// The IVK is invalid after aggregating the keys
127- #[ error( "Aggregated key does not correspond to the expected key." ) ]
128- IvkInvalid ( Box < BlsVerificationKey > ) ,
129-
13093 /// This error occurs when the the serialization of the raw bytes failed
13194 #[ error( "Invalid bytes" ) ]
13295 SerializationError ,
13396
134- /// Invalid merkle batch path
135- #[ error( "Batch path does not verify against root" ) ]
136- PathInvalid ( Vec < u8 > ) ,
137-
13897 /// Batch verification of STM aggregate signatures failed
13998 #[ error( "Batch verification of STM aggregate signatures failed" ) ]
14099 BatchInvalid ,
141100
142- /// `CoreVerifier` check failed
143- #[ error( "Core verification error: {0}" ) ]
144- CoreVerificationError ( #[ source] CoreVerifierError ) ,
145-
146101 /// The proof system used in the aggregate signature is not supported
147102 #[ error( "Unsupported proof system: {0}" ) ]
148103 UnsupportedProofSystem ( AggregateSignatureType ) ,
@@ -155,10 +110,6 @@ pub enum RegisterError {
155110 #[ error( "This key has already been registered." ) ]
156111 KeyRegistered ( Box < BlsVerificationKey > ) ,
157112
158- /// Verification key is the infinity
159- #[ error( "Verification key is the infinity" ) ]
160- VerificationKeyInfinity ( Box < BlsVerificationKey > ) ,
161-
162113 /// The supplied key is not valid
163114 #[ error( "The verification of correctness of the supplied key is invalid." ) ]
164115 KeyInvalid ( Box < BlsVerificationKeyProofOfPossession > ) ,
0 commit comments