Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(fflonk): non-default allocator feature #61

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions crates/fflonk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ categories.workspace = true
description = "Reference implementation of fflonk prover and verifier"

[dependencies]
franklin-crypto = { workspace = true, features = ["allocator"] }
franklin-crypto = { workspace = true, optional = true, default-features = true}
num-bigint = { version = "0.4", features = ["serde"] }
num-traits = "0.2"
rand = "0.4"
Expand All @@ -22,5 +22,6 @@ bincode = "1.3"
byteorder = "1"

[features]
default = ["sanity"]
default = ["franklin-crypto"]
sanity = []
allocator = ["franklin-crypto/allocator"]
3 changes: 3 additions & 0 deletions crates/fflonk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,7 @@ mod test;
pub const L1_VERIFIER_DOMAIN_SIZE_LOG: usize = 23;
pub const MAX_COMBINED_DEGREE_FACTOR: usize = 9;
pub(crate) const SANITY_CHECK: bool = true;
#[cfg(feature = "allocator")]
pub type FflonkAssembly<E, S, A = std::alloc::Global> = Assembly<E, PlonkCsWidth3Params, NaiveMainGate, S, A>;
#[cfg(not(feature = "allocator"))]
pub type FflonkAssembly<E, S> = Assembly<E, PlonkCsWidth3Params, NaiveMainGate, S>;
Loading