mina icon indicating copy to clipboard operation
mina copied to clipboard

`Pickles.compile` is accidentally async

Open L-as opened this issue 1 year ago • 0 comments

Pickles.compile returns before finishing compilation. This is evident by the "Snarky's internal state has been clobbered" error, which happens I assume due to multiple circuits that use the impure interface being evaluated at the same time.

The workaround we employ is

let (tag, _, _, _) as r = Pickles.compile ... in
let _ = Async.Thread_safe.block_on_async_exn (fun () -> Pickles.Side_loaded.Verification_key.of_compiled tag) in
r

This works for us fine but I assume it's a symptom of some deeper bug somewhere.

Our fork begins at 7935f89cbe0461c570c4fbc9b456b96885e2cff3, but I assume the issue hasn't been fixed on the latest version of compatible yet.

Credit: @MartinOndejka found the issue originally IIRC.

L-as avatar Oct 22 '24 10:10 L-as