You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current design of the Poseidon gadget is to have a single set of polynomials for 5 rounds, and the round constants are given as "public inputs". This design does not make sense, and the round constants should simply be constants in the polynomial.
We have something like:
By supposing we have 60 full rounds, I suggest to have the following design:
We split the unique gadget in 12 gadgets, each having a different selector.
Each gadget has its own set of 15 round constants encoded in the polynomials describing the gadget (15 because we have 5 rounds, and 3 elements in the permutation state).
We add one gadget for absorbing inputs.
We end up with 13 gadgets, and the following constraints:
q_pos_1 * P_pos1(X1, ..., X15) // compute rounds from 1 to 5
q_pos_2 * P_pos2(X1, ..., X15) // compute rounds from 6 to 10
...
q_pos_12 * P_pos12(X1, ..., X15) // compute rounds from 55 to 60
q_absorb * P_absorb(X1, ..., X15) // Computes X3 = X1 + X2, X6 = X4 + X5, simulating the absorbtion of two values (X5 and X2), that would be public inputs.
Another design would have been to have 15 "selectors" (like the q_c in vanilla PlonK), and it would be fixed at setup time.
Instead of having 15 selectors that every gadget could use, we go with the solutions that 13 selectors are available.
The current design of the Poseidon gadget is to have a single set of polynomials for 5 rounds, and the round constants are given as "public inputs". This design does not make sense, and the round constants should simply be constants in the polynomial.
We have something like:
By supposing we have 60 full rounds, I suggest to have the following design:
We end up with 13 gadgets, and the following constraints:
We would end up with the constraint:
The degree stays the same.
The text was updated successfully, but these errors were encountered: