hyperplonk/poly-iop/src/structs.rs
poly-iop/src/structs.rsRaw
1//! Structs for polynomials and extensions.
2
3use ark_ff::PrimeField;
4use std::marker::PhantomData;
5
6#[derive(Clone, Debug, Default, PartialEq)]
7/// Auxiliary information about the multilinear polynomial
8pub struct DomainInfo<F: PrimeField> {
9 /// max number of multiplicands in each product
10 pub max_degree: usize,
11 /// number of variables of the polynomial
12 pub num_variables: usize,
13 /// Associated field
14 #[doc(hidden)]
15 pub(crate) phantom: PhantomData<F>,
16}
17
18/// Subclaim when verifier is convinced
19pub struct SubClaim<F: PrimeField> {
20 /// the multi-dimensional point that this multilinear extension is evaluated
21 /// to
22 pub point: Vec<F>,
23 /// the expected evaluation
24 pub expected_evaluation: F,
25}
26
27/// An IOP proof is a list of messages from prover to verifier
28/// through the interactive protocol.
29/// It is a shared struct for both sumcheck and zerocheck protocols.
30#[derive(Clone, Debug, Default, PartialEq)]
31pub struct IOPProof<F: PrimeField> {
32 pub proofs: Vec<IOPProverMessage<F>>,
33}
34
35/// A message from the prover to the verifier at a given round
36/// is a list of evaluations.
37#[derive(Clone, Debug, Default, PartialEq)]
38pub struct IOPProverMessage<F: PrimeField> {
39 pub(crate) evaluations: Vec<F>,
40}