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

[fix] expr builder eval inconsistency #1289

Merged
merged 4 commits into from
Jan 26, 2025
Merged

[fix] expr builder eval inconsistency #1289

merged 4 commits into from
Jan 26, 2025

Conversation

luffykai
Copy link
Contributor

@luffykai luffykai commented Jan 26, 2025

Issue: the way we do evaluate_overflow_isize and evaluate_overflow_expr were inconsistent for Select
Since we had flag available for isize we directly using it to choose left or right, but that's not viable in expr. But this inconsistency MIGHT result in different max_overflow_bit in some condition (=> ended up in range checker error), which we only discovered with BLS curve double setup...

@luffykai luffykai marked this pull request as ready for review January 26, 2025 01:07

This comment has been minimized.

#[allow(unused)]
fn debug_print(&self, msg: &str) {
if self.debug {
println!("{}", msg);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this different than when you just use dbg!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when adding print to mod-builder, it applies to all chips using it. But usually when debugging i only care about one chip. So the way I use this is to call set_debug only at the specific chip

Copy link
Contributor

@jonathanpwang jonathanpwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but can you move the test to pairing tests crate instead

This comment has been minimized.

Copy link

group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair (+26 [+1.2%]) 2,207 513,827 19,376,791 - - -
fibonacci_program (+397 [+7.7%]) 5,541 1,500,137 51,487,838 - - -
regex_program (+3066 [+21.0%]) 17,664 4,190,904 165,010,909 - - -
ecrecover_program (-94 [-3.6%]) 2,494 285,401 15,075,033 - - -

Commit: d507515

Benchmark Workflow

@luffykai luffykai merged commit 8328d73 into main Jan 26, 2025
17 checks passed
@luffykai luffykai deleted the lunkai/bls-test branch January 26, 2025 04:55
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