Skip to content

feat: KZG gadget options #1568

@ivokub

Description

@ivokub

In #1567 I fixed an edge case for CheckOpeningProof to allow for all inputs. However, we should handle it more carefully in the whole KZG gadget, but this requires adding regression tests, understanding where we need complete formulas etc.

We should also consider that when PLONK sets WithCompleteArithmetic option, then we should set the KZG option to use complete arithmetic. But I think we should be more careful with setting the options not to blow up the constraint sizes. I think it would be better for PLONK side to have options a la:

  • WithAllowZeroWitness
  • WithAllowZeroSelector (in case for PLONK circuits where selectors are all zeros)
    and depending on that we use complete arithmetic where necessary.

We also need to check how this option would affects Linea BW6-in-BN254 recursion, I recall we were quite at 2-adicity limit. But there KZG verification works well right now as we don't hit edge cases (complex inner circuit and non-zero witness).

I'm attaching some starting point for the work in the future

kzg-opts.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't workingtype: consolidatestrengthen an existing feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions