1use binius_core::ConstraintSystemError;
4use binius_iop::channel::Error as IOPChannelError;
5use binius_ip::{channel::Error as ChannelError, sumcheck};
6
7use crate::{
8 fri,
9 protocols::{intmul, shift},
10 ring_switch,
11};
12
13#[derive(Debug, thiserror::Error)]
14pub enum Error {
15 #[error("transcript error: {0}")]
16 Transcript(#[from] binius_transcript::Error),
17 #[error("channel error: {0}")]
18 Channel(#[from] ChannelError),
19 #[error("IOP channel error: {0}")]
20 IOPChannel(#[from] IOPChannelError),
21 #[error("FRI error: {0}")]
22 FRI(#[from] fri::Error),
23 #[error("ring switch error: {0}")]
24 RingSwitch(#[from] ring_switch::Error),
25 #[error("IntMul error: {0}")]
26 IntMul(#[from] intmul::Error),
27 #[error("sumcheck error: {0}")]
28 Sumcheck(#[from] sumcheck::Error),
29 #[error("incorrect public inputs length: expected {expected}, got {actual}")]
30 IncorrectPublicInputLength { expected: usize, actual: usize },
31 #[error("constraint system error: {0}")]
32 ConstraintSystem(#[from] ConstraintSystemError),
33 #[error("shift reduction error: {0}")]
34 ShiftReduction(#[from] shift::Error),
35}