Skip to main content

Module domain_constant_evaluation

Module domain_constant_evaluation 

Source
Expand description

This contains the DomainConstantEvaluations which is used to provide precomputations to a ConstraintSystem.

Re-exportsยง

use crate::circuits::domains::EvaluationDomains; ๐Ÿ”’
use alloc::vec; ๐Ÿ”’
use alloc::vec; ๐Ÿ”’
use alloc::vec::Vec; ๐Ÿ”’
use ark_ff::FftField; ๐Ÿ”’
use ark_poly::univariate::DensePolynomial as DP; ๐Ÿ”’
use ark_poly::EvaluationDomain; ๐Ÿ”’
use ark_poly::Evaluations as E; ๐Ÿ”’
use ark_poly::Polynomial; ๐Ÿ”’
use ark_poly::Radix2EvaluationDomain as D; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use serde_with::serde_as; ๐Ÿ”’
use super::polynomials::permutation::permutation_vanishing_polynomial; ๐Ÿ”’
use rayon::prelude::*; ๐Ÿ”’

Structsยง

DomainConstantEvaluations
pre-computed polynomials that depend only on the chosen field and domain

Functionsยง

domain_points ๐Ÿ”’
The points of domain (g^0, g^1, โ€ฆ), computed in parallel. Each chunk seeds its first power with a single exponentiation and then walks a running product, so the work is O(n) multiplications spread across the cores with only one pow per chunk of overhead. For domains smaller than the chunk size this is a single sequential chunk, so the parallelism never dominates.
eval_from_roots_over_d8 ๐Ÿ”’
Evaluate the polynomial ฮ  (x - root) (given by its roots) at every point of d8, where x_d8 holds the d8 domain points. For the low-degree vanishing polynomials this is far cheaper than padding to 8n coefficients and running an FFT, and it parallelises trivially over the points.