-
Notifications
You must be signed in to change notification settings - Fork 65
Gadgets that works with naive main gate #71
base: dev
Are you sure you want to change the base?
Conversation
This PR moves the repo to use the public version of boojum as it’s being fully open sourced.
* Moves to ubuntu-latest. Removes installs. * Adds license check CI.
Fr to Goldilocks fixed
src/plonk/circuit/allocated_num.rs
Outdated
minus_one.negate(); | ||
|
||
let a_minus_b = a.sub(cs, &b)?; | ||
let a_minus_b_cond = Self::mask(cs, &a_minus_b, &condition)?; |
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 didn't address the fact that such multiplication can be merged with naive gate's multiplication
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.
It should be addressed by latest commit. @shamatar
|
||
assert_eq!(used_constant, true); | ||
|
||
if used_constant == false { |
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.
While I'll be checking the layout above, this line looks very invalid (compare to false after assert to true).
Also, you should never allocate constants (this feature is only needed for lookups), and instead add into gate.
Also, starting a sum with allocating zero variable is also not the most rational thing, you can just take first element of intermediate sums
What ❔
This PR adds some gadgets that can works with a main gate that has only 3 variables: qAA + qBB + qABAB + qC*C + qConst
Why ❔
It allowed to keep number of the polynomials in the fflonk implementation smaller so that cheaper evm verification cost.
Checklist
zk fmt
andzk lint
.