Skip to content

Commit

Permalink
Add the verifier contract address to docs for v0.10.0 (#1727)
Browse files Browse the repository at this point in the history
Add the verifier contract address to docs for v0.10.0
  • Loading branch information
nategraf committed May 1, 2024
1 parent 95fd72f commit 88697a5
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions website/api/blockchain-integration/contracts/verifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
To utilize the results generated by a [zkVM program][term-zkvm-program] in your application, it’s essential to [verify][term-verify] the receipt.
You can verify receipts with a call to a RISC Zero verifier contract.

- Every verifier contract implements the [`IRiscZeroVerifier` interface][IRiscZeroVerifier.sol], which defines the necessary data structures for the receipt and includes a `verify` method.
- This interface is implemented by the [`RiscZeroGroth16Verifier` contract][RiscZeroGroth16Verifier.sol], a stateless and immutable verifier designed for [RISC Zero Groth16 SNARK proofs][article-groth16].
- Every verifier contract implements the [`IRiscZeroVerifier` interface][IRiscZeroVerifier.sol@v0.10], which defines the necessary data structures for the receipt and includes a `verify` method.
- This interface is implemented by the [`RiscZeroGroth16Verifier` contract][RiscZeroGroth16Verifier.sol@v0.10], a stateless and immutable verifier designed for [RISC Zero Groth16 SNARK proofs][article-groth16].

Using the zkVM, any computation performed off-chain can be proven on-chain using a single verifier contract.
This simplifies system architecture and eliminates the need for multiple contracts for different circuits.
Expand All @@ -16,7 +16,7 @@ Even in the case of a system that needs to use custom circuits, it's possible to

Use verifier contract in your application by calling the `verify` method with the expected [journal][term-journal] and other fields of the [receipt][term-receipt].

Below is an example from the [EvenNumber.sol] contract in the [Foundry Template][foundry-template]:
Below is an example from the [EvenNumber.sol][EvenNumber.sol@v0.10] contract in the [Foundry Template][foundry-template]:

```solidity
contract EvenNumber {
Expand All @@ -40,7 +40,7 @@ RISC Zero's zkVM and the `IS_EVEN` program guarantee that it's computationally i

## Versioning

The [`RiscZeroGroth16Verifier`][sepolia-verifier] contract is stateless and immutable.
The [`RiscZeroGroth16Verifier`][RiscZeroGroth16Verifier.sol@v0.10] contract is stateless and immutable.
When new versions of the RISC Zero proof system are released, a new verifier contract will be deployed.

When using this contract directly you can be sure that the verifier will never change, as it cannot be upgraded or otherwise mutated.
Expand All @@ -54,20 +54,25 @@ We are working on process to provide opt-in upgradeability for the verifier cont
RISC Zero provides an already deployed verifier contract in the Sepolia network for your convenience.
You can choose to use this contract or deploy your own.

| Contract | Network | Address |
| ----------------------------- | --------- | -------------------------------------------------------------- |
| [RiscZeroGroth16Verifier.sol] | [Sepolia] | [0xe57255C10291771A2E14f7eb257555AE82D78302][sepolia-verifier] |
| Contract | Version | Network | Address |
| ---------------------------------------------------------------- | ---------------------------- | --------- | ---------------------------------------------------------------------- |
| [RiscZeroGroth16Verifier.sol][RiscZeroGroth16Verifier.sol@v0.9] | [v0.9.0][release-v0.9.0] | [Sepolia] | [0xe57255C10291771A2E14f7eb257555AE82D78302][sepolia-verifier-v0.9.0] |
| [RiscZeroGroth16Verifier.sol][RiscZeroGroth16Verifier.sol@v0.10] | [v0.10.0][release-v0.10.0] | [Sepolia] | [0x4e9559f1fdf82dd1babdd42b4550ffdb1a1c59de][sepolia-verifier-v0.10.0] |

[RiscZeroGroth16Verifier.sol]: https://github.com/risc0/risc0-ethereum/blob/release-0.8/contracts/src/groth16/RiscZeroGroth16Verifier.sol
[IRiscZeroVerifier.sol]: https://github.com/risc0/risc0-ethereum/blob/main/contracts/src/IRiscZeroVerifier.sol
[EvenNumber.sol]: https://github.com/risc0/bonsai-foundry-template/blob/main/contracts/EvenNumber.sol
[EvenNumber.sol@v0.10]: https://github.com/risc0/bonsai-foundry-template/blob/release-0.10/contracts/EvenNumber.sol
[IRiscZeroVerifier.sol@v0.10]: https://github.com/risc0/risc0-ethereum/blob/release-0.10/contracts/src/IRiscZeroVerifier.sol
[RiscZeroGroth16Verifier.sol@v0.10]: https://github.com/risc0/risc0-ethereum/blob/release-0.10/contracts/src/groth16/RiscZeroGroth16Verifier.sol
[RiscZeroGroth16Verifier.sol@v0.9]: https://github.com/risc0/risc0-ethereum/blob/release-0.9/contracts/src/groth16/RiscZeroGroth16Verifier.sol
[Sepolia]: https://ethereum.org/nb/developers/docs/networks#sepolia
[article-groth16]: https://www.risczero.com/news/on-chain-verification
[article-proof-composition]: https://www.risczero.com/news/proof-composition
[Sepolia]: https://ethereum.org/nb/developers/docs/networks#sepolia
[sepolia-verifier]: https://sepolia.etherscan.io/address/0xe57255C10291771A2E14f7eb257555AE82D78302#code
[release-v0.10.0]: https://github.com/risc0/risc0-ethereum/releases/tag/v0.10.0
[release-v0.9.0]: https://github.com/risc0/risc0-ethereum/releases/tag/v0.9.0
[foundry-template]: https://github.com/risc0/bonsai-foundry-template
[sepolia-verifier-v0.10.0]: https://sepolia.etherscan.io/address/0x4e9559f1fdf82dd1babdd42b4550ffdb1a1c59de#code
[sepolia-verifier-v0.9.0]: https://sepolia.etherscan.io/address/0xe57255C10291771A2E14f7eb257555AE82D78302#code
[term-image-id]: /terminology#image-id
[term-journal]: /terminology#journal
[term-receipt]: /terminology#receipt
[term-verify]: /terminology#verify
[term-image-id]: /terminology#image-id
[term-zkvm-program]: /terminology#zkvm-program
[foundry-template]: https://github.com/risc0/bonsai-foundry-template

0 comments on commit 88697a5

Please sign in to comment.