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 commitments: Commitments<Com<SC>>,
21 pub opened_values: OpenedValues<SC::Challenge>,
22 pub opening_proof: PcsProof<SC>,
23 pub degree_bits: usize,
24}
25
26#[derive(Debug, Serialize, Deserialize)]
27pub struct Commitments<Com> {
28 pub trace: Com,
29 pub quotient_chunks: Com,
30 pub random: Option<Com>,
31}
32
33#[derive(Debug, Serialize, Deserialize)]
34pub struct OpenedValues<Challenge> {
35 pub trace_local: Vec<Challenge>,
36 pub trace_next: Option<Vec<Challenge>>,
40 pub preprocessed_local: Option<Vec<Challenge>>,
41 pub preprocessed_next: Option<Vec<Challenge>>, pub quotient_chunks: Vec<Vec<Challenge>>,
43 pub random: Option<Vec<Challenge>>,
44}