Skip to content
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

Cherry-pick #343 #348 and #345 to release-1.2 #349

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/cargo-risczero-install/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ runs:
ref: ${{ inputs.ref }}
lfs: true
- name: install cargo-risczero
run: cargo install --path risc0/cargo-risczero --no-default-features --features "${{ inputs.features }}"
run: cargo install --locked --path risc0/cargo-risczero --no-default-features --features "${{ inputs.features }}"
working-directory: tmp/risc0
shell: bash
- name: install r0vm
run: cargo install --bin r0vm --path risc0/cargo-risczero --features "${{ inputs.features }}"
run: cargo install --locked --bin r0vm --path risc0/cargo-risczero --features "${{ inputs.features }}"
shell: bash
working-directory: tmp/risc0
- name: install toolchains
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- uses: risc0/risc0/.github/actions/sccache@main
with:
key: ${{ matrix.os }}-${{ matrix.feature }}
- uses: risc0/foundry-toolchain@2fe7e70b520f62368a0e3c464f997df07ede420f
- uses: foundry-rs/foundry-toolchain@v1
- uses: ./.github/actions/cargo-risczero-install
with:
ref: ${{ env.RISC0_MONOREPO_REF }}
Expand All @@ -82,7 +82,7 @@ jobs:
shell: bash
- name: Start local Ethereum testnet
run: |
kurtosis --enclave local-eth-testnet run github.com/ethpandaops/ethereum-package@2e9e5a41784f792a206f1a108c2c96830b2c95ef
kurtosis --enclave local-eth-testnet run github.com/ethpandaops/ethereum-package@4.4.0
echo "ETH_TESTNET_EL_URL=http://$(kurtosis port print local-eth-testnet el-1-geth-lighthouse rpc)" >> $GITHUB_ENV
echo "ETH_TESTNET_CL_URL=$(kurtosis port print local-eth-testnet cl-1-lighthouse-geth http)" >> $GITHUB_ENV
- name: Wait for the local Ethereum testnet to come up
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: cargo check examples
run: ../.github/scripts/cargo-check.sh
working-directory: examples
- uses: risc0/foundry-toolchain@2fe7e70b520f62368a0e3c464f997df07ede420f
- uses: foundry-rs/foundry-toolchain@v1
- name: forge check risc0-ethereum
run: forge fmt --check
working-directory: contracts
Expand Down Expand Up @@ -102,12 +102,14 @@ jobs:
env:
RUSTFLAGS: -Dwarnings
RISC0_SKIP_BUILD: true
RISC0_SKIP_BUILD_KERNEL: true,
- name: cargo clippy $CARGO_LOCKED all examples
run: ../.github/scripts/cargo-clippy.sh
working-directory: examples
env:
RUSTFLAGS: -Dwarnings
RISC0_SKIP_BUILD: true
RISC0_SKIP_BUILD_KERNEL: true,
- run: sccache --show-stats

test-risc0-ethereum:
Expand Down Expand Up @@ -145,13 +147,13 @@ jobs:
ref: ${{ env.RISC0_MONOREPO_REF }}
toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }}
features: ${{ matrix.feature }}
- uses: risc0/foundry-toolchain@2fe7e70b520f62368a0e3c464f997df07ede420f
- uses: foundry-rs/foundry-toolchain@v1
- name: cargo build
run: cargo build $CARGO_LOCKED --workspace --all-features
- name: cargo test
run: cargo test $CARGO_LOCKED --workspace --all-features --timings
- name: Upload timings artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cargo-timings-${{ matrix.os }}-${{ matrix.device }}
path: target/cargo-timings/
Expand Down Expand Up @@ -188,7 +190,7 @@ jobs:
ref: ${{ env.RISC0_MONOREPO_REF }}
toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }}
features: ${{ matrix.feature }}
- uses: risc0/foundry-toolchain@2fe7e70b520f62368a0e3c464f997df07ede420f
- uses: foundry-rs/foundry-toolchain@v1
- name: cargo test all examples
run: ../.github/scripts/cargo-test.sh
working-directory: examples
Expand All @@ -206,8 +208,11 @@ jobs:
with:
submodules: recursive
- uses: risc0/risc0/.github/actions/rustup@main
- uses: risc0/foundry-toolchain@2fe7e70b520f62368a0e3c464f997df07ede420f
- uses: foundry-rs/foundry-toolchain@v1
- run: cargo doc $CARGO_LOCKED --all-features --no-deps --workspace
env:
RISC0_SKIP_BUILD: true,
RISC0_SKIP_BUILD_KERNEL: true,
- run: forge doc

# Run as a separate job because we need to install a different set of tools.
Expand Down
6 changes: 5 additions & 1 deletion contracts/deployment-test/Deployment.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import {TimelockController} from "openzeppelin/contracts/governance/TimelockCont
import {RiscZeroVerifierRouter} from "../src/RiscZeroVerifierRouter.sol";
import {IRiscZeroVerifier} from "../src/IRiscZeroVerifier.sol";
import {ConfigLoader, Deployment, DeploymentLib, VerifierDeployment} from "../src/config/Config.sol";
import {IRiscZeroSelectable} from "../src/IRiscZeroSelectable.sol";
import {RiscZeroVerifierEmergencyStop} from "../src/RiscZeroVerifierEmergencyStop.sol";

/// Test designed to be run against a chain with an active deployment of the RISC Zero contracts.
/// Checks that the deployment matches what is recorded in the deployment.toml file.
Expand Down Expand Up @@ -118,7 +120,9 @@ contract DeploymentTest is Test {
IRiscZeroVerifier verifierImpl = router.getVerifier(verifierConfig.selector);
require(address(verifierImpl) != address(0), "verifier impl returned the zero address");
require(keccak256(address(verifierImpl).code) != keccak256(bytes("")), "verifier impl has no deployed code");
// TODO: When SELECTOR is added to the public verifier interface, also check the verifier has the expected selector.
address verifierImplAddress = address(RiscZeroVerifierEmergencyStop(address(verifierImpl)).verifier());
IRiscZeroSelectable verifierSelectable = IRiscZeroSelectable(verifierImplAddress);
require(verifierConfig.selector == verifierSelectable.SELECTOR(), "selector mismatch");
}
}
}
28 changes: 28 additions & 0 deletions contracts/deployment.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ router = "0x8EaB2D97Dfce405A1692a21b3ff3A172d593D319"

# TODO: Add information for 1.0 contracts.
[[chains.ethereum-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0x5a99469f18a5863D3258E577892589386dFD965E"
estop = "0xB839eA7bBA8e6bB2893ca5252F3f3C13323D74F7"

[[chains.ethereum-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x94A4684d6F7085C19138Bd4f9F3295fa9943C622"
Expand All @@ -41,13 +43,15 @@ timelock-delay = 1
router = "0x925d8331ddc0a1F0d96E68CF073DFE1d92b69187"

[[chains.ethereum-sepolia.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0xf4D938c73Bcc124e02A2D6c7557e98838B5E91B4"
estop = "0x1C182869A6bF84DfAc0a70B46e2f9b3aeE9100e1"

[[chains.ethereum-sepolia.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0xd9b0d07CeCd808a8172F21fA7C97992168f045CA"
Expand All @@ -69,13 +73,15 @@ timelock-delay = 1
router = "0xf70aBAb028Eb6F4100A24B203E113D94E87DE93C"

[[chains.ethereum-holesky.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0xDC986a09728F76110FF666eE7b20d99086501d15"
estop = "0x0b144E07A0826182B6b59788c34b32Bfa86Fb711"

[[chains.ethereum-holesky.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x44c220f0598345195cE99AD6A57aDfFcb9Ea33e7"
Expand All @@ -97,13 +103,15 @@ timelock-delay = 604800
router = "0x0b144e07a0826182b6b59788c34b32bfa86fb711"

[[chains.arbitrum-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0xBDaEd5bbf8016AfD05Fc4659572e5fEb5854aAD4"
estop = "0x27983ee173aD10E171D17C9c5C14d5baFE997609"

[[chains.arbitrum-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x84b943E31e7fAe6072ce5F75eb4694C7D5F9b0cF"
Expand All @@ -125,13 +133,15 @@ timelock-delay = 1
router = "0x0b144e07a0826182b6b59788c34b32bfa86fb711"

[[chains.arbitrum-sepolia.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0xBDaEd5bbf8016AfD05Fc4659572e5fEb5854aAD4"
estop = "0x27983ee173aD10E171D17C9c5C14d5baFE997609"

[[chains.arbitrum-sepolia.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x84b943E31e7fAe6072ce5F75eb4694C7D5F9b0cF"
Expand All @@ -153,13 +163,15 @@ timelock-delay = 604800
router = "0x0b144E07A0826182B6b59788c34b32Bfa86Fb711"

[[chains.avalanche-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0xBDaEd5bbf8016AfD05Fc4659572e5fEb5854aAD4"
estop = "0x27983ee173aD10E171D17C9c5C14d5baFE997609"

[[chains.avalanche-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x84b943E31e7fAe6072ce5F75eb4694C7D5F9b0cF"
Expand All @@ -181,13 +193,15 @@ timelock-delay = 1
router = "0x0b144E07A0826182B6b59788c34b32Bfa86Fb711"

[[chains.avalanche-fuji.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0xBDaEd5bbf8016AfD05Fc4659572e5fEb5854aAD4"
estop = "0x27983ee173aD10E171D17C9c5C14d5baFE997609"

[[chains.avalanche-fuji.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x84b943E31e7fAe6072ce5F75eb4694C7D5F9b0cF"
Expand All @@ -209,13 +223,15 @@ timelock-delay = 604800
router = "0x0b144e07a0826182b6b59788c34b32bfa86fb711"

[[chains.base-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0xBDaEd5bbf8016AfD05Fc4659572e5fEb5854aAD4"
estop = "0x27983ee173aD10E171D17C9c5C14d5baFE997609"

[[chains.base-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x84b943E31e7fAe6072ce5F75eb4694C7D5F9b0cF"
Expand All @@ -237,13 +253,15 @@ timelock-delay = 1
router = "0x0b144e07a0826182b6b59788c34b32bfa86fb711"

[[chains.base-sepolia.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0x84b943E31e7fAe6072ce5F75eb4694C7D5F9b0cF"
estop = "0x5E36f0D56741013d864d8FEb5950AB0E7Eff9Ab1"

[[chains.base-sepolia.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x2DEfEA335392bb62d01f74e338697C7B31De254C"
Expand All @@ -265,13 +283,15 @@ timelock-delay = 604800
router = "0x0b144e07a0826182b6b59788c34b32bfa86fb711"

[[chains.optimism-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0xBDaEd5bbf8016AfD05Fc4659572e5fEb5854aAD4"
estop = "0x27983ee173aD10E171D17C9c5C14d5baFE997609"

[[chains.optimism-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x84b943E31e7fAe6072ce5F75eb4694C7D5F9b0cF"
Expand All @@ -295,13 +315,15 @@ router = "0xB369b4dd27FBfb59921d3A4a3D23AC2fc32FB908"
# NOTE: 1.0 was not deployed to OP Sepolia.

[[chains.optimism-sepolia.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0xBDaEd5bbf8016AfD05Fc4659572e5fEb5854aAD4"
estop = "0x27983ee173aD10E171D17C9c5C14d5baFE997609"

[[chains.optimism-sepolia.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x84b943E31e7fAe6072ce5F75eb4694C7D5F9b0cF"
Expand All @@ -323,13 +345,15 @@ timelock-delay = 604800
router = "0x0b144e07a0826182b6b59788c34b32bfa86fb711"

[[chains.linea-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0xBDaEd5bbf8016AfD05Fc4659572e5fEb5854aAD4"
estop = "0x27983ee173aD10E171D17C9c5C14d5baFE997609"

[[chains.linea-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x84b943E31e7fAe6072ce5F75eb4694C7D5F9b0cF"
Expand Down Expand Up @@ -357,13 +381,15 @@ router = "0x27983ee173aD10E171D17C9c5C14d5baFE997609"
# As a result, the router is deployed, but it is empty and useless.

[[chains.linea-sepolia.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0x0b144E07A0826182B6b59788c34b32Bfa86Fb711"
estop = "0x8EaB2D97Dfce405A1692a21b3ff3A172d593D319"

[[chains.linea-sepolia.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
unroutable = true
selector = "0x50bd1769"
Expand All @@ -386,13 +412,15 @@ timelock-delay = 604800
router = "0x0b144e07a0826182b6b59788c34b32bfa86fb711"

[[chains.polygon-zkevm-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.2"
unroutable = true
selector = "0x4c630d87"
verifier = "0xBDaEd5bbf8016AfD05Fc4659572e5fEb5854aAD4"
estop = "0x27983ee173aD10E171D17C9c5C14d5baFE997609"

[[chains.polygon-zkevm-mainnet.verifiers]]
name = "RiscZeroGroth16Verifier"
version = "1.1.0-rc.3"
selector = "0x50bd1769"
verifier = "0x84b943E31e7fAe6072ce5F75eb4694C7D5F9b0cF"
Expand Down
Loading
Loading