p3_uni_stark/
proof.rs

1use alloc::vec::Vec;
2
3use p3_commit::Pcs;
4use serde::{Deserialize, Serialize};
5
6use crate::StarkGenericConfig;
7
8type Com<SC> = <<SC as StarkGenericConfig>::Pcs as Pcs<
9    <SC as StarkGenericConfig>::Challenge,
10    <SC as StarkGenericConfig>::Challenger,
11>>::Commitment;
12type PcsProof<SC> = <<SC as StarkGenericConfig>::Pcs as Pcs<
13    <SC as StarkGenericConfig>::Challenge,
14    <SC as StarkGenericConfig>::Challenger,
15>>::Proof;
16
17#[derive(Serialize, Deserialize)]
18#[serde(bound = "")]
19pub struct Proof<SC: StarkGenericConfig> {
20    pub(crate) commitments: Commitments<Com<SC>>,
21    pub(crate) opened_values: OpenedValues<SC::Challenge>,
22    pub(crate) opening_proof: PcsProof<SC>,
23    pub(crate) degree_bits: usize,
24}
25
26#[derive(Debug, Serialize, Deserialize)]
27pub struct Commitments<Com> {
28    pub(crate) trace: Com,
29    pub(crate) quotient_chunks: Com,
30    pub(crate) random: Option<Com>,
31}
32
33#[derive(Debug, Serialize, Deserialize)]
34pub struct OpenedValues<Challenge> {
35    pub(crate) trace_local: Vec<Challenge>,
36    pub(crate) trace_next: Vec<Challenge>,
37    pub(crate) quotient_chunks: Vec<Vec<Challenge>>,
38    pub(crate) random: Option<Vec<Challenge>>,
39}