# BitVM-ZKP-Verifier

The Zulu Network team has Open-Sourced the first ZKP Verify Code Implementation using Bitcoin Script! It involves mainstream algorithms such as Groth16/FFlonk, and we have submitted the code to the BitVM repository.&#x20;

Here are the links to our code:

* fflonk script

  * ​<https://github.com/BitVM/BitVM/pull/70>​

  ​
* Groth16's script
  * ​<https://github.com/BitVM/BitVM/pull/71>​
  * ​<https://github.com/zulu-network/bitvm-groth16-verifier>​

## **Importance of Snark Verifier Script**

Robin Linus, founder of BitVM, shared that the Snark Verifier script on Bitcoin is very important in BitVM2 ([https://bitvm.org/bitvm2](https://t.co/AnbVtpuxUW)).&#x20;

<figure><img src="/files/NUvZYDgRTMA1CdIptU4h" alt=""><figcaption></figcaption></figure>

He has also recently praised the efforts in development by the Zulu Network team: <https://x.com/robin_linus/status/1796206213077545079>

## Technical Implementation

{% hint style="success" %}
What is the size of the verifier for Groth16/Fflonk?&#x20;
{% endhint %}

> 1\. Fflonk Verifier:&#x20;
>
> Curve: BN254&#x20;
>
> Public input number: 2&#x20;
>
> Script size: 7456022084 bytes&#x20;
>
> Max stack items number: 905

> 2\. Groth16 Verifier:&#x20;
>
> Curve: BN254&#x20;
>
> Public input number: 1&#x20;
>
> Script size: 7034158970 bytes&#x20;
>
> Max stack items number: 1112 (Can be optimized)

Based on the current script size, we only need to split the entire ZKP script into fewer than 2,000 sub-scripts, which is remarkable. We are deeply grateful to all the contributors to the BitVM repository, including[@robin\_linus](https://x.com/robin_linus),[@weikengchen](https://x.com/weikengchen), and others.&#x20;

We also extend our thanks to Andrija Novakov from [@\_\_geometry\_\_](https://x.com/__geometry__)for their latest paper, "On Proving Pairings," [https://eprint.iacr.org/2024/640.pdf](https://t.co/RZKn2jlgti) which significantly reduces the overall script size.&#x20;

This achievement lays the foundation for constructing a decentralized bridge based on BitVM2. Zulu's next goal is to launch a trust-minimized Bitcoin bridge utilizing cross-chain technology and BitVM2.&#x20;

The snark verifier in the script on Bitcoin is a huge milestone for future Bitcoin developments, as BitVM creator[@robin\_linus](https://x.com/robin_linus) shared at ZK Proof 6 in Berlin.&#x20;

> Let's move Bitcoin forward!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zulunetwork.io/core-concepts/bitvm-zulu/bitvm-zkp-verifier.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
