Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
17fcf51
Replace onchain Nitro cert verification with Automata ZK verifier, ad…
leopoldjoy Mar 2, 2026
887cb4d
Integrate multiproof config into standard DeployConfig, fix TEEVerifi…
leopoldjoy Mar 2, 2026
836a75f
Fix fmt
leopoldjoy Mar 2, 2026
c8d8e40
Replace aws-nitro-enclave-attestation submodule with no-git dependenc…
leopoldjoy Mar 2, 2026
e2ec02c
Consolidate deploy configs: migrate dev scripts to standard DeployCon…
leopoldjoy Mar 2, 2026
70dd367
Regenerate snapshots for updated and new multiproof contracts
leopoldjoy Mar 2, 2026
7a5a3ff
Fix Initializable test: guard ETHLockbox entries for non-interop depl…
leopoldjoy Mar 2, 2026
f68ba45
Add test-multiproof recipe to Justfile for CI
leopoldjoy Mar 2, 2026
3bf1d92
Address PR feedback: extract GameType local var, stricter pubKey chec…
leopoldjoy Mar 3, 2026
800ae88
Merge branch 'joby.thundil/CHAIN-3293-migrate-multiproof-contracts-to…
leopoldjoy Mar 3, 2026
6267e4b
Resolve merge conflicts and regenerate semver-lock snapshots
leopoldjoy Mar 3, 2026
93a8766
Regenerate semver-lock with CI profile for correct bytecode hashes
leopoldjoy Mar 3, 2026
b30caeb
Regenerate semver-lock with all compiler profiles including dispute
leopoldjoy Mar 3, 2026
6ecdd16
Merge branch 'joby.thundil/CHAIN-3293-migrate-multiproof-contracts-to…
leopoldjoy Mar 3, 2026
f8572ca
Merge branch 'joby.thundil/CHAIN-3293-migrate-multiproof-contracts-to…
leopoldjoy Mar 3, 2026
fa8011c
Merge branch 'joby.thundil/CHAIN-3293-migrate-multiproof-contracts-to…
leopoldjoy Mar 3, 2026
7fccc73
Regenerate semver-lock.json to remove stale dispute profile entries
leopoldjoy Mar 3, 2026
89d24bc
Fix misleading TEEVerifier comment, require nitroEnclaveVerifier in d…
leopoldjoy Mar 4, 2026
054df85
Reset semvar versioning in SystemConfigGlobal
leopoldjoy Mar 4, 2026
bb1dd03
Regenerate semver-lock.json for SystemConfigGlobal and TEEVerifier ch…
leopoldjoy Mar 4, 2026
60e098d
correct SystemConfigGlobal.t.sol testInitialization() test cases to c…
leopoldjoy Mar 4, 2026
f56d969
use a proof threshold and allow ZK proofs after TEE nullification (#199)
roger-bai-coinbase Mar 4, 2026
1f6f3a1
Fix stack-too-deep in DeployImplementations and regenerate semver-lock
leopoldjoy Mar 5, 2026
ec95a40
add multiproofProofThreshold to DeployConfig.s.sol to fix CI failures
leopoldjoy Mar 5, 2026
759c86e
Correct semver comment
leopoldjoy Mar 5, 2026
e7659b3
Regenerate semver-lock following fix
leopoldjoy Mar 5, 2026
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ deploy-config/getting-started.json
# IDE
/.idea/

# Foundry
foundry.lock

# OS
.DS_Store
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ deps: clean-lib
github.com/safe-global/safe-contracts@bf943f80fec5ac647159d26161446ac5d716a294 \
github.com/Vectorized/solady@502cc1ea718e6fa73b380635ee0868b0740595f0 \
github.com/base/nitro-validator@0f006d2075637dd9640e530c4a7065f5c8bb2132 \
github.com/base/op-enclave@a2d5398f04c3a8e4df929d58ee638ba4a037bfec
github.com/base/op-enclave@a2d5398f04c3a8e4df929d58ee638ba4a037bfec \
github.com/automata-network/aws-nitro-enclave-attestation@10fe7be8d9840490f5655e4b2a2aba3a95ec88c1
forge install --no-git \
github.com/ethereum-optimism/superchain-registry@84bce73573f130008d84bae6e924163bab589a11
@# openzeppelin-contracts-v5 and solady-v0.0.245 use the same orgs as their
Expand Down
12 changes: 11 additions & 1 deletion deploy-config/hardhat.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,15 @@
"gasPayingTokenName": "",
"gasPayingTokenSymbol": "",
"nativeAssetLiquidityAmount": null,
"liquidityControllerOwner": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc"
"liquidityControllerOwner": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"teeImageHash": "0x0000000000000000000000000000000000000000000000000000000000000001",
"multiproofConfigHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"multiproofGameType": 621,
"teeProposer": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"nitroEnclaveVerifier": "0x0000000000000000000000000000000000000000",
"multiproofGenesisOutputRoot": "0x0000000000000000000000000000000000000000000000000000000000000001",
"multiproofGenesisBlockNumber": 0,
"multiproofBlockInterval": 100,
"multiproofIntermediateBlockInterval": 10,
"multiproofProofThreshold": 1
}
9 changes: 0 additions & 9 deletions deploy-config/sepolia-no-nitro.json

This file was deleted.

9 changes: 0 additions & 9 deletions deploy-config/sepolia-with-nitro.json

This file was deleted.

12 changes: 11 additions & 1 deletion deploy-config/sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,15 @@
"gasPayingTokenName": "",
"gasPayingTokenSymbol": "",
"nativeAssetLiquidityAmount": null,
"liquidityControllerOwner": "0xfd1D2e729aE8eEe2E146c033bf4400fE75284301"
"liquidityControllerOwner": "0xfd1D2e729aE8eEe2E146c033bf4400fE75284301",
"teeImageHash": "0x0000000000000000000000000000000000000000000000000000000000000001",
"multiproofConfigHash": "0x12e9c45f19f9817c6d4385fad29e7a70c355502cf0883e76a9a7e478a85d1360",
"multiproofGameType": 621,
"teeProposer": "0xb28E6890Cffa969dA9851c1BF1Ac34B76EbFEe98",
"nitroEnclaveVerifier": "0x0000000000000000000000000000000000000000",
"multiproofGenesisOutputRoot": "0xbc273d5876d1858ecd5aaf4ce4eaf16c73f0187ca4271b774ed5da7d2254ba79",
"multiproofGenesisBlockNumber": 37223829,
"multiproofBlockInterval": 100,
"multiproofIntermediateBlockInterval": 10,
"multiproofProofThreshold": 1
}
1 change: 1 addition & 0 deletions deployments/11155111-dev-no-nitro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"SystemConfigGlobal":"0xf8293c0f3a36A746B559a1a51870339B20F60945","TEEVerifier":"0x82453dA61B397EE366fB2129502de9c216480aB6","DisputeGameFactory":"0xfEa8Cb315F75d838b6c76ae336a9255f81df0D50","AnchorStateRegistry":"0x556BD554854504BE2F2023F6531D25eF6f6Fe77D","DelayedWETH":"0xb1FB7f05711d2270cD658448562A29E8c5C95E9E","AggregateVerifier":"0xeeF18F1640fa79f919799B5D629908909e715f97"}
8 changes: 8 additions & 0 deletions scripts/deploy/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,14 @@ contract Deploy is Deployer {
faultGameV2SplitDepth: cfg.faultGameV2SplitDepth(),
faultGameV2ClockExtension: cfg.faultGameV2ClockExtension(),
faultGameV2MaxClockDuration: cfg.faultGameV2MaxClockDuration(),
teeImageHash: cfg.teeImageHash(),
multiproofConfigHash: cfg.multiproofConfigHash(),
multiproofGameType: cfg.multiproofGameType(),
nitroEnclaveVerifier: cfg.nitroEnclaveVerifier(),
l2ChainID: cfg.l2ChainID(),
multiproofBlockInterval: cfg.multiproofBlockInterval(),
multiproofIntermediateBlockInterval: cfg.multiproofIntermediateBlockInterval(),
multiproofProofThreshold: cfg.multiproofProofThreshold(),
protocolVersionsProxy: IProtocolVersions(artifacts.mustGetAddress("ProtocolVersionsProxy")),
superchainConfigProxy: superchainConfigProxy,
superchainProxyAdmin: superchainProxyAdmin,
Expand Down
22 changes: 22 additions & 0 deletions scripts/deploy/DeployConfig.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,18 @@ contract DeployConfig is Script {
uint256 public faultGameV2ClockExtension;
uint256 public faultGameV2MaxClockDuration;

// Multiproof Configuration
bytes32 public teeImageHash;
bytes32 public multiproofConfigHash;
uint256 public multiproofGameType;
address public teeProposer;
address public nitroEnclaveVerifier;
bytes32 public multiproofGenesisOutputRoot;
uint256 public multiproofGenesisBlockNumber;
uint256 public multiproofBlockInterval;
uint256 public multiproofIntermediateBlockInterval;
uint256 public multiproofProofThreshold;

bool public useInterop;
bool public useUpgradedFork;
bytes32 public devFeatureBitmap;
Expand Down Expand Up @@ -192,6 +204,16 @@ contract DeployConfig is Script {
faultGameV2SplitDepth = _readOr(_json, "$.faultGameV2SplitDepth", 30);
faultGameV2ClockExtension = _readOr(_json, "$.faultGameV2ClockExtension", 10800);
faultGameV2MaxClockDuration = _readOr(_json, "$.faultGameV2MaxClockDuration", 302400);
teeImageHash = bytes32(_readOr(_json, "$.teeImageHash", 0));
multiproofConfigHash = bytes32(_readOr(_json, "$.multiproofConfigHash", 0));
multiproofGameType = _readOr(_json, "$.multiproofGameType", 621);
teeProposer = _readOr(_json, "$.teeProposer", finalSystemOwner);
nitroEnclaveVerifier = stdJson.readAddress(_json, "$.nitroEnclaveVerifier");
multiproofGenesisOutputRoot = bytes32(_readOr(_json, "$.multiproofGenesisOutputRoot", uint256(1)));
multiproofGenesisBlockNumber = _readOr(_json, "$.multiproofGenesisBlockNumber", 0);
multiproofBlockInterval = _readOr(_json, "$.multiproofBlockInterval", 100);
multiproofIntermediateBlockInterval = _readOr(_json, "$.multiproofIntermediateBlockInterval", 10);
multiproofProofThreshold = _readOr(_json, "$.multiproofProofThreshold", 1);
}

function fork() public view returns (Fork fork_) {
Expand Down
58 changes: 32 additions & 26 deletions scripts/deploy/DeployImplementations.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ import { DeployUtils } from "scripts/libraries/DeployUtils.sol";
import { Solarray } from "scripts/libraries/Solarray.sol";
import { ChainAssertions } from "scripts/deploy/ChainAssertions.sol";
import { DevFeatures } from "src/libraries/DevFeatures.sol";
import { CertManager } from "lib/nitro-validator/src/CertManager.sol";
import {
INitroEnclaveVerifier
} from "lib/aws-nitro-enclave-attestation/contracts/src/interfaces/INitroEnclaveVerifier.sol";
import { SystemConfigGlobal } from "src/multiproof/tee/SystemConfigGlobal.sol";
import { MockVerifier } from "src/multiproof/mocks/MockVerifier.sol";
import { TEEVerifier } from "src/multiproof/tee/TEEVerifier.sol";
import { DeployDevWithNitro } from "../multiproof/DeployDevWithNitro.s.sol";
import { AggregateVerifier } from "src/multiproof/AggregateVerifier.sol";
import { GameType } from "src/dispute/lib/Types.sol";

contract DeployImplementations is Script {
struct Input {
Expand All @@ -65,6 +67,15 @@ contract DeployImplementations is Script {
uint256 faultGameV2SplitDepth;
uint256 faultGameV2ClockExtension;
uint256 faultGameV2MaxClockDuration;
// Multiproof parameters
bytes32 teeImageHash;
bytes32 multiproofConfigHash;
uint256 multiproofGameType;
address nitroEnclaveVerifier;
uint256 l2ChainID;
uint256 multiproofBlockInterval;
uint256 multiproofIntermediateBlockInterval;
uint256 multiproofProofThreshold;
// Outputs from DeploySuperchain.s.sol.
ISuperchainConfig superchainConfigProxy;
IProtocolVersions protocolVersionsProxy;
Expand Down Expand Up @@ -137,7 +148,6 @@ contract DeployImplementations is Script {
deployAnchorStateRegistryImpl(_input, output_);
deployFaultDisputeGameV2Impl(_input, output_);
deployPermissionedDisputeGameV2Impl(_input, output_);
deploySystemConfigGlobalImpl(_input, output_);
deployAggregateVerifierImpl(_input, output_);
if (DevFeatures.isDevFeatureEnabled(_input.devFeatureBitmap, DevFeatures.OPTIMISM_PORTAL_INTEROP)) {
deploySuperFaultDisputeGameImpl(_input, output_);
Expand Down Expand Up @@ -479,7 +489,7 @@ contract DeployImplementations is Script {
function deployDisputeGameFactoryImpl(Output memory _output) private {
IDisputeGameFactory impl = IDisputeGameFactory(
DeployUtils.createDeterministic({
_name: "src/dispute/DisputeGameFactory.sol:DisputeGameFactory",
_name: "DisputeGameFactory",
_args: DeployUtils.encodeConstructor(abi.encodeCall(IDisputeGameFactory.__constructor__, ())),
_salt: _salt
})
Expand Down Expand Up @@ -706,40 +716,36 @@ contract DeployImplementations is Script {
_output.opcmStandardValidator = impl;
}

function deploySystemConfigGlobalImpl(Input memory, Output memory _output) private {
address certManager = address(new CertManager());
SystemConfigGlobal scgImpl = new SystemConfigGlobal(CertManager(certManager));

vm.label(address(scgImpl), "SystemConfigGlobalImpl");
_output.systemConfigGlobalImpl = scgImpl;
}

function deployAggregateVerifierImpl(Input memory, Output memory _output) private {
DeployDevWithNitro nitro = new DeployDevWithNitro();
DeployDevWithNitro.DeployConfig memory cfg = nitro.loadConfig();

function deployAggregateVerifierImpl(Input memory _input, Output memory _output) private {
address zkVerifier = address(new MockVerifier());
address teeVerifierImpl = address(new TEEVerifier(_output.systemConfigGlobalImpl));

IVerifier aggregateVerifierImpl = IVerifier(
address teeVerifierImpl;
{
SystemConfigGlobal scgImpl = new SystemConfigGlobal(INitroEnclaveVerifier(_input.nitroEnclaveVerifier));
vm.label(address(scgImpl), "SystemConfigGlobalImpl");
_output.systemConfigGlobalImpl = scgImpl;
teeVerifierImpl = address(new TEEVerifier(scgImpl));
}

_output.aggregateVerifierImpl = IVerifier(
address(
new AggregateVerifier(
cfg.gameType,
GameType.wrap(uint32(_input.multiproofGameType)),
_output.anchorStateRegistryImpl,
_output.delayedWETHImpl,
IVerifier(teeVerifierImpl),
IVerifier(zkVerifier),
cfg.teeImageHash,
_input.teeImageHash,
bytes32(0),
cfg.configHash,
8453,
100,
10
_input.multiproofConfigHash,
_input.l2ChainID,
_input.multiproofBlockInterval,
_input.multiproofIntermediateBlockInterval,
_input.multiproofProofThreshold
)
)
);
vm.label(address(aggregateVerifierImpl), "AggregateVerifierImpl");
_output.aggregateVerifierImpl = aggregateVerifierImpl;
vm.label(address(_output.aggregateVerifierImpl), "AggregateVerifierImpl");
}

function assertValidInput(Input memory _input) private pure {
Expand Down
Loading
Loading