-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
343e01d
commit 775b295
Showing
4 changed files
with
62 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Advanced | ||
|
||
When deploying OP Succinct in production, it's important to ensure that the SP1 programs used when generating proofs are reproducible. | ||
|
||
## Verify the OP Succinct binaries | ||
|
||
### Introduction | ||
|
||
There are two programs used in OP Succinct: | ||
- `range`: Proves the correctness of an OP Stack derivation + STF for a range of blocks. | ||
- `aggregation`: Aggregates multiple range proofs into a single proof. This is the proof that lands on-chain. The aggregation proof ensures that all `range` proofs in a given block range are linked and use the `rangeVkeyCommitment` from the `L2OutputOracleProxy` as the verification key. | ||
|
||
### Prerequisites | ||
|
||
To reproduce the OP Succinct program binaries, you first need to install the [cargo prove](https://docs.succinct.xyz/getting-started/install.html#option-1-prebuilt-binaries-recommended) toolchain. | ||
|
||
Ensure that you have the latest version of the toolchain by running: | ||
|
||
```bash | ||
sp1up | ||
``` | ||
|
||
Confirm that you have the toolchain installed by running: | ||
|
||
```bash | ||
cargo prove --version | ||
``` | ||
|
||
### Verify the SP1 binaries | ||
|
||
To build the SP1 binaries, first ensure that Docker is running. | ||
|
||
```bash | ||
docker ps | ||
``` | ||
|
||
Then build the binaries: | ||
|
||
```bash | ||
cd programs/range | ||
# Build the range-elf | ||
cargo prove build --elf range-elf --docker | ||
|
||
cd ../aggregation | ||
# Build the aggregation-elf | ||
cargo prove build --elf aggregation-elf --docker | ||
``` | ||
|
||
Now, verify the binaries by confirming the output of `vkey` matches the vkeys on the contract. The `vkey` program outputs the verification keys | ||
based on the ELFs in `/elf`. | ||
|
||
```bash | ||
cargo run --bin vkey --release | ||
``` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters