Poseidon252 icon indicating copy to clipboard operation
Poseidon252 copied to clipboard

Use `component_boolean` in the our merkle opening circuit

Open moCello opened this issue 2 years ago • 0 comments

Describe what you want implemented Use component_boolean to check for the index bits in our merkle opening circuit.

Describe "Why" this is needed Reduce gate count.

Describe alternatives you've considered N/A

Additional context Originally posted by @vlopes11 in https://github.com/dusk-network/Poseidon252/pull/182#discussion_r974735025: The original purpose of this block was to validate that we have only zeroes/ones, and that we have one, and only one 1; the rest being 0.

It was written before we had component_boolean available, which now completely supersede this implementation. What we need is to run the boolean component for every of these bits (so we guarantee they are either 0 or 1, and check that they add to 1 (so we guarantee that we have one, and only one 1).

moCello avatar Sep 21 '22 08:09 moCello