Skip to main content

Submit a Noir Ultraplonk Proof

In this tutorial, we will walk through the process of submitting a Ultraplonk proof generated by Noir.

Note: Recursive proofs are not supported.

Requirements

Before starting, ensure you have the noir-cli tool installed.

  git clone https://github.com/zkVerify/ultraplonk_verifier
cargo install --features bins --path .

Generate a Ultraplonk proof with Noir toolchain

Please, follow the official Noir documentation to generate a sample proof. At the end of the process you should have two binary files generated by bb, namely the proof and vk.

Convert proof and vk into zkVerify format

After you obtain the proof and vk from bb (let's call them bb_proof, and bb_vk, respectively), you should convert them using noir-cli.

Let's start from the proof (which also contains public inputs). Run the command

noir-cli proof-data -n <num_public_inputs> --input-proof <bb_proof path> --output-proof <zkv_proof path> --output-pubs <zkv_pubs path>

This command will provide the zkv_proof and zkv_pubs files in binary format. Also the hexadecimal files zkv_proof.hex, and zkv_pubs.hexare generated, for ease of submission to zkVerify.

Then, we convert the vk by running the command

noir-cli key --input <bb_vk path> --output <zkv_vk path>

Also in this case, you should get the zkv_vk, and zkv_vk.hex files.

To make sure that everything works correctly, run the noir-cli verify command by providing the vk, proof, and pubs in binary format:

noir-cli verify --key <zkv_vk path> --proof <zkv_proof path> --pubs <zkv_pubs path>

Submitting the Proof

  1. Head to polkadot.js.org frontend

  2. Select your account (you must have some tVFY).

  3. Choose the settlementUltraplonkPallet, and the submitProof extrinsic.

  4. Inside the field vkOrHash select Vk

  5. Fill in all the required fields by copy-pasting them from the hex files obtained in the previous step. You will need to fill the Vk, proof and public inputs. If you have more than one public inputs, you can click on the Add Item option to add more public inputs.

  6. Enter the Domain ID corresponding to the domain you want to aggregate the proof for. Think of the Domain ID as the target chain for aggregation. You can find a list of available domains here.

  7. Click on the submitTransaction button.

Submit Proof

Check your transaction on the zkVerify Block Explorer!