feat: allow zero teeImageHash in dev multiproof mode#344
Merged
Conversation
…ash (PRIV-1982) Update local-tee.json with the canonical devnet multiproofConfigHash (0x1bb15c...b1, computed by PerChainConfig for chain 1337) and set teeImageHash to zero (matching nitro-enclave local mode B256::ZERO). Move the teeImageHash non-zero require in _assertValidMultiproofInput into the production (non-dev) branch so dev multiproof deployments can use a zero image hash — there is no real Nitro enclave in dev mode. Co-authored-by: Cursor <cursoragent@cursor.com>
The 0x1bb15c... hash corresponds to ChainConfig::DEVNET (chain 1337) which has all-zero genesis fields. local-tee.json deploys on Anvil chain 901 with real genesis data, so no pre-computed hash is correct for this ephemeral chain — use 0x00...01 as a non-zero placeholder to trigger the multiproof deployment path. The correct per-chain config hash for the real devnet (chain 84538453) will be set in the base repo deploy config template (PR3). Co-authored-by: Cursor <cursoragent@cursor.com>
dguenther
approved these changes
Jun 16, 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
teeImageHashto zero inlocal-tee.json, matching nitro-enclave local mode'sB256::ZEROdefault (no real PCR0 measurement in dev)teeImageHash != bytes32(0)require in_assertValidMultiproofInputinto the production-only branch, so dev multiproof deployments can use a zero image hashContext
This is PR 1 in a 5-PR sequence (PRIV-1982) to stand up a fully functional L3 appchain devnet running in dev multiproof mode.
The end goal is
just devnet up-l3bringing up the full multiproof stack automatically — L1 anvil, L3 sequencer/batcher,nitro-localTEE prover, proposer (creating + auto-resolving games), and challenger (bond lifecycle) — with deposits and withdrawals working end-to-end.Why this PR is needed
The on-chain
AggregateVerifierrecomputes the TEE journal usingCONFIG_HASHandTEE_IMAGE_HASH(both set at deploy time from deploy config values). The enclave computes the same values and signs them into the journal. These must match exactly, or every proof verification fails.teeImageHash: In local mode (no real AWS Nitro enclave),tee_image_hash = B256::ZERO. The full verification chain works with zero: enclave signs journal with zero →AggregateVerifierrecomputes with zero →DevTEEProverRegistry.addDevSigner(signer, 0)registers with zero →TEEVerifiercheckssignerImageHash[signer] == imageId→0 == 0✓. The only blocker was_assertValidMultiproofInputrequiring non-zeroteeImageHashunconditionally — this PR moves that check into the production branch.multiproofConfigHash: Left as a non-zero placeholder (0x00...01) inlocal-tee.json. The config hash is chain-specific — it'skeccak256(PerChainConfig::marshal_binary())which includes chain ID, genesis hashes, and contract addresses. Sincelocal-tee.jsondeploys to an ephemeral Anvil chain (L2 chain 901), no pre-computed hash is correct. The real devnet's config hash (for chain 84538453) will be set in the base repo deploy config template (PR3), either hardcoded or computed dynamically oncejoe/fetch-rollup-configmerges.What this unblocks
With the zero
teeImageHashallowed in dev mode, the subsequent PRs can wire everything together:--direct-prover-rpcflag to talk directly tonitro-local, plus auto-resolve after game creationCONTRACTS_COMMITbumpnitro-local,base-proposer,base-challengerTest plan
forge buildcompiles successfullySystemDeploy_Testtests pass, includingtest_deploy_devMultiproof_succeedsandtest_deploy_devMultiproof_onProductionChain_revertsSystemDeploy.t.sol— tests use independent constants (teeImageHash = bytes32(uint256(1))) and are unaffected