-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
u8 pair table #225
u8 pair table #225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch to fix sound issue
@@ -242,7 +242,7 @@ impl<const M: usize, const C: usize, E: ExtensionField> UInt<M, C, E> { | |||
let limbs = (0..k) | |||
.map(|_| { | |||
let w = circuit_builder.create_witin(|| "").unwrap(); | |||
circuit_builder.assert_byte(|| "", w.expr()).unwrap(); | |||
circuit_builder.assert_byte_slow(|| "", w.expr()).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit concern is about this extra overhead on original "assert_byte" since it will occur a slow version.
To address this, an option is iterating limbs via chunk(2) therefore assert_u8_pair works.
There are other place to invoke assert_byte() directly
Line 285 in b300e9b
cb.assert_ux::<_, _, C>(|| format!("limb_{i}_in_{C}"), w.expr())?; |
Which I believe for potiential performance pitfall we should refactor it traverse in chunk as well
Replaced by the simpler #234 |
Issue #214