barretenberg icon indicating copy to clipboard operation
barretenberg copied to clipboard

There's no way to get an ultrahonk verification key through `UltraHonkBackend`

Open TomAFrench opened this issue 9 months ago • 3 comments

Currently it's impossible to get the verification key for a circuit from the backend without directly using the cbinds. This requires the user to:

  1. Spin up another instance of barretenberg
  2. base64 decode and decompress their bytecode before passing it to acirWriteVkUltraHonk
  3. Know that they need to wrap the response in a RawBuffer and pass it to acirVkAsFieldsUltraHonk

What should be simple then requires copying out bb.js internals and multiple function calls.

TomAFrench avatar Apr 11 '25 17:04 TomAFrench

Does UltraHonkBackend::getVerificationKey not work for this purpose?

ledwards2225 avatar Apr 15 '25 18:04 ledwards2225

This returns a Uint8Array but in order to feed this into a circuit I need to get the verification key as fields. I don't know offhand how to decompose the binary representation into fields.

TomAFrench avatar Apr 15 '25 18:04 TomAFrench

generateProofForRecursiveAggregation() got removed in 13217. This method used to return proof and VK in fields which we were able to feed in to nargo.execute() of the recursive circuit IIRC.
I think we need to bring it back.

saleel avatar Apr 15 '25 18:04 saleel

@saleel Is this something you're able to support us on?

ledwards2225 avatar Jul 06 '25 15:07 ledwards2225