-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add SumChip #42
Add SumChip #42
Conversation
I believe this implements the V0 part of the onboarding project. Not sure if we want to merge this, but making PR for feedback. |
when_first_row.assert_eq(local.partial_sum, local.input); | ||
|
||
let mut when_transition = builder.when_transition(); | ||
when_transition.assert_eq(next.partial_sum, local.partial_sum + next.input); |
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.
Are we concerned about overflow?
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.
good point: for this particular chip, we define sum to mean as field elements, but indeed if we specified some bit range then we would need to add overflow constraints
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.
LGTM
We can merge it and then you can change it to V1 in the next PR
when_first_row.assert_eq(local.partial_sum, local.input); | ||
|
||
let mut when_transition = builder.when_transition(); | ||
when_transition.assert_eq(next.partial_sum, local.partial_sum + next.input); |
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.
good point: for this particular chip, we define sum to mean as field elements, but indeed if we specified some bit range then we would need to add overflow constraints
No description provided.