Skip to content

Commit

Permalink
feat: clean up documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Oct 16, 2024
1 parent a6f13bf commit f74b82c
Show file tree
Hide file tree
Showing 8 changed files with 2,058 additions and 70 deletions.
88 changes: 29 additions & 59 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ path = "src/bin/artifacts.rs"
anyhow = "1.0.86"
dotenv = "0.15.0"
log = "0.4.21"
sp1-sdk = "3.0.0-rc3"
sp1-sdk = "3.0.0-rc4"
24 changes: 20 additions & 4 deletions UPDATE_CONTRACTS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Update SP1 Contracts with New SP1 Version
# Add a new SP1 Version to `sp1-contracts`

This section outlines the steps required to update the SP1 contracts repository with a new SP1 version. Follow these instructions to ensure the SP1 contracts are correctly updated and aligned with the latest version.

## Add SP1 Verifier Contracts

Let's add the verifier contracts for a new `sp1-sdk` tag.

1. Change the version tag in `Cargo.toml` to the target `sp1` version.

```toml
Expand All @@ -15,11 +19,23 @@ sp1-sdk = "<SP1_TAG>"
cargo update

cargo run --bin artifacts --release

...

[sp1] plonk circuit artifacts for version v3.0.0-rc4 do not exist at /Users/ratankaliani/.sp1/circuits/plonk/v3.0.0-rc4. downloading...
⠦ [00:00:08] [#######>---------------------] 272.01 MiB/1.07 GiB (29.22 MiB/s, 28s)
```
3. Open a PR to commit the changes to `main`.
4. After merging to `main`, create a release tag with the same version as the `sp1` tag used.
This will download the circuit artifacts for the SP1 version, and write the verifier contracts to `/contracts/src/{SP1_CIRCUIT_VERSION}`.
## Create a new release
For users to use the contracts associated with a specific `sp1-sdk` tag, we need to create a new release.
1. Open a PR to add the changes to `main`.
2. After merging to `main`, create a release tag with the same version as the `sp1` tag used (e.g `2.0.0`). For release candidates (e.g. `v3.0.0-rc4`), the release tag should be a **pre-release** tag.
3. Now users will be able to install contracts for this version with `forge install succinctlabs/sp1-contracts@VERSION`. By default, `forge install` will install the latest release.
## Miscellaneous
## Appendix
The SP1 Solidity contract artifacts are included in each release of `sp1`. You can see how these are included in the `sp1` repository [here](https://github.com/succinctlabs/sp1/blob/21455d318ae383b317c92e10709bbfc313d8f1df/recursion/gnark-ffi/src/plonk_bn254.rs#L57-L96).
Loading

0 comments on commit f74b82c

Please sign in to comment.