Description
Currently all the instances of a GKR sub-circuit have to be defined at once. This can be cumbersome since it gives the user access to the output variables only after they are all defined. For example, if the user is defining hash permutations, the results of which are needed right away, they would have to independently define a hint that computes the output, and later equate that with the Export
ed values from the gkr API.
Instead it is desirable for the user to be able to define the whole circuit (by allowing the Import
function to take no arguments, or better yet renaming it to NewVariable
). And then having a function called NewInstance/NewInstances
that takes assignments or dependencies for the input values and returns assignments for output variables.
The complexity in this will be that the GKR Solve
hint would have to be called multiple times (for every invocation of Export
or NewInstance
).