Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate book from dev repo #1915

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions book/docs/developers/common-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you are using a library that has an MSRV specified, you may encounter an erro
package `alloy v0.1.1 cannot be built because it requires rustc 1.76 or newer, while the currently active rustc version is 1.75.0-nightly`
```

This is due to the fact that your current Succinct Rust toolchain has been built with a lower version than the MSRV of the crates you are using.
This is due to the fact that your current Succinct Rust toolchain has been built with a lower version than the MSRV of the crates you are using.

You can check the version of your local Succinct Rust toolchain by running `cargo +succinct --version`. The latest release of the Succinct Rust toolchain is **1.81**. You can update to the latest version by running [`sp1up`](../getting-started/install.md).

Expand Down Expand Up @@ -51,7 +51,7 @@ This is likely due to two different versions of `alloy_sol_types` being used. To

```toml
[dependencies]
sp1-sdk = { version = "3.0.0", default-features = false }
sp1-sdk = { version = "4.0.0-rc.8", default-features = false }
```

This will configure out the `network` feature which will remove the dependency on `alloy_sol_types` and configure out the `NetworkProver`.
Expand Down
2 changes: 2 additions & 0 deletions book/docs/developers/rv32im-deviations.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ deviations are outlined below:
- LW/SW memory access must be word aligned.
- LH/LHU/SH memory access must be half-word aligned.
- The ECALL instruction is used for system calls and precompiles. Only valid syscall IDs should be called, and only using the specific convention of loading the ID into register T0 and arguments into registers A0 and A1. If the arguments are addresses, they must be word-aligned. Failure to follow this convention can result in undefined behavior. Correct usages can be found in the `sp1_zkvm` and `sp1_lib` crates.
- The instructions FENCE, WFI, MRET, and CSR related instructions will be categorized as not implemented,
and hence not allowed by the SP1 zkvm.

## Security Considerations

Expand Down
8 changes: 0 additions & 8 deletions book/docs/developers/rv32im-specification.md

This file was deleted.

2 changes: 1 addition & 1 deletion book/docs/generating-proofs/advanced.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,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 = { version = "3.0.0", features = ["neon"] }
sp1-sdk = { version = "...", features = ["neon"] }
```

## Performance
Expand Down
2 changes: 1 addition & 1 deletion book/docs/generating-proofs/proof-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The trusted setup for the Groth16 circuit keys uses the [Aztec Ignition ceremony

```rust,noplayground
let client = ProverClient::from_env();
client.prove(&pk, stdin).groth16().run().unwrap();
client.prove(&pk, &stdin).groth16().run().unwrap();
```

## PLONK
Expand Down
11 changes: 6 additions & 5 deletions book/docs/generating-proofs/prover-network/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

The prover network currently only supports specific versions of SP1:

| Version | Description |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| v3.X.X | V3 Release. Latest performant & production ready version. |
| Version | Description |
| ------- | ---------------------------------------------------------------- |
| v4.X.X | V4 Release. Latest performant & production ready version. |
| v3.X.X | V3 Release. Previous circuit version deprecated in January 2025. |

`X` denotes that any minor and patch version is supported (e.g. `v2.1.0`, `v2.1.1`).

Expand All @@ -16,14 +17,14 @@ You must switch to a supported version before submitting a proof. To do so, repl

```toml
[dependencies]
sp1-zkvm = "3.0.0"
sp1-zkvm = "4.0.0-rc.8"
```

replace the `sp1-sdk` version in your script's `Cargo.toml`:

```toml
[dependencies]
sp1-sdk = "3.0.0"
sp1-sdk = "4.0.0-rc.8"
```

Re-build your program and script, and then try again.
2 changes: 1 addition & 1 deletion book/docs/generating-proofs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ name = "script"
edition = "2021"

[dependencies]
sp1-sdk = "3.0.0"
sp1-sdk = "4.0.0-rc.8"
```

The `sp1-sdk` crate includes the necessary utilities to generate, save, and verify proofs.
2 changes: 1 addition & 1 deletion book/docs/getting-started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ git clone [email protected]:succinctlabs/sp1.git
cd sp1
cd crates
cd cli
cargo install --locked --path .
cargo install --locked --force --path .
cd ~
cargo prove build-toolchain
```
Expand Down
4 changes: 2 additions & 2 deletions book/docs/verification/off-chain-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ the [Groth16 Example](https://github.com/succinctlabs/sp1/tree/main/examples/gro
Import the following dependency in your `Cargo.toml`:

```toml
sp1-verifier = {version = "3.0.0", default-features = false}
sp1-verifier = {version = "4.0.0-rc.8", default-features = false}
```

### Usage
Expand All @@ -40,7 +40,7 @@ Here, the proof, public inputs, and vkey hash are read from stdin. See the follo

<ProgramScript />

> Note that the SP1 SDK itself is *not* `no_std` compatible.
> Note that the SP1 SDK itself is _not_ `no_std` compatible.

## Wasm Verification

Expand Down
58 changes: 29 additions & 29 deletions book/docs/verification/onchain/contract-addresses.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contract Addresses

> The current officially supported version of SP1 is **V3.0.0**.
> The current officially supported version of SP1 is **V4.0.0**.
>
> All previous versions are deprecated and may not work as expected on the gateways.

Expand All @@ -15,35 +15,35 @@ must use the correct verifier gateway depending on if you are verifying a Groth1

### Groth16

| Chain ID | Chain | Gateway |
| -------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Mainnet | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 11155111 | Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 17000 | Holesky | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://holesky.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 42161 | Arbitrum One | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://arbiscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 421614 | Arbitrum Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.arbiscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 8453 | Base | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://basescan.org/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 84532 | Base Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.basescan.org/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 10 | Optimism | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://optimistic.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 11155420 | Optimism Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia-optimism.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 534351 | Scroll Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.scrollscan.com/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 534352 | Scroll | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://scrollscan.com/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| Chain ID | Chain | Gateway |
| -------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Mainnet | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 11155111 | Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 17000 | Holesky | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://holesky.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 42161 | Arbitrum One | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://arbiscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 421614 | Arbitrum Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.arbiscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 8453 | Base | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://basescan.org/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 84532 | Base Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.basescan.org/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 10 | Optimism | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://optimistic.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 11155420 | Optimism Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia-optimism.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 534351 | Scroll Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.scrollscan.com/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |
| 534352 | Scroll | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://scrollscan.com/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) |

### PLONK

| 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) |
| 421614 | Arbitrum Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia.arbiscan.io/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 8453 | Base | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://basescan.org/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 84532 | Base Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia.basescan.org/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 10 | Optimism | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://optimistic.etherscan.io/address/0x3b6041173b80e77f038f3f2c0f9744f04837185e) |
| 11155420 | Optimism Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia-optimism.etherscan.io/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 534351 | Scroll Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia.scrollscan.com/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 534352 | Scroll | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://scrollscan.com/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 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) |
| 421614 | Arbitrum Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia.arbiscan.io/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 8453 | Base | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://basescan.org/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 84532 | Base Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia.basescan.org/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 10 | Optimism | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://optimistic.etherscan.io/address/0x3b6041173b80e77f038f3f2c0f9744f04837185e) |
| 11155420 | Optimism Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia-optimism.etherscan.io/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 534351 | Scroll Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia.scrollscan.com/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |
| 534352 | Scroll | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://scrollscan.com/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) |

The most up-to-date reference on each chain can be found in the
[deployments](https://github.com/succinctlabs/sp1-contracts/blob/main/contracts/deployments)
Expand All @@ -70,9 +70,9 @@ verifier contract by following the instructions in the
Since both the `SP1VerifierGateway` and each `SP1Verifier` implement the [ISP1Verifier
interface](https://github.com/succinctlabs/sp1-contracts/blob/main/contracts/src/ISP1Verifier.sol), you can choose to either:

* Deploy the `SP1VerifierGateway` and add `SP1Verifier` contracts to it. Then point to the
- Deploy the `SP1VerifierGateway` and add `SP1Verifier` contracts to it. Then point to the
`SP1VerifierGateway` address in your contracts.
* Deploy just the `SP1Verifier` contract that you want to use. Then point to the `SP1Verifier`
- Deploy just the `SP1Verifier` contract that you want to use. Then point to the `SP1Verifier`
address in
your contracts.

Expand Down
2 changes: 1 addition & 1 deletion book/docs/writing-programs/compiling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The path passed in to `build_program` should point to the directory containing t

```toml
[build-dependencies]
sp1-build = "3.0.0"
sp1-build = "4.0.0-rc.8"
```

You will see output like the following from the build script if the program has changed, indicating that the program was rebuilt:
Expand Down
4 changes: 2 additions & 2 deletions book/docs/writing-programs/cycle-tracking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Note that to use the macro, you must add the `sp1-derive` crate to your dependen

```toml
[dependencies]
sp1-derive = "3.0.0"
sp1-derive = "4.0.0-rc.8"
```

In the script for proof generation, setup the logger with `utils::setup_logger()` and run the script with `RUST_LOG=info cargo run --release`. You should see the following output:
Expand Down Expand Up @@ -79,7 +79,7 @@ Once you have your script it should look like the following:
As well you must enable the profiling feature on the SDK:

```toml
sp1-sdk = { version = "3.0.0", features = ["profiling"] }
sp1-sdk = { version = "4.0.0-rc.8", features = ["profiling"] }
```

The `TRACE_FILE` env var tells the executor where to save the profile, and the `TRACE_SAMPLE_RATE` env var tells the executor how often to sample the program.
Expand Down
Loading
Loading