Skip to content

Commit

Permalink
Final updates and update version to 1.0.0 (#138)
Browse files Browse the repository at this point in the history
This PR applies final updates to the release branch for the 1.0.0
release.
* Cherry pick #129
* Cherry pick #131
* Remove or soften warnings, as is also done by
#139 on `main`

This PR bumps the version of all crates in this repo, except
`risc0-steel`, to 1.0.0.

---------

Co-authored-by: Wolfgang Welz <welzwo@gmail.com>
Co-authored-by: Angelo Capossele <angelocapossele@gmail.com>
  • Loading branch information
3 people authored Jun 5, 2024
1 parent b96ab6f commit 5fbbc7c
Show file tree
Hide file tree
Showing 34 changed files with 519 additions and 485 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/bonsai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ permissions:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RISC0_TOOLCHAIN_VERSION: v2024-04-22.0
RISC0_MONOREPO_REF: "v1.0.0-rc.7"
RISC0_MONOREPO_REF: "release-1.0"

jobs:
e2e-test:
Expand All @@ -30,8 +30,8 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: risc0/risc0/.github/actions/rustup@v1.0.0-rc.7
- uses: risc0/risc0/.github/actions/sccache@v1.0.0-rc.7
- uses: risc0/risc0/.github/actions/rustup@release-1.0
- uses: risc0/risc0/.github/actions/sccache@release-1.0
with:
key: Linux-default
- uses: risc0/foundry-toolchain@2fe7e70b520f62368a0e3c464f997df07ede420f
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RISC0_TOOLCHAIN_VERSION: v2024-04-22.0
RISC0_MONOREPO_REF: "v1.0.0-rc.7"
RISC0_MONOREPO_REF: "release-1.0"

jobs:
# see: https://github.com/orgs/community/discussions/26822
Expand All @@ -45,7 +45,7 @@ jobs:
# Full history is required by license-check.py
fetch-depth: 0
submodules: recursive
- uses: risc0/risc0/.github/actions/rustup@v1.0.0-rc.7
- uses: risc0/risc0/.github/actions/rustup@release-1.0
- name: Install cargo-sort
uses: risc0/cargo-install@b9307573043522ab0d3e3be64a51763b765b52a4
with:
Expand Down Expand Up @@ -93,9 +93,9 @@ jobs:
with:
submodules: recursive
- if: matrix.feature == 'cuda'
uses: risc0/risc0/.github/actions/cuda@v1.0.0-rc.7
- uses: risc0/risc0/.github/actions/rustup@v1.0.0-rc.7
- uses: risc0/risc0/.github/actions/sccache@v1.0.0-rc.7
uses: risc0/risc0/.github/actions/cuda@release-1.0
- uses: risc0/risc0/.github/actions/rustup@release-1.0
- uses: risc0/risc0/.github/actions/sccache@release-1.0
with:
key: ${{ matrix.os }}-${{ matrix.feature }}
- uses: ./.github/actions/cargo-risczero-install
Expand Down Expand Up @@ -134,9 +134,9 @@ jobs:
with:
submodules: recursive
- if: matrix.feature == 'cuda'
uses: risc0/risc0/.github/actions/cuda@v1.0.0-rc.7
- uses: risc0/risc0/.github/actions/rustup@v1.0.0-rc.7
- uses: risc0/risc0/.github/actions/sccache@v1.0.0-rc.7
uses: risc0/risc0/.github/actions/cuda@release-1.0
- uses: risc0/risc0/.github/actions/rustup@release-1.0
- uses: risc0/risc0/.github/actions/sccache@release-1.0
with:
key: ${{ matrix.os }}-${{ matrix.feature }}
- uses: risc0/foundry-toolchain@2fe7e70b520f62368a0e3c464f997df07ede420f
Expand Down Expand Up @@ -167,8 +167,8 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: risc0/risc0/.github/actions/rustup@v1.0.0-rc.7
- uses: risc0/risc0/.github/actions/sccache@v1.0.0-rc.7
- uses: risc0/risc0/.github/actions/rustup@release-1.0
- uses: risc0/risc0/.github/actions/sccache@release-1.0
with:
key: macOS-default
- uses: risc0/foundry-toolchain@2fe7e70b520f62368a0e3c464f997df07ede420f
Expand Down
46 changes: 23 additions & 23 deletions Cargo.lock

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

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ resolver = "2"
members = ["build", "contracts", "ffi", "steel"]

[workspace.package]
version = "1.0.0-rc.7"
version = "1.0.0"
edition = "2021"
license = "Apache-2.0"
homepage = "https://risczero.com/"
repository = "https://github.com/risc0/risc0-ethereum/"

[workspace.dependencies]
# Intra-workspace dependencies
risc0-build-ethereum = { version = "1.0.0-rc.7", default-features = false, path = "build" }
risc0-ethereum-contracts = { version = "1.0.0-rc.7", default-features = false, path = "contracts" }
risc0-build-ethereum = { version = "1.0.0", default-features = false, path = "build" }
risc0-ethereum-contracts = { version = "1.0.0", default-features = false, path = "contracts" }
risc0-steel = { version = "0.11.0", default-features = false, path = "steel" }
risc0-forge-ffi = { version = "1.0.0-rc.7", default-features = false, path = "ffi" }
risc0-forge-ffi = { version = "1.0.0", default-features = false, path = "ffi" }

# risc0 monorepo dependencies.
risc0-build = { version = "1.0.0-rc.7", default-features = false }
risc0-zkp = { version = "1.0.0-rc.7", default-features = false }
risc0-zkvm = { version = "1.0.0-rc.7", default-features = false }
risc0-build = { version = "1.0", default-features = false }
risc0-zkp = { version = "1.0", default-features = false }
risc0-zkvm = { version = "1.0", default-features = false }

alloy-primitives = { version = "0.7", features = ["serde", "rlp", "std"] }
alloy-rlp = { version = "0.3.4", default-features = false }
Expand Down
34 changes: 34 additions & 0 deletions contracts/src/steel/Steel.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright 2024 RISC Zero, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.9;

/// @title Steel Library
/// @notice This library provides a collection of utilities to work with Steel commitments in Solidity.
library Steel {
/// @notice A Commitment struct representing a block number and its block hash.
struct Commitment {
uint256 blockNumber; // Block number at which the commitment was made.
bytes32 blockHash; // Hash of the block at the specified block number.
}

/// @notice Validates if the provided Commitment matches the block hash of the given block number.
/// @param commitment The Commitment struct to validate.
/// @return isValid True if the commitment's block hash matches the block hash of the block number, false otherwise.
function validateCommitment(Commitment memory commitment) internal view returns (bool isValid) {
return commitment.blockHash == blockhash(commitment.blockNumber);
}
}
Loading

0 comments on commit 5fbbc7c

Please sign in to comment.