diff --git a/core/src/bytes/mod.rs b/core/src/bytes/mod.rs index f6d5bc482c..2cf8c8fb1c 100644 --- a/core/src/bytes/mod.rs +++ b/core/src/bytes/mod.rs @@ -24,7 +24,7 @@ use crate::bytes::trace::NUM_ROWS; pub const NUM_BYTE_OPS: usize = 9; /// The number of different byte lookup channels. -pub const NUM_BYTE_LOOKUP_CHANNELS: u32 = 4; +pub const NUM_BYTE_LOOKUP_CHANNELS: u32 = 16; /// A chip for computing byte operations. /// diff --git a/core/src/stark/chip.rs b/core/src/stark/chip.rs index c3e8abdc09..f184a33c5d 100644 --- a/core/src/stark/chip.rs +++ b/core/src/stark/chip.rs @@ -65,6 +65,23 @@ where air.eval(&mut builder); let (sends, receives) = builder.interactions(); + let nb_byte_sends = sends + .iter() + .filter(|s| s.kind == InteractionKind::Byte) + .count(); + let nb_byte_receives = receives + .iter() + .filter(|r| r.kind == InteractionKind::Byte) + .count(); + tracing::debug!( + "chip {} has {} byte interactions", + air.name(), + nb_byte_sends + nb_byte_receives + ); + if nb_byte_sends + nb_byte_receives > 1 << 11 { + panic!("too many byte interactions : {}", air.name()); + } + let mut max_constraint_degree = get_max_constraint_degree(&air, air.preprocessed_width(), PROOF_MAX_NUM_PVS);