Expand description
Core traits and types shared between plonky2 prover and verifier.
This crate provides the foundational types and traits that both the full plonky2 prover and the lightweight verifier depend on.
Re-exports§
pub extern crate alloc;pub use challenger::Challenger;pub use circuit_config::CircuitConfig;pub use circuit_config::PolyFriZkConfig;pub use circuit_config::ZkConfig;pub use circuit_config::ZkMode;pub use config::GenericConfig;pub use config::GenericHashOut;pub use config::Hasher;pub use config::KeccakGoldilocksConfig;pub use config::PoseidonGoldilocksConfig;pub use fri::FriBatchMaskingParams;pub use fri::FriChallenger;pub use fri::FriConfig;pub use fri::FriConfigObserve;pub use fri::FriFinalPolyLayout;pub use fri::FriParams;pub use fri::FriParamsObserve;pub use fri::FriReductionStrategy;pub use fri_proof::combine_final_poly_chunks;pub use fri_proof::eval_final_polys_at_point;pub use fri_proof::CompressedFriProof;pub use fri_proof::CompressedFriQueryRounds;pub use fri_proof::FriBatchMaskProof;pub use fri_proof::FriBatchMaskQuery;pub use fri_proof::FriFinalPolys;pub use fri_proof::FriInitialTreeProof;pub use fri_proof::FriProof;pub use fri_proof::FriQueryRound;pub use fri_proof::FriQueryStep;pub use fri_structure::FriBatchInfo;pub use fri_structure::FriChallenges;pub use fri_structure::FriCoefficient;pub use fri_structure::FriInstanceInfo;pub use fri_structure::FriOpeningBatch;pub use fri_structure::FriOpeningExpression;pub use fri_structure::FriOpeningTerm;pub use fri_structure::FriOpenings;pub use fri_structure::FriOracleInfo;pub use fri_structure::FriOracleLayout;pub use fri_structure::FriOracleRepresentation;pub use fri_structure::FriPolynomialInfo;pub use fri_validate_shape::validate_batch_fri_proof_shape;pub use fri_validate_shape::validate_fri_proof_shape;pub use fri_verifier::compute_evaluation;pub use fri_verifier::fri_combine_initial;pub use fri_verifier::fri_verify_proof_of_work;pub use fri_verifier::verify_fri_proof;pub use fri_verifier::PrecomputedReducedOpenings;pub use hash::path_compression::compress_merkle_proofs;pub use hash::path_compression::decompress_merkle_proofs;pub use hash_types::BytesHash;pub use hash_types::HashOut;pub use hash_types::RichField;pub use hash_types::NUM_HASH_OUT_ELTS;pub use hashing::PlonkyPermutation;pub use iop::flatten_target;pub use iop::unflatten_target;pub use iop::BoolTarget;pub use iop::ExtensionAlgebraTarget;pub use iop::ExtensionTarget;pub use iop::HashOutTarget;pub use iop::MerkleCapTarget;pub use iop::Target;pub use iop::Wire;pub use keccak::KeccakHash;pub use keccak::KeccakPermutation;pub use merkle_proofs::MerkleProof;pub use merkle_tree::capacity_up_to_mut;pub use merkle_tree::fill_digests_buf;pub use merkle_tree::fill_subtree;pub use merkle_tree::merkle_tree_prove;pub use merkle_tree::MerkleCap;pub use merkle_tree::MerkleTree;pub use plonk_common::eval_l_0;pub use plonk_common::eval_zero_poly;pub use plonk_common::reduce_with_powers;pub use plonk_common::reduce_with_powers_multi;pub use plonk_common::salt_size;pub use plonk_common::PlonkOracle;pub use plonk_common::SALT_SIZE;pub use poseidon::Permuter;pub use poseidon::Poseidon;pub use poseidon::PoseidonHash;pub use poseidon::PoseidonPermutation;pub use poseidon::ALL_ROUND_CONSTANTS;pub use poseidon::HALF_N_FULL_ROUNDS;pub use poseidon::N_FULL_ROUNDS_TOTAL;pub use poseidon::N_PARTIAL_ROUNDS;pub use poseidon::N_ROUNDS;pub use poseidon::SPONGE_CAPACITY;pub use poseidon::SPONGE_RATE;pub use poseidon::SPONGE_WIDTH;pub use proof::FriInferredElements;pub use proof::ProofChallenges;pub use selectors::LookupSelectors;pub use selectors::SelectorsInfo;pub use selectors::UNUSED_SELECTOR;pub use util::reverse_bits;
Modules§
- challenger
- circuit_
config - Circuit configuration types shared between prover and verifier.
- config
- Hashing configuration for plonky2.
- field
- Re-export of
plonky2_fieldfor field types. - fri
- FRI (Fast Reed-Solomon IOP) configuration types.
- fri_
proof - FRI proof types shared between prover and verifier.
- fri_
structure - FRI structure types shared between prover and verifier.
- fri_
validate_ shape - FRI proof shape validation.
- fri_
verifier - FRI verification logic shared between prover and verifier.
- hash
- Hash-related utilities shared between prover and verifier.
- hash_
types - Core hash output types used throughout plonky2.
- hashing
- Concrete instantiation of a hash function.
- iop
- IOP (Interactive Oracle Proof) types shared between prover and verifier.
- keccak
- merkle_
proofs - merkle_
tree - plonk
- PLONK types shared between prover and verifier.
- plonk_
common - Utility methods and constants for Plonk shared between prover and verifier.
- poseidon
- Implementation of the Poseidon hash function, as described in https://eprint.iacr.org/2019/458.pdf
- poseidon_
crandall - poseidon_
goldilocks - Implementations for Poseidon over Goldilocks field of widths 8 and 12.
- proof
- Proof challenge types shared between prover and verifier.
- reducing
- selectors
- Selector information shared between prover and verifier.
- strided_
view - util
- Utility functions shared between prover and verifier.
Constants§
- D
- The extension degree for the field extension (D=2 provides 100-bits of security)
Functions§
- assume
- branch_
hint - Try to force Rust to emit a branch. Example: if x > 2 { y = foo(); branch_hint(); } else { y = bar(); } This function has no semantics. It is a hint only.
- log2_
ceil - Computes
ceil(log_2(n)). - log2_
strict - Computes
log_2(n), panicking ifnis not a power of two. - reverse_
index_ bits - Permutes
arrsuch that each index is mapped to its reverse in binary. - reverse_
index_ bits_ in_ place