Expand description
This module implements permutation constraint polynomials.
Re-exportsยง
use alloc::vec::Vec;๐use crate::circuits::constraints::ConstraintSystem;๐use crate::circuits::wires::PERMUTS;๐use crate::proof::PointEvaluations;๐use crate::proof::ProofEvaluations;๐use ark_ff::FftField;๐use ark_ff::PrimeField;๐use ark_poly::univariate::DensePolynomial;๐use ark_poly::DenseUVPolynomial;๐use ark_poly::EvaluationDomain;๐use ark_poly::Radix2EvaluationDomain as D;๐use blake2::Blake2b512;๐use blake2::Digest;๐use core::array;๐use crate::circuits::polynomial::WitnessOverDomains;๐use crate::circuits::wires::Wire;๐use crate::circuits::wires::COLUMNS;๐use crate::curve::KimchiCurve;๐use crate::error::ProverError;๐use crate::prover_index::ProverIndex;๐use ark_ff::Zero;๐use ark_poly::univariate::DenseOrSparsePolynomial;๐use ark_poly::Evaluations;๐use ark_poly::Polynomial;๐use o1_utils::ExtendedDensePolynomial;๐use o1_utils::ExtendedEvaluations;๐use rand::CryptoRng;๐use rand::RngCore;๐use rayon::prelude::*;๐
Structsยง
- Shifts
- Shifts represent the shifts required in the permutation argument of PLONK. It also caches the shifted powers of omega for optimization purposes.
Constantsยง
- CONSTRAINTS
- Number of constraints produced by the argument.
Functionsยง
- eval_
permutation_ vanishing_ polynomial - Evaluates the polynomial (x - w^{n - zk_rows}) * (x - w^{n - zk_rows + 1}) * (x - w^{n - 1})
- eval_
vanishes_ on_ last_ n_ rows - Evaluates the polynomial (x - w^{n - i}) * (x - w^{n - i + 1}) * โฆ * (x - w^{n - 1})
- mul_
assign_ ๐skipping_ d1 - Multiply
lbyrelement-wise over d8, skipping the d1 rows โ the indices that are multiples of 8, since d8 = 8 * d1. The permutation contribution vanishes on all of d1, so those rows are left at the zero that building the terms produced; only the non-d1 products need computing. - permutation_
vanishing_ polynomial - The polynomial (x - w^{n - zk_rows}) * (x - w^{n - zk_rows + 1}) * (x - w^{n - 1})
- vanishes_
on_ last_ n_ rows - The polynomial (x - w^{n - i}) * (x - w^{n - i + 1}) * โฆ * (x - w^{n - 1})
- zk_w
- Returns the end of the circuit, which is used for introducing zero-knowledge in the permutation polynomial