o1-labs / snarky

OCaml DSL for verifiable computation
MIT License
496 stars 74 forks source link

add asm function #672

Closed mimoo closed 2 years ago

mimoo commented 2 years ago

this exposes the ASM functionality of kimchi added in https://github.com/o1-labs/proof-systems/pull/831

See https://github.com/MinaProtocol/mina/pull/12125 to see how it's used in tests

mimoo commented 2 years ago

my understanding was that I can't use it from plonk_constraint_system if I don't expose it in the back end interface, because I won't be able to call it. But maybe I'm wrong, I'll have to check your way.

EDIT: Thinking more about it, it sounds doable. The same should have been done with digest as well no?

mrmr1993 commented 2 years ago

The same should have been done with digest as well no?

Yes please. It would be good to delete the whole constraint system interface from the output of Make.

mimoo commented 2 years ago

Actually, I thought a bit more about it, and if we want to replace snarky with snarky-rs, then any functionalities exposed by plonk_constraint_system should be exposed by snarky instead. I think it's a good idea to remove that Constraint_system interface, but the functions should be moved to the normal API of snarky.

mrmr1993 commented 2 years ago

Not sure I agree. Snarky-rs will run a circuit to create a constraint system, just like snarky does. The methods that the constraint system exposes are completely unrelated to snarky, it's just responsible for creating it.

mimoo commented 2 years ago

sg, closing!