-
Notifications
You must be signed in to change notification settings - Fork 598
chore: makes ec addition opcode unsafe #8814
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
Open
guipublic
wants to merge
54
commits into
next
Choose a base branch
from
gd/unsafe_ec_add2
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
4725f75
the return of ec add unsafe
guipublic 2c35a92
fix test case
guipublic 6c14ad3
Merge branch 'master' into gd/unsafe_ec_add2
guipublic bbff2f1
Merge branch 'master' into gd/unsafe_ec_add2
guipublic 5b5fc0a
Merge branch 'master' into gd/unsafe_ec_add2
guipublic 32de43a
force CI to run e2e
guipublic 2f3ea01
Merge branch 'master' into gd/unsafe_ec_add2
guipublic da1604f
Merge branch 'master' into gd/unsafe_ec_add2
guipublic 3c60dcb
chore: remove unused header in public executor (#8990)
Maddiaa0 6baa710
Merge branch 'master' into gd/unsafe_ec_add2
guipublic d81f826
Merge branch 'master' into gd/unsafe_ec_add2
guipublic 98c7ebe
Merge branch 'master' into gd/unsafe_ec_add2
guipublic bab195f
Merge branch 'master' into gd/unsafe_ec_add2
guipublic bb57173
Merge branch 'master' into gd/unsafe_ec_add2
guipublic 249ab55
Merge branch 'master' into gd/unsafe_ec_add2
TomAFrench 8e08f66
Merge aranch 'master' into gd/unsafe_ec_add2
guipublic a0576c1
allow infinite points for ec_add
guipublic 2cdf9ad
Merge branch 'master' into gd/unsafe_ec_add2
guipublic 6aa64f2
Merge branch 'master' into gd/unsafe_ec_add2
guipublic 01a50ac
Merge branch 'master' into gd/unsafe_ec_add2
guipublic e3e8220
Merge branch 'master' into gd/unsafe_ec_add2
guipublic 06ef800
only allow compile time 'is_infinite'
guipublic 6519918
Merge branch 'master' into gd/unsafe_ec_add2
guipublic 3a05675
Merge branch 'master' into gd/unsafe_ec_add2
guipublic 56861f3
avoid failing check when there is no witness assignment
guipublic 525a63f
Merge branch 'master' into gd/unsafe_ec_add2
guipublic 304b758
Merge branch 'next' into gd/unsafe_ec_add2
guipublic 8b4809c
fix merge
guipublic 403c972
implement the all-or-nothing witness/constant for ec-add
guipublic 99ebdf5
Merge branch 'next' into gd/unsafe_ec_add2
guipublic 22b2e93
code review
guipublic 877231c
Merge branch 'next' into gd/unsafe_ec_add2
guipublic b8b5f75
Merge branch 'next' into gd/unsafe_ec_add2
guipublic c78a883
update Noir
guipublic c5156dc
Merge branch 'next' into gd/unsafe_ec_add2
guipublic cdf21c2
Clean up function descriptions
Rumata888 298cd7d
Merge branch 'next' into gd/unsafe_ec_add2
guipublic e47b58b
Merge branch 'next' into gd/unsafe_ec_add2
guipublic f899533
Merge branch 'next' into gd/unsafe_ec_add2
TomAFrench d3a2daf
fix unit test
guipublic 5feed4b
update vks
guipublic 85e2b90
Merge branch 'next' into gd/unsafe_ec_add2
guipublic 0cf8994
Merge branch 'next' into gd/unsafe_ec_add2
guipublic f0cf778
update vks
guipublic b64714b
Merge branch 'next' into gd/unsafe_ec_add2
guipublic 6f4a199
Merge branch 'next' into gd/unsafe_ec_add2
guipublic 2c133a8
updates cargo.lock
guipublic ef05a7d
handle opposite points
guipublic f4ae114
updates cargo.lock
guipublic b521f62
Merge branch 'next' into gd/unsafe_ec_add2
guipublic c872ab2
update vks
guipublic ef821e3
code review: check the x coordinates are distinct
guipublic f8555e8
add unit tests
guipublic c3bdb9b
Merge branch 'next' into gd/unsafe_ec_add2
guipublic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why are you using unconditional add? Are you checking that the inputs are different? If the values are the same, this could allow you to create any point as a result
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.
This is the whole point of the PR, the checks have been moved on the Noir side so that we can avoid them in some cases. See this comment in the PR description:
"It will allow Aztec protocol circuit to use directly the opcode when the 'safety' is already known (and implied by previous operations)."
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.
You shouldn't remove the difference!=zero check. It is always necessary. There is no case that it is not necessary, when you are performing non-doubling additions.
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.
I disagree, else the function
unconditional_add()would not exist. See the comments of the function:For instance it is used for batch mul:
Uh oh!
There was an error while loading. Please reload this page.
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.
The function unconditional add is only used in 2 cases:
However, these are extremely rare situations. It is extremely dangerous to leave the operation like this by default, because then it does not ensure the correctness of additions at all in 99% of cases. If you really want to allow the developer to disable this particular check, then there should be a setting that allows this (with loud disclaimers). It shouldn't be by default
Uh oh!
There was an error while loading. Please reload this page.
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.
I will add a setting then.In fact no, I will add the check because I don't want to have to change ACIR format.
I'll add the setting later, if this PR manage to go through!
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.
Done