Skip to content
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

Closed
wants to merge 7 commits into from
Closed

u8 pair table #225

wants to merge 7 commits into from

Conversation

naure
Copy link
Collaborator

@naure naure commented Sep 15, 2024

Issue #214

@naure naure requested a review from kunxian-xia September 15, 2024 18:51
@naure naure requested a review from hero78119 September 16, 2024 10:48
Copy link
Collaborator

@hero78119 hero78119 left a 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();
Copy link
Collaborator

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

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

@naure naure mentioned this pull request Sep 17, 2024
@naure
Copy link
Collaborator Author

naure commented Sep 17, 2024

Replaced by the simpler #234

@naure naure closed this Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants