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.
Let's add the verifier contracts for a new sp1-sdk
tag.
- Change the version tag in
Cargo.toml
to the targetsp1
version.
[dependencies]
sp1-sdk = "<SP1_TAG>"
- Update
contracts/src
with the new verifier contracts.
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)
This will download the circuit artifacts for the SP1 version, and write the verifier contracts to /contracts/src/{SP1_CIRCUIT_VERSION}
.
For users to use the contracts associated with a specific sp1-sdk
tag, we need to create a new release.
- Open a PR to add the changes to
main
. - After merging to
main
, create a release tag with the same version as thesp1
tag used (e.g2.0.0
). For release candidates (e.g.v3.0.0-rc4
), the release tag should be a pre-release tag. - 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.
The SP1 Solidity contract artifacts are included in each release of sp1
. You can see how these are included in the sp1
repository here.