Skip to content

Commit

Permalink
WEB3-66: Add version string to RiscZeroGroth16Verifier.sol (#187)
Browse files Browse the repository at this point in the history
In order to make it easier to determine which version a given verifier
contract is, this PR adds a semantic version string.

Note that this does mean an additional step in the release process. I
couldn't think of a way to make this automatic.
  • Loading branch information
nategraf authored Aug 7, 2024
1 parent b2dcc8e commit 959f0c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

<!-- TODO: Write a script (e.g. in Python) to automate as many of these steps as possible. -->
* Bump the version of all crates in the workspace to `x.y.z`. Workspace crate versions are specified in `./Cargo.toml`.
* Update the version string in contracts that contain it:
* `contracts/src/groth16/RiscZeroGroth16Verifier.sol`
* Remove the note at the top of `README.md` about being on the `main` branch.
* Update `risc0` crate dependencies. In all workspaces:
> You can find the workspaces with `grep -R '\[workspace\]' --include Cargo.toml -l .`
Expand All @@ -19,7 +21,10 @@
* Run `cargo update`.
* Remove `Cargo.lock` from `.gitignore` and commit all lock files.

* The other PR should bump the version on the `main` branch to the next, unreleased, minor version `x.y+1.0-alpha.1`.
* The other PR should:
* Bump the version on the `main` branch to the next, unreleased, minor version `x.y+1.0-alpha.1`.
* Update the version string in contracts that contain it:
* `contracts/src/groth16/RiscZeroGroth16Verifier.sol`

3. Tag the release as `vX.Y.Z`, and add release on GitHub.

Expand Down
3 changes: 3 additions & 0 deletions contracts/src/groth16/RiscZeroGroth16Verifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ contract RiscZeroGroth16Verifier is IRiscZeroVerifier, Groth16Verifier {
using OutputLib for Output;
using SafeCast for uint256;

/// Semantic version of the the RISC Zero system of which this contract is part.
string constant VERSION = "1.1.0-alpha.1";

/// @notice Control root hash binding the set of circuits in the RISC Zero system.
/// @dev This value controls what set of recursion programs (e.g. lift, join, resolve), and
/// therefore what version of the zkVM circuit, will be accepted by this contract. Each
Expand Down

0 comments on commit 959f0c2

Please sign in to comment.