Skip to content

Commit b2df10f

Browse files
committed
replace future_proof_system feature with future_snark
1 parent 4817ac9 commit b2df10f

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

mithril-stm/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ default = ["rug-backend"]
1818
rug-backend = ["rug/default"]
1919
num-integer-backend = ["dep:num-bigint", "dep:num-rational", "dep:num-traits"]
2020
benchmark-internals = [] # For benchmarking multi_sig
21-
future_proof_system = [] # For activating future proof systems
2221
future_snark = [
2322
"dep:ff",
2423
"dep:group",

mithril-stm/src/protocol/aggregate_signature/clerk.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use anyhow::Context;
22
use blake2::digest::{Digest, FixedOutput};
33

4-
#[cfg(feature = "future_proof_system")]
4+
#[cfg(feature = "future_snark")]
55
use anyhow::anyhow;
66

7-
#[cfg(feature = "future_proof_system")]
7+
#[cfg(feature = "future_snark")]
88
use super::AggregationError;
99

1010
use super::{AggregateSignature, AggregateSignatureType, AggregateVerificationKey};
@@ -89,7 +89,7 @@ impl<D: Digest + Clone + FixedOutput + Send + Sync> Clerk<D> {
8989
)
9090
})?,
9191
)),
92-
#[cfg(feature = "future_proof_system")]
92+
#[cfg(feature = "future_snark")]
9393
AggregateSignatureType::Future => Err(anyhow!(
9494
AggregationError::UnsupportedProofSystem(aggregate_signature_type)
9595
)),

mithril-stm/src/protocol/aggregate_signature/signature.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub enum AggregateSignatureType {
1717
#[default]
1818
Concatenation,
1919
/// Future proof system. Not suitable for production.
20-
#[cfg(feature = "future_proof_system")]
20+
#[cfg(feature = "future_snark")]
2121
Future,
2222
}
2323

@@ -28,7 +28,7 @@ impl AggregateSignatureType {
2828
pub fn get_byte_encoding_prefix(&self) -> u8 {
2929
match self {
3030
AggregateSignatureType::Concatenation => 0,
31-
#[cfg(feature = "future_proof_system")]
31+
#[cfg(feature = "future_snark")]
3232
AggregateSignatureType::Future => 255,
3333
}
3434
}
@@ -39,7 +39,7 @@ impl AggregateSignatureType {
3939
pub fn from_byte_encoding_prefix(byte: u8) -> Option<Self> {
4040
match byte {
4141
0 => Some(AggregateSignatureType::Concatenation),
42-
#[cfg(feature = "future_proof_system")]
42+
#[cfg(feature = "future_snark")]
4343
255 => Some(AggregateSignatureType::Future),
4444
_ => None,
4545
}
@@ -52,7 +52,7 @@ impl<D: Clone + Digest + FixedOutput + Send + Sync> From<&AggregateSignature<D>>
5252
fn from(aggr_sig: &AggregateSignature<D>) -> Self {
5353
match aggr_sig {
5454
AggregateSignature::Concatenation(_) => AggregateSignatureType::Concatenation,
55-
#[cfg(feature = "future_proof_system")]
55+
#[cfg(feature = "future_snark")]
5656
AggregateSignature::Future => AggregateSignatureType::Future,
5757
}
5858
}
@@ -64,7 +64,7 @@ impl FromStr for AggregateSignatureType {
6464
fn from_str(s: &str) -> Result<Self, Self::Err> {
6565
match s {
6666
"Concatenation" => Ok(AggregateSignatureType::Concatenation),
67-
#[cfg(feature = "future_proof_system")]
67+
#[cfg(feature = "future_snark")]
6868
"Future" => Ok(AggregateSignatureType::Future),
6969
_ => Err(anyhow!("Unknown aggregate signature type: {}", s)),
7070
}
@@ -75,7 +75,7 @@ impl Display for AggregateSignatureType {
7575
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7676
match self {
7777
AggregateSignatureType::Concatenation => write!(f, "Concatenation"),
78-
#[cfg(feature = "future_proof_system")]
78+
#[cfg(feature = "future_snark")]
7979
AggregateSignatureType::Future => write!(f, "Future"),
8080
}
8181
}
@@ -89,7 +89,7 @@ impl Display for AggregateSignatureType {
8989
))]
9090
pub enum AggregateSignature<D: Clone + Digest + FixedOutput + Send + Sync> {
9191
/// A future proof system.
92-
#[cfg(feature = "future_proof_system")]
92+
#[cfg(feature = "future_snark")]
9393
Future,
9494

9595
/// Concatenation proof system.
@@ -112,7 +112,7 @@ impl<D: Clone + Digest + FixedOutput + Send + Sync> AggregateSignature<D> {
112112
AggregateSignature::Concatenation(concatenation_proof) => {
113113
concatenation_proof.verify(msg, avk, parameters)
114114
}
115-
#[cfg(feature = "future_proof_system")]
115+
#[cfg(feature = "future_snark")]
116116
AggregateSignature::Future => Err(anyhow!(
117117
AggregateSignatureError::UnsupportedProofSystem(self.into())
118118
)),
@@ -145,7 +145,7 @@ impl<D: Clone + Digest + FixedOutput + Send + Sync> AggregateSignature<D> {
145145

146146
ConcatenationProof::batch_verify(&concatenation_proofs, msgs, avks, parameters)
147147
}
148-
#[cfg(feature = "future_proof_system")]
148+
#[cfg(feature = "future_snark")]
149149
AggregateSignatureType::Future => Err(anyhow!(
150150
AggregateSignatureError::UnsupportedProofSystem(aggregate_signature_type)
151151
)),
@@ -164,7 +164,7 @@ impl<D: Clone + Digest + FixedOutput + Send + Sync> AggregateSignature<D> {
164164
AggregateSignature::Concatenation(concatenation_proof) => {
165165
concatenation_proof.to_bytes()
166166
}
167-
#[cfg(feature = "future_proof_system")]
167+
#[cfg(feature = "future_snark")]
168168
AggregateSignature::Future => vec![],
169169
};
170170
aggregate_signature_bytes.append(&mut proof_bytes);
@@ -182,7 +182,7 @@ impl<D: Clone + Digest + FixedOutput + Send + Sync> AggregateSignature<D> {
182182
AggregateSignatureType::Concatenation => Ok(AggregateSignature::Concatenation(
183183
ConcatenationProof::from_bytes(proof_bytes)?,
184184
)),
185-
#[cfg(feature = "future_proof_system")]
185+
#[cfg(feature = "future_snark")]
186186
AggregateSignatureType::Future => Ok(AggregateSignature::Future),
187187
}
188188
}
@@ -191,7 +191,7 @@ impl<D: Clone + Digest + FixedOutput + Send + Sync> AggregateSignature<D> {
191191
pub fn to_concatenation_proof(&self) -> Option<&ConcatenationProof<D>> {
192192
match self {
193193
AggregateSignature::Concatenation(proof) => Some(proof),
194-
#[cfg(feature = "future_proof_system")]
194+
#[cfg(feature = "future_snark")]
195195
AggregateSignature::Future => None,
196196
}
197197
}

0 commit comments

Comments
 (0)