-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fixed CS
for ECPAIRING
#620
Conversation
(begin | ||
(if-not-zero IS_ECPAIRING_DATA (eq! CS_ECPAIRING ACCPC)) | ||
(if-not-zero IS_ECPAIRING_RESULT (eq! CS_ECPAIRING (* SUCCESS_BIT (- 1 TRIVIAL_PAIRING)))) | ||
(if-zero (is_ecpairing) (vanishes! CS_ECPAIRING)) |
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 don't know if this is already the case in the definition but we should (force-bool (is_ecpairing))
at some point.
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.
Should we turn
(defun (is_ecpairing)
(+ IS_ECPAIRING_DATA IS_ECPAIRING_RESULT))
into
(defun (is_ecpairing)
(force-bool (+ IS_ECPAIRING_DATA IS_ECPAIRING_RESULT)))
?
@@ -735,7 +739,12 @@ | |||
(eq! CS_ECMUL (* ICP (is_ecmul)))) | |||
|
|||
(defconstraint ecpairing-circuit-selector () | |||
(eq! CS_ECPAIRING ACCPC)) |
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'm confused why this constraint didn't blow up in the past. Don't we constrain ACCPC
to be zero when it's not pairing data ?
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.
For me ACCPC
was about acceptable pairs of points for the pairing circuit, at least that's what I remember the acronym to mean from yesterday's discussion @lorenzogentile404.
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 believe it was not blowing up as it was underconstrained. That is, along pairing data it was correctly forced to be 1 for acceptable pairs. However, along pairing result rows, when SUCCESS_BIT
was 1, ACCPC
could have been anything.
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.
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.
Shouldn't it be the case that ACCPC can only be nonzero along is_ecpairing_data
?
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
No description provided.