Closed
Conversation
…ration (#61) Replace unconditional gateway.addRoute() call with env-var-controlled conditional. This allows the same script to work for both: - Multisig deployments (default): REGISTER_ROUTE unset/false, route added via Safe UI - Direct deployments: REGISTER_ROUTE=true, route added during script execution The gateway.addRoute() function has onlyOwner modifier, so when the gateway owner is a multisig and the deployer is an EOA, the call would revert. This change prevents deployment failures without requiring code modifications.
* feat: add Safe Transaction Builder JSON generator Adds a Node.js script to generate Safe Transaction Builder JSON files for registering verifier routes via multisig. This eliminates manual copy/paste errors when executing Phase 2 (multisig) deployments. Usage: node script/utils/generate-safe-batch.js --chain=all --version=v6.0.0-beta.1 Features: - Generates JSON files compatible with Safe UI Transaction Builder - Reads gateway addresses and verifier addresses from deployment files - Supports all 5 mainnet chains (Ethereum, Optimism, Arbitrum, Base, Scroll) - Handles version string conversion (v6.0.0-beta.1 -> V6_0_0_BETA_1) - Encodes addRoute(address) calldata with correct function selector - Includes ABI metadata for transaction decoding in Safe UI * refactor: code quality improvements for generate-safe-batch.js - Compact: single regex in versionToKey, reuse for filename generation - Concise: inline object literals, simplified arg parsing - Clean: condensed JSDoc to single-line comments, consistent error indentation - Capable: added chain ID validation, JSON parse error handling, verifier loop * chore: remove slop from generate-safe-batch.js (200→102 lines) * fix: read available chains from deployments directory
Update sp1-sdk dependency from sp1-wip multilinear_v6 to the public sp1 v6.0.0-rc.1 release tag. Regenerate verifier contract artifacts to fix the WrongVerifierSelector mismatch where proofs embed selector 0xbb1a6f29 but the deployed beta.1 contracts expected 0x433cef0e. New VERIFIER_HASH values: - Plonk: 0xbb1a6f2930e94bfe8b35e794faf43133214534a17d2ad8e51358cad437b3c317 - Groth16: 0xf740f971b653af36c811da1611fd464ce4cc12eec5f604431a5afbba411249cd
The SP1 v6.0.0-rc.1 SDK artifact generation outputs VK_ROOT as 33 bytes (66 hex chars), which doesn't fit in Solidity's bytes32. Strip the extra leading 0x00 byte to fix compilation.
yuwen01
reviewed
Feb 13, 2026
| inputs[3] = vkRoot; | ||
| inputs[4] = nonce; | ||
|
|
||
| if (exitCode != 0) { |
Contributor
There was a problem hiding this comment.
matt says to move these checks before declaring the uint256[5] memory inputs;
Member
Author
There was a problem hiding this comment.
I'll move both the exit code, vkey validation checks before inputs array allocation in #70
Member
Author
There was a problem hiding this comment.
Also updated sp1 side to avoid regression in the future succinctlabs/sp1@61330b6
Member
Author
|
Superseded by #70. |
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
sp1-sdkdependency from privatesp1-wip.git(branchmultilinear_v6) to the publicsp1repo (v6.0.0-rc.1tag)artifacts.rsfor rc.1 API change (try_install_circuit_artifactsnow returnsResult<PathBuf>)Fixes the
WrongVerifierSelector(0xbb1a6f29, 0x433cef0e)revert onsubmit_agg_proofs— the prover's v6.0.0-rc.1 SDK produces proofs with selector0xbb1a6f29, but the deployed v6.0.0-beta.1 contracts expect0x433cef0e.New VERIFIER_HASH values
0xbb1a6f29...0xbb1a6f290xf740f971...0xf740f971Deployment steps (after merge)
SP1VerifierPlonk(rc.1) to target chain(s)gateway.addRoute(newVerifierAddress)to register selector0xbb1a6f290x433cef0e)Test plan
SP1VerifierPlonk.solhasVERIFIER_HASHprefix0xbb1a6f29SP1VerifierGroth16.solhas correctVERIFIER_HASHsubmit_agg_proofsno longer reverts