Skip to content

refactor: utility methods #1259

@ivokub

Description

@ivokub

In #1258 I moved utility methods to internal packages as they seemed not to be useful outside of using gnark directly, but actually there were used downstream in zkevm-monorepo. Due to that, @Tabaie had to duplicate some of the functionality there.

But there are actually many utility methods used there which imo live better in gnark repository. I think we can add a github.com/consensys/gnark/utility package with the following subpackages etc:

  • algo_utils - sorting etc. used in GKR packages
  • circuit_utils - for utility methods which can be used inside the circuits (PLONK eval etc.)
  • witness_utils - for more convenient witness assignment which maps from *big.Int etc to frontend.Variable etc

We should also refactor the methods from the zkevm-monorepo which make sense.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions