Add RISC Zero verifier stack deploy script for NitroEnclaveVerifier integration#229
Open
leopoldjoy wants to merge 5 commits intomainfrom
Open
Add RISC Zero verifier stack deploy script for NitroEnclaveVerifier integration#229leopoldjoy wants to merge 5 commits intomainfrom
leopoldjoy wants to merge 5 commits intomainfrom
Conversation
… pre-deployed NitroEnclaveVerifier
Collaborator
✅ Heimdall Review Status
|
…er instead of deploying full verifier stack
…ase/contracts into add-risc0-verifier-stack-deploy-script
roger-bai-coinbase
approved these changes
Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
DeployRiscZeroStack.s.solscript that deploys the full RISC Zero on-chain verifier stack (Groth16Verifier,SetVerifier,VerifierRouter) andNitroEnclaveVerifierin a single transaction. This is a prerequisite for usingDeployDevWithNitro.s.solwith real ZK proof verification.Motivation
The RISC Zero
SetVerifierandNitroEnclaveVerifier(viaISP1Verifier) require Solidity^0.8.20, but the main deployment scripts and their transitive dependencies (DisputeGameFactory,TEEProverRegistry,AggregateVerifier, etc.) are pinned to=0.8.15. These cannot coexist in a single compilation unit, so the verifier stack deployment is split into a separate^0.8.20script.Changes
scripts/multiproof/DeployRiscZeroStack.s.sol— DeploysRiscZeroGroth16Verifier,RiscZeroSetVerifier,RiscZeroVerifierRouter(with both selectors registered), andNitroEnclaveVerifier. Takes all config as function args for portability across testnets.scripts/multiproof/DeployDevWithNitro.s.sol— Simplified to require a pre-deployednitroEnclaveVerifieraddress from config. Removed concreteNitroEnclaveVerifierand risc0 contract imports that caused the Solidity version conflict.scripts/deploy/DeployConfig.s.sol— Replacedrisc0SetBuilderImageId(bytes32) withrisc0VerifierRouter(address). Added clarifying comments on Nitro config fields.foundry.toml— Addedopenzeppelin/remapping pointing tolib/risc0-ethereum/lib/openzeppelin-contracts/so risc0 contracts' bareopenzeppelin/imports resolve correctly at the root level.Deployment Flow
nitroEnclaveVerifierin deploy config to the output address.DeployDevWithNitro.s.solas before.