This PR refactors the internals of snarky to expose a callback-oriented version of the functions constraint_system and generate_witness. As the core entrypoints used by pickles, this allows us to use these callbacks to handle async witness generation.
This PR is structured as a series of refactoring commits, plus a final commit that implements the new functions. Each refactoring is deliberately structured so that there is no behavioural change, except for a few small performance optimisations as a result of removing duplicated/redundant computations.
This PR refactors the internals of snarky to expose a callback-oriented version of the functions
constraint_system
andgenerate_witness
. As the core entrypoints used by pickles, this allows us to use these callbacks to handle async witness generation.This PR is structured as a series of refactoring commits, plus a final commit that implements the new functions. Each refactoring is deliberately structured so that there is no behavioural change, except for a few small performance optimisations as a result of removing duplicated/redundant computations.