Skip to content

Commit c74907a

Browse files
committed
doc: openvm install and setup kzg params
1 parent 1213f37 commit c74907a

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

README.md

+22-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The repository offers tools for the Security Council to run and validate certain operations against Scroll's ZkVM [release](https://github.com/scroll-tech/zkvm-prover/releases/tag/v0.2.0)
44

5-
### Setup
5+
## Setup
66

77
- Clone the `scroll-sc-tools` repository:
88
```shell
@@ -14,7 +14,7 @@ $ git clone [email protected]:scroll-tech/scroll-sc-tools.git && cd scroll-sc-tools
1414
rustup toolchain install nightly-2025-02-14
1515
```
1616

17-
### Generate Verifier
17+
## Generate Verifier
1818

1919
Scroll's ZkVM architecture proves Scroll's L2 blocks in layers (chunking -> batching -> bundling) where only the final layer (aka bundle) is an EVM-verifiable SNARK proof.
2020

@@ -24,11 +24,30 @@ The proof itself is verified by a `Verifier` contract, that's essentially a PLON
2424

2525
The `generate-verifier` command allows one to trustlessly re-generate the verifier contract and prints out its codehash, that can be validated against on-chain available data.
2626

27+
### Prerequisite
28+
29+
In order to generate the verifier contract, we also need to first get the appropriate KZG trusted setup parameters. To get them from OpenVM's setup step, we first need to install
30+
`openvm` and then go through the setup process.
31+
32+
* [Build and Install OpenVM](https://book.openvm.dev/getting-started/install.html#option-2-build-from-source) with [commit@3c35e9f](https://github.com/openvm-org/openvm/tree/3c35e9f369da8dee065a089fb72f3580af7dcaf9)
33+
* Validate `openvm` version
34+
```shell
35+
$ cargo openvm --version
36+
37+
# should print
38+
# cargo-openvm openvm (3c35e9f 2025-03-28T01:25:30.964028000Z)
39+
```
40+
* Setup KZG parameters (Note: requires ~200Gi memory and takes a long time to run)
41+
```shell
42+
$ cargo openvm setup
43+
```
44+
45+
Upon finishing the above prerequisite, please go ahead and generate the verifier contract:
2746
```shell
2847
$ cargo run -- generate-verifier
2948
```
3049

31-
### Compute Digests
50+
## Compute Digests
3251

3352
The final layer (aka bundle) circuit is identified by two digests, namely `digest_1` and `digest_2`.
3453

0 commit comments

Comments
 (0)