Skip to content

Commit

Permalink
Merge branch 'main' into chore/op-steel-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Wollac authored Jan 31, 2025
2 parents 34dc356 + 94d6768 commit 64b0e66
Show file tree
Hide file tree
Showing 23 changed files with 925 additions and 146 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/steel-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Deploy Steel Documentation

on:
push:
tags:
- 'v[0-9]+.[0-9]+*' # matches v1.0, v1.1, v2.0, v2.1.0, etc.

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

env:
RISC0_TOOLCHAIN_VERSION: r0.1.81.0
RISC0_MONOREPO_REF: "main"

jobs:
build:
runs-on: ubuntu-latest
steps:
# This is a workaround from: https://github.com/actions/checkout/issues/590#issuecomment-970586842
- run: "git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :"
- uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v4

- uses: risc0/risc0/.github/actions/rustup@main
with:
toolchain: nightly-2024-09-04

- name: Build documentation
run: |
if ! cargo +nightly-2024-09-04 doc -p risc0-steel --all-features --no-deps; then
echo "Documentation build failed"
exit 1
fi
env:
RISC0_SKIP_BUILD: true
RISC0_SKIP_BUILD_KERNEL: true
RUSTDOCFLAGS: "--cfg docsrs -D warnings"

- name: Setup doc directory structure
run: |
cd target/doc || exit 1
# Create the risc0_steel directory first
mkdir -p risc0_steel
# Find all image references and create symlinks with proper relative paths
for img in $(find ../../crates -type f \( -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" -o -name "*.gif" -o -name "*.svg" \)); do
filename=$(basename $img)
# Create absolute path symlinks in root doc directory
ln -sf $(realpath $img) $filename
# Create relative path symlinks in risc0_steel directory
ln -sf $(realpath $img) risc0_steel/$filename
done
- name: Create index.html redirect
run: |
echo '<meta http-equiv="refresh" content="0; url=risc0_steel/index.html">' > target/doc/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: target/doc

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ tokio = { version = "1.35" }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
url = { version = "2.5" }
rand = "0.8"
rand = "0.9"
cfg-if = "1.0"
bytemuck = "1.21"
21 changes: 15 additions & 6 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
Release branches are initialized with a commit from `main`, and named `release-x.y` where `x.y` is the major and minor version.
Patch version changes are committed to the release branch matching their major and minor version.

2. Create two version bump PRs:
2. Make sure that the [Selector](./contracts/src/selector.rs) are up-to-date.
If any of the parameters affecting `Groth16ReceiptVerifierParameters` or the `SetInclusionReceiptVerifierParameters` changed, run this command and use the output to update them (this should be done for the main branch and only backport it if necessary):

> Before running, make sure the const `SET_BUILDER_ID` in the [selector::tests::print_verifier_parameters](./contracts/src/selector.rs) matches with what you are expecting.
>
> ```
> cargo test -F unstable -p risc0-ethereum-contracts -- selector::tests::print_verifier_parameters --exact --show-output
> ```
3. Create two version bump PRs:
* One PR should be to the `release-x.y` branch and do the following:
Expand Down Expand Up @@ -47,13 +56,13 @@
* `contracts/src/RiscZeroSetVerifier.sol`
* Update `crates/steel/CHANGELOG.md` to start a new section for the next release.
3. Tag the release as `vX.Y.Z`, and add release on GitHub.
4. Tag the release as `vX.Y.Z`, and add release on GitHub.
Also tag the release as `aggregation-v0.X.Y`, as long as `risc0-aggregation` is pre-1.0 and so on a different version than the rest of the crates.
Include a summary of the changes in the release notes.
4. Publish crates to `crates.io`
5. Publish crates to `crates.io`
Crates currently published to `crates.io` are:
Expand Down Expand Up @@ -81,7 +90,7 @@
See the [Cargo docs](https://doc.rust-lang.org/cargo/reference/publishing.html) for more details.

5. When changes have been made to the verifier contract, deploy a new verifier contract and add it to the verifier router on each supported chain.
6. When changes have been made to the verifier contract, deploy a new verifier contract and add it to the verifier router on each supported chain.

Refer to [contracts/script/README.md](./contracts/script/README.md) for instructions on the steps involved.

Expand Down Expand Up @@ -111,6 +120,6 @@

[https://dev.risczero.com/api/blockchain-integration/contracts/verifier](https://dev.risczero.com/api/blockchain-integration/contracts/verifier)

6. Open a PR to [risc0-foundry-template](https://github.com/risc0/risc0-foundry-template) updating the references in `Cargo.toml` and in the `lib/risc0` submodule to point to the new release branch.
7. Open a PR to [risc0-foundry-template](https://github.com/risc0/risc0-foundry-template) updating the references in `Cargo.toml` and in the `lib/risc0` submodule to point to the new release branch.

7. Update and test the `create-steel-app` script.
8. Update and test the `create-steel-app` script.
17 changes: 14 additions & 3 deletions contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ rustdoc-args = ["--cfg", "docsrs"]
anyhow = "1.0"

[dependencies]
alloy = { workspace = true, features = ["sol-types", "contract"] }
alloy = { workspace = true, features = ["contract"] }
alloy-primitives = { workspace = true, optional = true }
alloy-sol-types = { workspace = true }
anyhow = { workspace = true }
cfg-if = { workspace = true }
hex = { workspace = true, optional = true }
risc0-aggregation = { workspace = true, optional = true }
risc0-zkvm = { workspace = true }
serde = { workspace = true, optional = true }
thiserror = { workspace = true, features = ["default"] }
tracing = { workspace = true }

[dev-dependencies]
hex = "0.4"
hex = { workspace = true }
regex = "1.10"
tokio = { workspace = true, features = ["macros", "rt"] }

Expand All @@ -32,4 +37,10 @@ doctest = false

[features]
default = []
unstable = []
unstable = [
"dep:alloy-primitives",
"dep:hex",
"dep:risc0-aggregation",
"dep:serde",
"risc0-aggregation/verify"
]
2 changes: 1 addition & 1 deletion contracts/script/Manage.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ contract SetVerifierSelector is RiscZeroManagementScript {
///
/// See the Foundry documentation for more information about Solidity scripts.
/// https://book.getfoundry.sh/tutorials/solidity-scripting
contract DeployEstopVerifier is RiscZeroManagementScript {
contract DeployEstopGroth16Verifier is RiscZeroManagementScript {
function run() external withConfig {
string memory chainKey = vm.envString("CHAIN_KEY");
console2.log("chainKey:", chainKey);
Expand Down
Loading

0 comments on commit 64b0e66

Please sign in to comment.