https://github.com/dutterbutter/min-sp1-precompiles
https://github.com/dutterbutter/min-sp1-precompiles
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dutterbutter/min-sp1-precompiles
- Owner: dutterbutter
- License: mit
- Created: 2025-02-08T01:08:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-08T03:18:02.000Z (over 1 year ago)
- Last Synced: 2025-02-08T04:19:42.599Z (over 1 year ago)
- Language: Rust
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# SP1 Project Template
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.
## Purpose
This project helps evaluate:
- The computational efficiency of using SP1’s patched precompiles (`tiny-keccak`).
## Requirements
- [Rust](https://rustup.rs/)
- [SP1 SDK](https://docs.succinct.xyz/getting-started/install.html)
## Running the Project
### Build the Program
```sh
cd program
cargo prove build
```
### Execute the Program
To run the program **without generating a proof**, use one of the following commands:
#### Run with **Patched SP1 tiny-keccak**:
```sh
RUST_LOG=info cargo run --release -- --execute --precompile
```
#### Run with **Non-patched (tiny-keccak)**:
```sh
RUST_LOG=info cargo run --release -- --execute --without-precompile
```
The output will display:
- The input message.
- The selected hash implementation (`precompile` or `without-precompile`).
- The computed Keccak256 hash.
- The total cycle count reported by the SP1 VM.
### Generate a Core Proof
To generate a proof for your program without using precompile:
```sh
cd script
cargo run --release -- --prove --without-precompile
```
To generate a proof for your program using precompile:
```sh
cd script
cargo run --release -- --prove --precompile
```
Observe `prover-core` cycles summary!