Skip to content

Commit

Permalink
feat: v1.0.1 (#1165)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam authored Jul 23, 2024
1 parent 6be0efa commit dd032eb
Show file tree
Hide file tree
Showing 72 changed files with 186 additions and 182 deletions.
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ updates:
directory: "/"
schedule:
interval: "weekly"
target-branch: "dev"
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check branch
if: github.head_ref != 'dev' && !startsWith(github.ref, 'release/') && !startsWith(github.ref, 'hotfix/')
if: github.head_ref != 'dev' && !startsWith(github.head_ref, 'release/') && !startsWith(github.head_ref, 'hotfix/')
run: |
echo "ERROR: You can only merge to main from dev, release/*, or hotfix/*."
exit 1
Expand Down
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exclude = ["examples/target"]
resolver = "2"

[workspace.package]
version = "1.0.0-rc.1"
version = "1.0.1"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/succinctlabs/sp1"
Expand All @@ -41,23 +41,23 @@ debug = true
debug-assertions = true

[workspace.dependencies]
sp1-build = { path = "build", version = "1.0.0-rc.1" }
sp1-derive = { path = "derive", version = "1.0.0-rc.1" }
sp1-core = { path = "core", version = "1.0.0-rc.1" }
sp1-cli = { path = "cli", version = "1.0.0-rc.1", default-features = false }
sp1-eval = { path = "eval", version = "1.0.0-rc.1", default-features = false }
sp1-helper = { path = "helper", version = "1.0.0-rc.1", default-features = false }
sp1-primitives = { path = "primitives", version = "1.0.0-rc.1" }
sp1-prover = { path = "prover", version = "1.0.0-rc.1" }
sp1-recursion-compiler = { path = "recursion/compiler", version = "1.0.0-rc.1" }
sp1-recursion-core = { path = "recursion/core", version = "1.0.0-rc.1", default-features = false }
sp1-recursion-derive = { path = "recursion/derive", version = "1.0.0-rc.1", default-features = false }
sp1-recursion-gnark-ffi = { path = "recursion/gnark-ffi", version = "1.0.0-rc.1", default-features = false }
sp1-recursion-program = { path = "recursion/program", version = "1.0.0-rc.1", default-features = false }
sp1-recursion-circuit = { path = "recursion/circuit", version = "1.0.0-rc.1", default-features = false }
sp1-sdk = { path = "sdk", version = "1.0.0-rc.1" }
sp1-lib = { path = "zkvm/lib", version = "1.0.0-rc.1", default-features = false }
sp1-zkvm = { path = "zkvm/entrypoint", version = "1.0.0-rc.1", default-features = false }
sp1-build = { path = "build", version = "1.0.1" }
sp1-derive = { path = "derive", version = "1.0.1" }
sp1-core = { path = "core", version = "1.0.1" }
sp1-cli = { path = "cli", version = "1.0.1", default-features = false }
sp1-eval = { path = "eval", version = "1.0.1", default-features = false }
sp1-helper = { path = "helper", version = "1.0.1", default-features = false }
sp1-primitives = { path = "primitives", version = "1.0.1" }
sp1-prover = { path = "prover", version = "1.0.1" }
sp1-recursion-compiler = { path = "recursion/compiler", version = "1.0.1" }
sp1-recursion-core = { path = "recursion/core", version = "1.0.1", default-features = false }
sp1-recursion-derive = { path = "recursion/derive", version = "1.0.1", default-features = false }
sp1-recursion-gnark-ffi = { path = "recursion/gnark-ffi", version = "1.0.1", default-features = false }
sp1-recursion-program = { path = "recursion/program", version = "1.0.1", default-features = false }
sp1-recursion-circuit = { path = "recursion/circuit", version = "1.0.1", default-features = false }
sp1-sdk = { path = "sdk", version = "1.0.1" }
sp1-lib = { path = "zkvm/lib", version = "1.0.1", default-features = false }
sp1-zkvm = { path = "zkvm/entrypoint", version = "1.0.1", default-features = false }
p3-air = "0.1.3-succinct"
p3-field = "0.1.3-succinct"
p3-commit = "0.1.3-succinct"
Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

[![Telegram Chat][tg-badge]][tg-url]


![](./assets/sp1.png)
![SP1](./assets/sp1.png)

SP1 is a performant, 100% open-source, contributor-friendly zero-knowledge virtual machine (zkVM) that can prove the execution of arbitrary Rust (or any LLVM-compiled language) programs. SP1 democratizes access to ZKPs by allowing developers to use programmable truth with popular programming languages.

Expand All @@ -18,9 +17,6 @@ SP1 is inspired by the open-source software movement and takes a collaborative a

## For Developers: Build with SP1

**Note that SP1 is still in alpha and is not yet ready for production use.**


Today, developers can write programs, including complex, large programs like a ZK Tendermint light client, in Rust (with std support), generate proofs and verify them. Most Rust crates should be supported and can be used seamlessly by your program. Example programs can be found in the [examples](https://github.com/succinctlabs/sp1/tree/main/examples) folder.

To get started, make sure you have [Rust](https://www.rust-lang.org/tools/install) installed. Then follow the [installation](https://succinctlabs.github.io/sp1/getting-started/install.html) guide in the SP1 book and read the [getting started](https://succinctlabs.github.io/sp1/getting-started/quickstart.html) section.
Expand All @@ -33,12 +29,14 @@ Open-source is a core part of SP1's ethos and key to its advantages. We wish to

Find a list of [good first issues](https://github.com/succinctlabs/sp1/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+) in the open issues of this repo. We are always looking for contributors interested in tasks big and small, including minor chores across the codebase, optimizing performance, adding precompiles for commonly used cryptographic operations, adding documentation, creating new example programs and more. Please reach out in the Telegram chat if interested!


## Roadmap

Today, SP1 can generate and verify proofs for Rust programs that have been compiled to RISC-V. SP1 supports proving of programs of arbitrary length by using a unique "shared challenges" argument that allows the prover to shard a long computation into small shards, and then generate a global proof that these shards are properly connected together.

The main priorities in the next few months are performance optimizations, getting the core zkVM constraint logic audited, as well as wrapping the SP1 STARK proof into a SNARK proof that is cheaply verifiable in the EVM (by adapting similar [previous work](https://github.com/succinctlabs/gnark-plonky2-verifier) done by the Succinct Team).
The main priorities in the next few months are performance optimizations, getting the core zkVM
constraint logic audited, as well as wrapping the SP1 STARK proof into a SNARK proof that is cheaply
verifiable in the EVM (by adapting similar [previous
work](https://github.com/succinctlabs/gnark-plonky2-verifier) done by the Succinct Team).

## Acknowledgements

Expand All @@ -48,6 +46,11 @@ We would like to acknowledge the projects below whose previous work has been ins
- [Valida](https://github.com/valida-xyz/valida): The SP1 cross-table lookup architecture, prover, borrow macro, and chip design are inspired by Valida.
- [RISC0](https://github.com/risc0/risc0): The SP1 Rust toolchain and install/build scripts for the toolchain borrow code from RISC0.

## Security

SP1 has undergone audits from [Veridise](https://www.veridise.com/), [Cantina](https://cantina.xyz/),
and [KALOS](https://kalos.xyz/). The audit reports are available [here](./audits).

## Tips

We recommend you install the [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) extension.
Expand Down
10 changes: 6 additions & 4 deletions book/developers/common-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ This is likely due to two different versions of `alloy_sol_types` being used. To

```toml
[dependencies]
sp1-sdk = { version = "0.1.0", default-features = false }
sp1-sdk = { version = "1.0.1", default-features = false }
```

This will configure out the `network` feature which will remove the dependency on `alloy_sol_types`
This will configure out the `network` feature which will remove the dependency on `alloy_sol_types`
and configure out the `NetworkProver`.


## Rust Version Errors

If you are using `alloy` or another library that has an MSRV (minimum support rust version) of 1.76.0
Expand Down Expand Up @@ -48,13 +47,16 @@ To fix this, you can:
```

## Stack Overflow Errors

If you encounter the following in a script using `sp1-sdk`:

```
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
```
```
Segmentation fault (core dumped)
```
Re-run your script with `--release`.
Re-run your script with `--release`.
2 changes: 1 addition & 1 deletion book/generating-proofs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RUSTFLAGS='-C target-cpu=native' cargo run --release
Currently there is support for AVX512 and NEON SIMD instructions. For NEON, you must also enable the `sp1-sdk` feature `neon` in your script crate's `Cargo.toml` file.

```toml
sp1-sdk = { git = "https://github.com/succinctlabs/sp1", features = ["neon"] }
sp1-sdk = { version = "1.0.1", features = ["neon"] }
```

## Performance
Expand Down
3 changes: 1 addition & 2 deletions book/generating-proofs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ cargo prove new <name>
cd script
```


## Manual

You can also manually setup a project. First create a new cargo project:
Expand All @@ -33,7 +32,7 @@ name = "script"
edition = "2021"
[dependencies]
sp1-sdk = { git = "https://github.com/succinctlabs/sp1.git" }
sp1-sdk = "1.0.1"
```

The `sp1-sdk` crate includes the necessary utilities to generate, save, and verify proofs.
8 changes: 4 additions & 4 deletions book/onchain-verification/contract-addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

When using SP1, we recommend using our deployed verifiers. Each contract is a [SP1VerifierGateway](https://github.com/succinctlabs/sp1-contracts/blob/main/contracts/src/ISP1VerifierGateway.sol) which can automatically routes your SP1 proof to the correct verifier based on the prover version.


| Chain ID | Chain | Gateway |
|----------|------------------|---------------------------------------------------------------------------------------------------------------------------------|
| -------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Mainnet | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://etherscan.io/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 11155111 | Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia.etherscan.io/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 17000 | Holesky | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://holesky.etherscan.io/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 42161 | Arbitrum One | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://arbiscan.io/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
Expand All @@ -14,7 +14,7 @@ When using SP1, we recommend using our deployed verifiers. Each contract is a [S
| 8453 | Base | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://basescan.org/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 84532 | Base Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia.basescan.org/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |

**Currently officially supported versions of SP1 are v1.0.7 and v1.0.8.** If you'd like official support for a verifier on a different chain, please ask in the [SP1 Telegram](https://t.me/succinct_sp1).
**Currently officially supported version of SP1 is v1.0.1.** If you'd like official support for a verifier on a different chain, please ask in the [SP1 Telegram](https://t.me/succinct_sp1).

## ISP1Verifier Interface

Expand All @@ -40,4 +40,4 @@ interface ISP1Verifier {
bytes calldata proofBytes
) external view;
}
```
```
4 changes: 1 addition & 3 deletions book/onchain-verification/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,5 @@ You can run the above script with `RUST_LOG=info cargo run --bin plonk_bn254 --r
If you would like to run the PLONK prover directly without Docker, you must have Go 1.22 installed and enable the `native-plonk` feature in `sp1-sdk`. This path is not recommended and may require additional native dependencies.

```toml
sp1-sdk = { features = ["native-plonk"] }
sp1-sdk = { version = "1.0.1", features = ["native-plonk"] }
```


3 changes: 2 additions & 1 deletion book/prover-network/setup.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prover Network: Setup

> **Currently, the supported version of SP1 on the prover network is `v1.0.5-testnet`.**
> **Currently, the supported version of SP1 on the prover network is `v1.0.1`.**
So far we've explored how to generate proofs locally, but this can actually be inconvenient on local machines due to high memory / CPU requirements, especially for very large programs.

Expand All @@ -16,6 +16,7 @@ Network. Completing this form requires you to complete the [key setup](#key-setu
The prover network uses Secp256k1 keypairs for authentication, similar to Ethereum wallets. You may generate a new keypair explicitly for use with the prover network, or use an existing keypair. **You do not need to hold any funds in this account, it is used solely for access control.**

### Generate a new keypair with `cast`

Prover network keypair credentials can be generated using the
[cast](https://book.getfoundry.sh/cast/) CLI tool.

Expand Down
2 changes: 1 addition & 1 deletion book/prover-network/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prover Network: Usage

> **Currently, the supported version of SP1 on the prover network is `v1.0.5-testnet`.**
> **Currently, the supported version of SP1 on the prover network is `v1.0.1`.**
## Sending a proof request

Expand Down
Loading

0 comments on commit dd032eb

Please sign in to comment.