binius_core/constraint_system/
mod.rs1pub mod channel;
4mod common;
5pub mod error;
6pub mod exp;
7mod prove;
8pub mod validate;
9mod verify;
10
11use binius_field::{BinaryField128b, TowerField};
12use binius_macros::{DeserializeBytes, SerializeBytes};
13use channel::{ChannelId, Flush};
14use exp::Exp;
15pub use prove::prove;
16pub use verify::verify;
17
18use crate::oracle::{ConstraintSet, MultilinearOracleSet, OracleId};
19
20#[derive(Debug, Clone, SerializeBytes, DeserializeBytes)]
28#[deserialize_bytes(eval_generics(F = BinaryField128b))]
29pub struct ConstraintSystem<F: TowerField> {
30 pub oracles: MultilinearOracleSet<F>,
31 pub table_constraints: Vec<ConstraintSet<F>>,
32 pub non_zero_oracle_ids: Vec<OracleId>,
33 pub flushes: Vec<Flush<F>>,
34 pub exponents: Vec<Exp<F>>,
35 pub max_channel_id: ChannelId,
36}
37
38impl<F: TowerField> ConstraintSystem<F> {
39 pub const fn no_base_constraints(self) -> Self {
40 self
41 }
42}
43
44#[derive(Debug, Clone)]
46pub struct Proof {
47 pub transcript: Vec<u8>,
48}
49
50impl Proof {
51 pub fn get_proof_size(&self) -> usize {
52 self.transcript.len()
53 }
54}