use alloc::vec::Vec;
use p3_commit::Mmcs;
use p3_field::Field;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone)]
#[serde(bound(
serialize = "Witness: Serialize, InputProof: Serialize",
deserialize = "Witness: Deserialize<'de>, InputProof: Deserialize<'de>"
))]
pub struct FriProof<F: Field, M: Mmcs<F>, Witness, InputProof> {
pub commit_phase_commits: Vec<M::Commitment>,
pub query_proofs: Vec<QueryProof<F, M, InputProof>>,
pub final_poly: F,
pub pow_witness: Witness,
}
#[derive(Serialize, Deserialize, Clone)]
#[serde(bound(
serialize = "InputProof: Serialize",
deserialize = "InputProof: Deserialize<'de>",
))]
pub struct QueryProof<F: Field, M: Mmcs<F>, InputProof> {
pub input_proof: InputProof,
pub commit_phase_openings: Vec<CommitPhaseProofStep<F, M>>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(bound = "")]
pub struct CommitPhaseProofStep<F: Field, M: Mmcs<F>> {
pub sibling_value: F,
pub opening_proof: M::Proof,
}