-
Notifications
You must be signed in to change notification settings - Fork 335
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
docs: update onchain usage #1652
Conversation
@@ -16,9 +16,28 @@ To verify SP1 proofs on-chain, we recommend using our deployed verifier gateways | |||
| 534351 | Scroll Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia.scrollscan.com/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) | | |||
| 534352 | Scroll | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://scrollscan.com/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) | | |||
|
|||
A complete reference for all of the SP1Verifier contract addresses can be also be found in the [SP1 Contracts Repo](https://github.com/succinctlabs/sp1-contracts/blob/main/contracts/deployments). | |||
A complete reference for all of the `SP1Verifier` contract addresses can be also be found in the [SP1 Contracts Repo](https://github.com/succinctlabs/sp1-contracts/blob/main/contracts/deployments). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We don't need to re-link here. IMO, we should have one source of truth (the SP1 docs) that holds all of this. We should remove this link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to have one source of truth, then we should just have the sp1-contracts deployments
dir and remove this table from the docs. The docs will always lag behind the deployments json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
though it seems most reasonable to have both and just link to the deployments as a backup in the worst case that a user needs more information (e.g. a specific SP1Verifier address)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, then you can say: "The most up-to-date reference for the specific versions supported on each chain can be found in the [deployments] on the SP1 contracts repository. On mainnets, only official versioned releases are supported.
We should always strive to keep the public-facing docs up to date. We can just make it a part of the deployment process as something that must be added. E.g. When you add a new chain, make a PR to add it to the SP1 docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok sg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Add new section:
Canonical Verifiers
Deploying to other chains
---Instructions---
If you want support for a canonical verifier on your chain, contact us [here]. We often deploy canonical verifiers on new chains if there's enough demand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
### Finding your program vkey | ||
|
||
The program vkey (`fibonacciProgramVKey` in the example above) is passed into the `ISP1Verifer` along with the public values and proof bytes. You | ||
can find your program vkey by going through the following steps: | ||
|
||
1. Find what version of SP1 crates you are using. | ||
2. Use the version from step to run this command: `sp1up --version <version>` | ||
3. Use the vkey command to get the program vkey: `cargo prove vkey -elf <path/to/elf>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cargo prove vkey
has issues where the SP1 version can be out of date: https://linear.app/succinct/issue/GRO-172/output-version-tag-from-cargo-prove-vkey. IMO, we should point users towards setting up a build script or give a Rust snippet here that shows them how to set up the vkey.
E.g.
const ELF = ...
client = ProverCLient::new()...
let (pk, vk) = client.setup(ELF);
let vk_bytes = vk.bytes32();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why step 1 exists, so that they ensure it matches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, still think that we should provide the two different ways that users can get the vkey.
Using sp1up --version <version>
should return an error message when the version requested does not have published artifacts, as it currently doesn't work for 3.0.0-rc1
and 3.0.0-rc2
, because we never published artifacts for those.
Related: https://linear.app/succinct/issue/GRO-222/sp1up-verison-version-error-message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On L40, we should link to docs.succinct.xyz/contract-addresses, rather than the deployments
JSON files, as the contract addresses table is more clear than chain id numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add two sub-sections in the getting started documnetation for getting the vkey
- Generate using
cargo prove
CLI - Using
sp1-sdk
Small nit on the docs in the contract addresses, otherwise LGTM.
Adds instructions for deploying to new chains, as well as finding your program vkey.