This repository has been archived by the owner on Feb 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
1 changed file
with
5 additions
and
91 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,6 @@ | ||
# SP1 Project Template | ||
# Blevm | ||
Prove evm execution of an EVM block corresponds to a Celestia blob commitment | ||
|
||
This is a template for creating an end-to-end [SP1](https://github.com/succinctlabs/sp1) project | ||
that can generate a proof of any RISC-V program. | ||
|
||
## Requirements | ||
|
||
- [Rust](https://rustup.rs/) | ||
- [SP1](https://docs.succinct.xyz/getting-started/install.html) | ||
|
||
## Running the Project | ||
|
||
There are four main ways to run this project: build a program, execute a program, generate a core proof, and | ||
generate an EVM-compatible proof. | ||
|
||
### Build the Program | ||
|
||
To build the program, run the following command: | ||
|
||
```sh | ||
cd program | ||
cargo prove build | ||
``` | ||
|
||
### Execute the Program | ||
|
||
To run the program without generating a proof: | ||
|
||
```sh | ||
cd script | ||
cargo run --release -- --execute | ||
``` | ||
|
||
This will execute the program and display the output. | ||
|
||
### Generate a Core Proof | ||
|
||
To generate a core proof for your program: | ||
|
||
```sh | ||
cd script | ||
cargo run --release -- --prove | ||
``` | ||
|
||
### Generate an EVM-Compatible Proof | ||
|
||
> [!WARNING] | ||
> You will need at least 128GB RAM to generate a Groth16 or PLONK proof. | ||
To generate a proof that is small enough to be verified on-chain and verifiable by the EVM: | ||
|
||
```sh | ||
cd script | ||
cargo run --release --bin evm -- --system groth16 | ||
``` | ||
|
||
this will generate a Groth16 proof. If you want to generate a PLONK proof, run the following command: | ||
|
||
```sh | ||
cargo run --release --bin evm -- --system plonk | ||
``` | ||
|
||
These commands will also generate fixtures that can be used to test the verification of SP1 zkVM proofs | ||
inside Solidity. | ||
|
||
### Retrieve the Verification Key | ||
|
||
To retrieve your `programVKey` for your on-chain contract, run the following command: | ||
|
||
```sh | ||
cargo prove vkey --program fibonacci-program | ||
``` | ||
|
||
## Using the Prover Network | ||
|
||
We highly recommend using the Succinct prover network for any non-trivial programs or benchmarking purposes. For more information, see the [setup guide](https://docs.succinct.xyz/generating-proofs/prover-network.html). | ||
|
||
To get started, copy the example environment file: | ||
|
||
```sh | ||
cp .env.example .env | ||
``` | ||
|
||
Then, set the `SP1_PROVER` environment variable to `network` and set the `SP1_PRIVATE_KEY` | ||
environment variable to your whitelisted private key. | ||
|
||
For example, to generate an EVM-compatible proof using the prover network, run the following | ||
command: | ||
|
||
```sh | ||
SP1_PROVER=network SP1_PRIVATE_KEY=... cargo run --release --bin evm | ||
``` | ||
## ToDo: | ||
[ ] benchmark cycles | ||
[ ] inclusion proofs |