plonky2/src/lib.rs

31 lines
692 B
Rust
Raw Normal View History

#![allow(incomplete_features)]
#![allow(const_evaluatable_unchecked)]
2021-11-30 17:12:13 +01:00
#![allow(clippy::new_without_default)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::len_without_is_empty)]
#![allow(clippy::needless_range_loop)]
#![feature(asm)]
#![feature(asm_sym)]
#![feature(destructuring_assignment)]
Native Poseidon implementation(s) (#207) * Simplify and refactor GMiMC benchmark. * Refactor/combine GMiMC and Rescue hash benchmarks. * Remove old Rescue bench; rename GMiMC bench. * Add from_canonical_u128 for fields. * Initial version of Poseidon. * Partial implementation of fast Poseidon. * Complete (but broken) implementation of fast partial rounds. * Fix index calculation. * Add basic tests. * Fix constants; fix bugs in fast partial round calculation. * Rename main functions. * Add test vectors. * Use x^7 for s-box monomial. * Fix s-box application in fast version. * Make WIDTH a parameter. * Working version with both widths. * Updated the constants so they use x^3; added test vectors. * Expand bench_hash to cover both widths and report relative slowdown. * Remove references to MaybeUninit. * First draft of refactoring the two Poseidon widths. * Tidy up use of conversion to/from raw data. * Add some comments. * Refactor tests. * Apply cargo fmt changes. * Have `Field`s implement `PoseidonInterface` (#209) * Have `Field`s implement `PoseidonInterface` Rather than having a sort of "dummy struct" implement `PoseidonInterface` with the field as a generic param. I think this seems more natural and type-safe. The type safety does come at a price -- it would be harder to do dynamic things such as taking `WIDTH` as a command line option -- but I think that's alright. * Fix missed conflicts. * cargo fmt fixes. * Fix to accommodate changes in latest nightly. Co-authored-by: Hamish Ivey-Law <426294+unzvfu@users.noreply.github.com> Co-authored-by: Hamish Ivey-Law <hamish@ivey-law.name> * Sanity check number of rounds. Co-authored-by: Daniel Lubarov <daniel@lubarov.com>
2021-09-01 21:45:52 +10:00
#![feature(generic_const_exprs)]
2021-09-03 15:33:44 -07:00
#![feature(specialization)]
#![feature(stdsimd)]
pub mod field;
pub mod fri;
pub mod gadgets;
pub mod gates;
pub mod hash;
pub mod iop;
pub mod plonk;
pub mod polynomial;
pub mod util;
2021-11-09 15:14:41 -08:00
// Set up Jemalloc
#[cfg(not(target_env = "msvc"))]
use jemallocator::Jemalloc;
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;