Prover Components
TheComponentProvers struct is similar to the Components struct but implements additional functions required by the prover, such as computing the composition polynomial. It is a collection of prover components as follows:
components is a collection of objects that implement the ComponentProver trait. The ComponentProver trait is a wrapper around the Component trait with an additional function shown as follows:
ComponentProvers into a Components struct as follows:
ComponentProvers struct to compute the composition polynomial is implemented as follows:
&self: This is theComponentProverson which the function is called.random_coeff: This is an element from theSecureField(i.e. ). In our example, this is represented as .trace: TheTracestruct which contains all the polynomials that make up the entire trace including all the components. For efficiency, it stores each polynomial in both coefficients and evaluations form.
total_constraints and initialize an accumulator. The total_constraints determine the number of powers of (random_coeff) required for the random linear combination.
For each component, we call evaluate_constraint_quotients_on_domain, which computes and accumulates the evaluations of that component’s quotients on their respective evaluation domains within the accumulator. For the th component, we add the evaluations of the quotient over its evaluation domain to the accumulator. Similarly, for the st component, we add the evaluations of the quotient over its evaluation domain to the accumulator.
After adding all component quotient evaluations to the accumulator, we call the finalize() function, which:
- Combines the accumulated evaluations at different domain sizes to compute the evaluations of the quotient composition polynomial over the domain where .
- Interpolates over using circle FFT to convert it into coefficient representation.
SecureCirclePoly since the evaluations of are in the secure field (as is randomly sampled from ).