Skip to content

refactor: dev multiproof scripts#236

Merged
jackchuma merged 4 commits intomainfrom
refactor/dev-scripts
Mar 31, 2026
Merged

refactor: dev multiproof scripts#236
jackchuma merged 4 commits intomainfrom
refactor/dev-scripts

Conversation

@jackchuma
Copy link
Copy Markdown
Contributor

@jackchuma jackchuma commented Mar 31, 2026

Summary

Refactors DeployDevNoNitro and DeployDevWithNitro multiproof deployment scripts, and adds missing deploy config fields.

Changes

Proxy pattern

  • Replace OpenZeppelin TransparentUpgradeableProxy with the project's own Proxy contract (src/universal/Proxy.sol), eliminating the manual PROXY_OWNER_ADDRESS storage slot hack (vm.store) in favor of explicit upgradeTo / upgradeToAndCall + changeAdmin calls.

New deploy config fields

  • Add teeChallenger, zkRangeHash, and zkAggregationHash to DeployConfig.s.sol and sepolia.json.
  • Both teeProposer and teeChallenger are now registered as initial proposers in TEEProverRegistry.initialize.
  • AggregateVerifier is constructed with real ZK hashes from config instead of zero hashes.

Hardcoded values removed

  • Replace hardcoded L2 chain ID (8453) with cfg.l2ChainID().

Type safety

  • Change mockAnchorRegistry from address to IAnchorStateRegistry, removing redundant casts throughout both scripts.

JSON output

  • Replace manual JSON string concatenation with Foundry's vm.serializeAddress / vm.writeJson for cleaner, less error-prone output.

Cleanup

  • Remove redundant inline console.log calls (summary is still printed at the end).
  • Remove stale comments and unnecessary blank lines.

@cb-heimdall
Copy link
Copy Markdown
Collaborator

cb-heimdall commented Mar 31, 2026

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Resolve conflicts in DeployDevNoNitro and DeployDevWithNitro by
adopting the updated TEEProverRegistry.initialize signature (address[]
initialProposers) from main while keeping the Proxy deployment pattern
from this branch.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also have risc0VerifierRouter and risc0SetBuilderImageId.

@jackchuma jackchuma merged commit 4cca72b into main Mar 31, 2026
8 checks passed
@jackchuma jackchuma deleted the refactor/dev-scripts branch March 31, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants