Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
70b7dc7
feat: add TDX verifier and TDX-aware TEE prover registry
jackchuma Apr 29, 2026
a0f57c1
Merge branch 'main' of github.com:base/contracts into feat/tdx-verifier
jackchuma May 3, 2026
65bc362
remove zkCoprocessor input
jackchuma May 3, 2026
1220336
test deployment and fix tests
jackchuma May 3, 2026
55718a9
update AggregateVerifier
jackchuma May 3, 2026
0cd4fc8
fmt
jackchuma May 3, 2026
c1a2a0a
clean DeployDevWithTDX script
jackchuma May 3, 2026
cd1af34
clean DeployTDXVerifier script
jackchuma May 3, 2026
74d593a
clean TDXVerifier
jackchuma May 3, 2026
4766367
clean TEEProverRegistry
jackchuma May 3, 2026
f120667
clean TEEVerifier
jackchuma May 3, 2026
0425485
clean TDXVerifier
jackchuma May 3, 2026
1bb5cb4
Merge branch 'main' of github.com:base/contracts into feat/tdx-verifier
jackchuma May 4, 2026
61de71b
Merge branch 'main' of github.com:base/contracts into feat/tdx-verifier
jackchuma May 5, 2026
85bd21a
fix imports
jackchuma May 5, 2026
92aeb9c
deploy dev
jackchuma May 6, 2026
604854e
add asr config to tdx script
jackchuma May 6, 2026
accc923
fix AggregateVerifier flow
jackchuma May 6, 2026
c468200
Merge branch 'main' of github.com:base/contracts into feat/tdx-verifier
jackchuma May 6, 2026
993bb65
fix semver
jackchuma May 6, 2026
72ce71e
another deployment
jackchuma May 6, 2026
9d6bf3c
add helper command
jackchuma May 7, 2026
c4c830e
fix tdx deploy script
jackchuma May 7, 2026
aa612e1
update dev deployment
jackchuma May 9, 2026
2382af5
Merge branch 'main' of github.com:base/contracts into feat/tdx-verifier
jackchuma Jun 25, 2026
5f4d06b
fix build
jackchuma Jun 25, 2026
d36603a
add local zeronet deploy config
jackchuma Jun 28, 2026
31ef2a8
add deploy command
jackchuma Jun 28, 2026
a5d7b34
fix deploy scripts
jackchuma Jun 28, 2026
911998b
deploy to hoodi
jackchuma Jun 28, 2026
c728897
add local deploy helpers
jackchuma Jun 28, 2026
b81321d
deploy dev contracts
jackchuma Jun 29, 2026
bc79c9f
clean up TDXVerifier
jackchuma Jun 29, 2026
ea2cf9d
clean up TDXVerifier
jackchuma Jun 29, 2026
8eebf5b
clean up TDXVerifier
jackchuma Jun 29, 2026
e46039c
clean up TDXVerifier
jackchuma Jun 29, 2026
8d2894a
clean up TDXVerifier
jackchuma Jun 29, 2026
e154b14
clean up TDXVerifier
jackchuma Jun 29, 2026
cfbf445
clean up TDXVerifier
jackchuma Jun 29, 2026
10b7ec3
clean up TDXVerifier
jackchuma Jun 29, 2026
5342b19
clean up TDXVerifier
jackchuma Jun 29, 2026
734d77d
clean up TDXVerifier
jackchuma Jun 29, 2026
c36db94
clean up TDXVerifier
jackchuma Jun 29, 2026
c1dcb2f
clean up TEEProverRegistry
jackchuma Jun 29, 2026
dd66e49
clean up TEEProverRegistry
jackchuma Jun 29, 2026
3589af3
clean up TEEProverRegistry
jackchuma Jun 29, 2026
a902cde
clean up TEEProverRegistry
jackchuma Jun 29, 2026
e7c236a
clean up TEEVerifier
jackchuma Jun 29, 2026
e9d6d98
clean up TEEVerifier
jackchuma Jun 29, 2026
49b0a52
clean up AggregateVerifier
jackchuma Jun 29, 2026
359e319
clean up AggregateVerifier
jackchuma Jun 29, 2026
8b5cee6
clean up AggregateVerifier
jackchuma Jun 29, 2026
52cf0f8
clean up DeployTEEVerifiers
jackchuma Jun 29, 2026
5e30f2b
clean up DeployTEEVerifiers
jackchuma Jun 29, 2026
4b50098
clean up DeployTDXVerifier
jackchuma Jun 29, 2026
e64855a
clean up DeployTDXVerifier
jackchuma Jun 29, 2026
879c571
clean up DeployNitroVerifier
jackchuma Jun 29, 2026
57d10d0
clean up DeployNitroVerifier
jackchuma Jun 29, 2026
0b2e1f5
clean up DeployNitroVerifier
jackchuma Jun 29, 2026
bf1b3f2
clean up DeployDevWithTDX
jackchuma Jun 29, 2026
86c7f06
clean up DeployDevWithTDX
jackchuma Jun 29, 2026
d353c36
clean up DeployDevWithTDX
jackchuma Jun 29, 2026
2e5f38f
clean up DeployDevWithNitro
jackchuma Jun 29, 2026
9c68937
clean up DeployDevWithNitro
jackchuma Jun 29, 2026
4f852fd
clean up DeployDevNoNitro
jackchuma Jun 29, 2026
a1b30cc
clean up DeployDevNoNitro
jackchuma Jun 29, 2026
589c15d
clean up DeployDevBase
jackchuma Jun 29, 2026
25b789d
clean up DeployDevBase
jackchuma Jun 29, 2026
836ef57
clean up DeployDevBase
jackchuma Jun 29, 2026
a89fbf4
clean up DeployDevBase
jackchuma Jun 29, 2026
454d011
clean up DeployDevBase
jackchuma Jun 29, 2026
e88b360
clean up DeployDevBase
jackchuma Jun 29, 2026
e79f884
clean up DeployDevBase
jackchuma Jun 29, 2026
b132ede
clean up DeployDevBase
jackchuma Jun 29, 2026
075feaa
clean up DeployDevBase
jackchuma Jun 29, 2026
3439708
clean up DeployDevBase
jackchuma Jun 29, 2026
6f7c50b
rm deploy cfg
jackchuma Jun 29, 2026
865ced0
fix sepolia final system owner
jackchuma Jun 29, 2026
497fc57
clean up justfile
jackchuma Jun 29, 2026
b452cbc
clean up justfile
jackchuma Jun 29, 2026
78348d3
clean up justfile
jackchuma Jun 30, 2026
01d0b6d
clean up justfile
jackchuma Jun 30, 2026
e047e24
clean up justfile
jackchuma Jun 30, 2026
36d128b
clean up justfile
jackchuma Jun 30, 2026
212251f
clean up justfile
jackchuma Jun 30, 2026
71fc84b
clean up justfile
jackchuma Jun 30, 2026
d4924e5
clean up justfile
jackchuma Jun 30, 2026
c0f5501
clean up justfile
jackchuma Jun 30, 2026
56f30ff
clean up justfile
jackchuma Jun 30, 2026
1e0d95b
clean up readme
jackchuma Jun 30, 2026
a9fe2a6
clean up readme
jackchuma Jun 30, 2026
6844092
clean up readme
jackchuma Jun 30, 2026
d4f2e92
clean up readme
jackchuma Jun 30, 2026
9601da8
clean up readme
jackchuma Jun 30, 2026
53c9d3e
clean up readme
jackchuma Jun 30, 2026
bf7dea5
fmt readme
jackchuma Jun 30, 2026
181422a
clean up AggregateVerifier tests
jackchuma Jun 30, 2026
73d9606
clean up AggregateVerifier tests
jackchuma Jun 30, 2026
9a693db
clean up AggregateVerifier tests
jackchuma Jun 30, 2026
413e291
clean up AggregateVerifier tests
jackchuma Jun 30, 2026
6a60a31
clean up AggregateVerifier tests
jackchuma Jun 30, 2026
954c589
clean up AggregateVerifier tests
jackchuma Jun 30, 2026
d209b25
clean up AggregateVerifier tests
jackchuma Jun 30, 2026
b93ebe2
clean up AggregateVerifier tests
jackchuma Jun 30, 2026
60ef5c0
clean up AggregateVerifier tests
jackchuma Jun 30, 2026
cc154cb
clean up AggregateVerifier tests
jackchuma Jun 30, 2026
0bb0cdc
clean up AggregateVerifier tests
jackchuma Jun 30, 2026
7f9b38f
clean up BaseTest
jackchuma Jun 30, 2026
3e0657c
clean up BaseTest
jackchuma Jun 30, 2026
c156a64
clean up BaseTest
jackchuma Jun 30, 2026
f406c25
clean up Challenge
jackchuma Jun 30, 2026
62367a2
clean up Challenge
jackchuma Jun 30, 2026
7ecb0af
clean up Challenge
jackchuma Jun 30, 2026
a0a42c0
clean up Challenge
jackchuma Jun 30, 2026
5905ce0
clean up Challenge
jackchuma Jun 30, 2026
18bda73
clean up Nullify
jackchuma Jun 30, 2026
ec78905
clean up Nullify
jackchuma Jun 30, 2026
192058b
clean up Nullify
jackchuma Jun 30, 2026
4fcd158
clean up Nullify
jackchuma Jun 30, 2026
1c7a9ce
clean up Nullify
jackchuma Jun 30, 2026
80d5a4d
clean up TDXVerifier
jackchuma Jun 30, 2026
f9c8533
clean up TDXVerifier
jackchuma Jun 30, 2026
07bb1d8
clean up TDXVerifier
jackchuma Jun 30, 2026
75f6090
clean up TDXVerifier
jackchuma Jun 30, 2026
08308fe
clean up TDXVerifier
jackchuma Jun 30, 2026
219fc11
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
aab37ea
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
dc9fcb8
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
0688716
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
4979bc6
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
02cc747
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
0792f13
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
45b34ae
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
8eeab13
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
6bfebc1
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
9df4040
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
d799f61
clean up TEEProverRegistryTDX tests
jackchuma Jun 30, 2026
692ab60
clean up TEEProverRegistryTDX tests
jackchuma Jun 30, 2026
b39f70a
clean up TEEProverRegistryTDX tests
jackchuma Jun 30, 2026
de68840
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
320412f
clean up TEEProverRegistry tests
jackchuma Jun 30, 2026
0a2f82f
clean up TEEVerifier tests
jackchuma Jun 30, 2026
2d62135
clean up TEEVerifier tests
jackchuma Jun 30, 2026
d7be5c7
clean up TEEVerifier tests
jackchuma Jun 30, 2026
d8c8fd6
clean up TEEVerifier tests
jackchuma Jun 30, 2026
87cac3a
clean up TEEVerifier tests
jackchuma Jun 30, 2026
877698f
clean up TEEVerifier tests
jackchuma Jun 30, 2026
2fdc742
clean up TEEVerifier tests
jackchuma Jun 30, 2026
4047b32
clean up TEEVerifier tests
jackchuma Jun 30, 2026
f89c19c
clean up MockDevTEEProverRegistry
jackchuma Jun 30, 2026
d94418f
one more dev deploy
jackchuma Jun 30, 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 deploy-config/local.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@
"sp1Verifier": "0x0000000000000000000000000000000000000000",
"superchainConfigGuardian": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"superchainConfigIncidentResponder": "0x0000000000000000000000000000000000000000",
"tdxVerifier": "0x0000000000000000000000000000000000000001",
"teeChallenger": "0x976EA74026E726554dB657fA54763abd0C3a0aa9",
"teeImageHash": "0x0000000000000000000000000000000000000000000000000000000000000001",
"teeNitroImageHash": "0x0000000000000000000000000000000000000000000000000000000000000001",
"teeTdxImageHash": "0x0000000000000000000000000000000000000000000000000000000000000001",
"teeProposer": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"zkAggregationHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"zkRangeHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
Expand Down
4 changes: 3 additions & 1 deletion deploy-config/sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@
"sp1Verifier": "0x397A5f7f3dBd538f23DE225B51f532c34448dA9B",
"superchainConfigGuardian": "0xfd1D2e729aE8eEe2E146c033bf4400fE75284301",
"superchainConfigIncidentResponder": "0x0000000000000000000000000000000000000000",
"tdxVerifier": "0x5431a6Fd5365e9629BD2B0969e54c4f09d6781bA",
"teeChallenger": "0xadc09b63a3ac57a2ce86d946617a18df9db029a1",
"teeImageHash": "0xd04c8147410930fade36986c9357fd9a7591231e38e6e87e51183bd5909f509c",
"teeNitroImageHash": "0x11fb64617dfa2875d31b0cfb656666fd8cee65eb134fefeca171b9b6b4444a64",
"teeTdxImageHash": "0x4cb35ee476a8098c4e567098714c65f5afe25236fc460b38487a356e14e7db66",
"teeProposer": "0xdb84125f2f4229c81c579f41bc129c71b174eb58",
"zkAggregationHash": "0x005aa369dd9445e172018a9eaa4a0f9767b2c2079ece90ca120422b3c4c65f11",
"zkRangeHash": "0x51708a6b4a3b800a14607e902c1aad47719905c12698a3e01ca8b3321761bc52"
Expand Down
47 changes: 47 additions & 0 deletions deploy-config/zeronet-tdx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"baseFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"baseFeeVaultRecipient": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"baseFeeVaultWithdrawalNetwork": 0,
"batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
"disputeGameFinalityDelaySeconds": 302400,
"delayedWETHWithdrawalDelay": 302400,
"finalSystemOwner": "0x8C1a617BdB47342F9C17Ac8750E0b070c372C721",
"fundDevAccounts": true,
"gasPriceOracleBaseFeeScalar": 1368,
"gasPriceOracleBlobBaseFeeScalar": 810949,
"l1ChainId": 11155111,
"l1FeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"l1FeeVaultRecipient": "0x71bE63f3384f5fb98995898A86B02Fb2426c5788",
"l1FeeVaultWithdrawalNetwork": 0,
"l2ChainId": 84532,
"l2GenesisBlockGasLimit": "0x17D7840",
"l2OutputOracleStartingBlockNumber": 1,
"l2OutputOracleStartingTimestamp": 1,
"multiproofBlockInterval": 100,
"multiproofConfigHash": "0x12e9c45f19f9817c6d4385fad29e7a70c355502cf0883e76a9a7e478a85d1360",
"multiproofGameType": 621,
"multiproofGenesisBlockNumber": 0,
"multiproofIntermediateBlockInterval": 10,
"multiproofGenesisOutputRoot": "0x0000000000000000000000000000000000000000000000000000000000000001",
"nitroEnclaveVerifier": "0x2DC52760D13a3C2dF33fcc42913C4dddd8d976B9",
"operatorFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"operatorFeeVaultRecipient": "0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec",
"operatorFeeVaultWithdrawalNetwork": 0,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"proofMaturityDelaySeconds": 604800,
"proxyAdminOwner": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"respectedGameType": 621,
"sequencerFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"sequencerFeeVaultRecipient": "0xfabb0ac9d68b0b445fb7357272ff202c5651694a",
"sequencerFeeVaultWithdrawalNetwork": 0,
"sp1Verifier": "0x397A5f7f3dBd538f23DE225B51f532c34448dA9B",
"superchainConfigGuardian": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"superchainConfigIncidentResponder": "0x0000000000000000000000000000000000000000",
"tdxVerifier": "0xB5F7f92dA7aBfDBDEB8e84EE78765fd0D3D3E092",
"teeChallenger": "0xadc09b63a3ac57a2ce86d946617a18df9db029a1",
"teeNitroImageHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"teeTdxImageHash": "0x278ba4ed4251d187fb7215be37d8ee2ccb36906c71611dd89b655a81ed2445dc",
"teeProposer": "0x0ce54eFf9256b1da3b67656278EbAD2A9dfCFd4F",
"zkAggregationHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"zkRangeHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
13 changes: 13 additions & 0 deletions deployments/11155111-dev-with-tdx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"ASRStartingBlockNumber": 43536599,
"ASRStartingOutputRoot": "0x5bc62bbffa839dff9e9a13cb0ec240be19e76fc2c0e44082402697c728ba6150",
"AggregateVerifier": "0x1c03e8Ce7184d2d3A075f93A3637c6a3be866704",
"AnchorStateRegistry": "0x6C0dF1080cbd2856A4E2d0708bE23F3E9cf44A6A",
"DelayedWETH": "0x4bBCFa9bE58620B4fb1989A774917D57E2519985",
"DisputeGameFactory": "0xa92fe37ED3DFEE686c305Ab7cc2c445A1bCf300F",
"NitroEnclaveVerifier": "0x2DC52760D13a3C2dF33fcc42913C4dddd8d976B9",
"TDXRegistrationManager": "0x44E999A5859c2D12378a349882fAe5805DCE71b9",
"TDXVerifier": "0xB5F7f92dA7aBfDBDEB8e84EE78765fd0D3D3E092",
"TEEProverRegistry": "0x6123Ab4Ab4f860BA4810f7f7Cb0be4a111D8C490",
"TEEVerifier": "0x828e90BA966Abcd869e39D69EC4d89F521547E5A"
}
7 changes: 7 additions & 0 deletions deployments/11155111-tdx-verifier.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"IntelRootCaHash": "0xa1acc73eb45794fa1734f14d882e91925b6006f79d3bb2460df9d01b333d7009",
"MaxTimeDiff": 3600,
"RiscZeroVerifierRouter": "0x925d8331ddc0a1F0d96E68CF073DFE1d92b69187",
"TDXVerifier": "0x9c38b756B31529Cad02D54A4ba810F3ff1e00054",
"TDXVerifierId": "0xb9681d1f76f5dbf70da84ad06b5b20befa392638060e947965269b6f63ebbf3b"
}
4 changes: 4 additions & 0 deletions deployments/11155111-tee-verifiers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"NitroEnclaveVerifier": "0x2DC52760D13a3C2dF33fcc42913C4dddd8d976B9",
"TDXVerifier": "0xB5F7f92dA7aBfDBDEB8e84EE78765fd0D3D3E092"
}
11 changes: 11 additions & 0 deletions deployments/560048-dev-no-nitro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"ASRStartingBlockNumber": 4353541,
"ASRStartingOutputRoot": "0xb63f4c2646f83e684e14f6a217332ef8c372e95281269384cdb2aa93efd3109a",
"AggregateVerifier": "0x2aB6e58257e9F2689F8a17464450e1cf3870BAD1",
"AnchorStateRegistry": "0xc14F7E178BfE6209d30c431a8C69b4EcE6d15334",
"DelayedWETH": "0x4fc52f45202cfa48Cb84308B05A0D2A6adBAbBF0",
"DisputeGameFactory": "0x8e993853C303288f4fcd138E180E31a3c798E4F9",
"TDXVerifier": "0x0000000000000000000000000000000000000001",
"TEEProverRegistry": "0x8BE44CA11B9F81111242D0f854Db9171B3978Fc7",
"TEEVerifier": "0x09F9E99d379A9963Fe13814b31B90ba81bf9a74f"
}
3 changes: 2 additions & 1 deletion interfaces/L1/proofs/IAggregateVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ interface IAggregateVerifier is IDisputeGame {
function DISPUTE_GAME_FACTORY() external view returns (IDisputeGameFactory);
function DELAYED_WETH() external view returns (IDelayedWETH);
function TEE_VERIFIER() external view returns (IVerifier);
function TEE_IMAGE_HASH() external view returns (bytes32);
function TEE_NITRO_IMAGE_HASH() external view returns (bytes32);
function TEE_TDX_IMAGE_HASH() external view returns (bytes32);
function ZK_VERIFIER() external view returns (IVerifier);
function ZK_RANGE_HASH() external view returns (bytes32);
function ZK_AGGREGATE_HASH() external view returns (bytes32);
Expand Down
52 changes: 52 additions & 0 deletions interfaces/L1/proofs/tee/ITDXVerifier.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @notice Intel TDX TCB status reduced to the statuses this contract's policy needs.
/// @dev Unknown is index 0 so uninitialized values fail closed.
enum TDXTcbStatus {
Unknown,
UpToDate,
SwHardeningNeeded,
ConfigurationNeeded,
ConfigurationAndSwHardeningNeeded,
OutOfDate,
OutOfDateConfigurationNeeded,
Revoked
}

/// @notice Public journal emitted by the offchain/ZK TDX DCAP verifier.
/// @param tcbStatus Intel TDX TCB status for the platform.
/// @param timestamp Quote timestamp in milliseconds since Unix epoch.
/// @param collateralExpiration Earliest expiration timestamp in seconds across accepted collateral.
/// @param rootCaHash Hash of the Intel root CA used to validate the PCK/collateral signing chains.
/// @param publicKeyX secp256k1 public key x-coordinate.
/// @param publicKeyY secp256k1 public key y-coordinate.
/// @param imageHash Multiproof-compatible image hash derived from MRTD and RTMR0-3.
/// @param reportDataPrefix First 32 bytes of TDREPORT.REPORTDATA.
struct TDXVerifierJournal {
TDXTcbStatus tcbStatus;
uint64 timestamp;
uint64 collateralExpiration;
bytes32 rootCaHash;
bytes32 publicKeyX;
bytes32 publicKeyY;
bytes32 imageHash;
bytes32 reportDataPrefix;
}

/// @title ITDXVerifier
/// @notice Interface for Intel TDX quote verification used by TDX-aware TEE prover registries.
interface ITDXVerifier {
/// @notice Verifies a ZK proof of Intel TDX DCAP quote verification and returns attested signer metadata.
/// @param output ABI-encoded TDXVerifierJournal public values from the ZK verifier guest.
/// @param proofBytes ZK proof bytes.
/// @return signer Ethereum address derived from the attested public key.
/// @return imageHash Multiproof-compatible image hash derived from MRTD and RTMR0-3.
function verify(
bytes calldata output,
bytes calldata proofBytes
)
external
view
returns (address signer, bytes32 imageHash);
}
2 changes: 1 addition & 1 deletion interfaces/L1/proofs/tee/ITEEProverRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface ITEEProverRegistry {
function deregisterSigner(address signer) external;
function isValidSigner(address signer) external view returns (bool);
function getRegisteredSigners() external view returns (address[] memory);
function getExpectedImageHash() external view returns (bytes32);
function getExpectedImageHash(uint8 teeType) external view returns (bytes32);
function initialize(
address initialOwner,
address initialManager,
Expand Down
8 changes: 7 additions & 1 deletion scripts/deploy/DeployConfig.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ contract DeployConfig is Script {
address public sp1Verifier;
address public superchainConfigGuardian;
address public superchainConfigIncidentResponder;
address public tdxVerifier;
address public teeChallenger;
address public teeProposer;

Expand All @@ -31,6 +32,8 @@ contract DeployConfig is Script {
bytes32 public multiproofConfigHash;
bytes32 public multiproofGenesisOutputRoot;
bytes32 public teeImageHash;
bytes32 public teeNitroImageHash;
bytes32 public teeTdxImageHash;
bytes32 public zkAggregationHash;
bytes32 public zkRangeHash;

Expand Down Expand Up @@ -75,14 +78,17 @@ contract DeployConfig is Script {
sp1Verifier = _json.readAddress("$.sp1Verifier");
superchainConfigGuardian = _json.readAddress("$.superchainConfigGuardian");
superchainConfigIncidentResponder = _json.readAddress("$.superchainConfigIncidentResponder");
tdxVerifier = _json.readAddressOr("$.tdxVerifier", address(0));
teeChallenger = _json.readAddress("$.teeChallenger");
teeProposer = _json.readAddress("$.teeProposer");

fundDevAccounts = _json.readBoolOr("$.fundDevAccounts", false);

multiproofConfigHash = _json.readBytes32("$.multiproofConfigHash");
multiproofGenesisOutputRoot = _json.readBytes32("$.multiproofGenesisOutputRoot");
teeImageHash = _json.readBytes32("$.teeImageHash");
teeImageHash = _json.readBytes32Or("$.teeImageHash", bytes32(0));
teeNitroImageHash = _json.readBytes32Or("$.teeNitroImageHash", teeImageHash);
teeTdxImageHash = _json.readBytes32Or("$.teeTdxImageHash", teeImageHash);
zkAggregationHash = _json.readBytes32("$.zkAggregationHash");
zkRangeHash = _json.readBytes32("$.zkRangeHash");

Expand Down
27 changes: 20 additions & 7 deletions scripts/deploy/SystemDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { AggregateVerifier } from "src/L1/proofs/AggregateVerifier.sol";
import { TEEProverRegistry } from "src/L1/proofs/tee/TEEProverRegistry.sol";
import { TEEVerifier } from "src/L1/proofs/tee/TEEVerifier.sol";
import { INitroEnclaveVerifier } from "interfaces/L1/proofs/tee/INitroEnclaveVerifier.sol";
import { ITDXVerifier } from "interfaces/L1/proofs/tee/ITDXVerifier.sol";
import { ISP1Verifier } from "interfaces/L1/proofs/zk/ISP1Verifier.sol";
import { ZKVerifier } from "src/L1/proofs/zk/ZKVerifier.sol";
import { Constants } from "src/libraries/Constants.sol";
Expand Down Expand Up @@ -72,12 +73,14 @@ contract SystemDeploy is Script {
uint256 withdrawalDelaySeconds;
uint256 proofMaturityDelaySeconds;
uint256 disputeGameFinalityDelaySeconds;
bytes32 teeImageHash;
bytes32 teeNitroImageHash;
bytes32 teeTdxImageHash;
bytes32 zkRangeHash;
bytes32 zkAggregationHash;
bytes32 multiproofConfigHash;
uint256 multiproofGameType;
address nitroEnclaveVerifier;
address tdxVerifier;
uint256 multiproofBlockInterval;
uint256 multiproofIntermediateBlockInterval;
ISP1Verifier sp1Verifier;
Expand Down Expand Up @@ -120,7 +123,8 @@ contract SystemDeploy is Script {
IDelayedWETH delayedWETH;
IVerifier teeVerifier;
IVerifier zkVerifier;
bytes32 teeImageHash;
bytes32 teeNitroImageHash;
bytes32 teeTdxImageHash;
bytes32 zkRangeHash;
bytes32 zkAggregationHash;
bytes32 multiproofConfigHash;
Expand Down Expand Up @@ -257,12 +261,14 @@ contract SystemDeploy is Script {
withdrawalDelaySeconds: cfg.delayedWETHWithdrawalDelay(),
proofMaturityDelaySeconds: cfg.proofMaturityDelaySeconds(),
disputeGameFinalityDelaySeconds: cfg.disputeGameFinalityDelaySeconds(),
teeImageHash: cfg.teeImageHash(),
teeNitroImageHash: cfg.teeNitroImageHash(),
teeTdxImageHash: cfg.teeTdxImageHash(),
zkRangeHash: cfg.zkRangeHash(),
zkAggregationHash: cfg.zkAggregationHash(),
multiproofConfigHash: cfg.multiproofConfigHash(),
multiproofGameType: cfg.multiproofGameType(),
nitroEnclaveVerifier: cfg.nitroEnclaveVerifier(),
tdxVerifier: cfg.tdxVerifier(),
multiproofBlockInterval: cfg.multiproofBlockInterval(),
multiproofIntermediateBlockInterval: cfg.multiproofIntermediateBlockInterval(),
sp1Verifier: ISP1Verifier(cfg.sp1Verifier()),
Expand Down Expand Up @@ -961,7 +967,9 @@ contract SystemDeploy is Script {

vm.broadcast(msg.sender);
output_.teeProverRegistryImpl = new TEEProverRegistry(
INitroEnclaveVerifier(_input.nitroEnclaveVerifier), _output.disputeGameFactoryProxy
INitroEnclaveVerifier(_input.nitroEnclaveVerifier),
ITDXVerifier(_input.tdxVerifier),
_output.disputeGameFactoryProxy
);

output_.teeProverRegistryProxy =
Expand Down Expand Up @@ -1003,7 +1011,8 @@ contract SystemDeploy is Script {
delayedWETH: _output.delayedWETHProxy,
teeVerifier: output_.teeVerifier,
zkVerifier: output_.zkVerifier,
teeImageHash: _input.teeImageHash,
teeNitroImageHash: _input.teeNitroImageHash,
teeTdxImageHash: _input.teeTdxImageHash,
zkRangeHash: _input.zkRangeHash,
zkAggregationHash: _input.zkAggregationHash,
multiproofConfigHash: _input.multiproofConfigHash,
Expand Down Expand Up @@ -1033,7 +1042,8 @@ contract SystemDeploy is Script {
_input.delayedWETH,
_input.teeVerifier,
_input.zkVerifier,
_input.teeImageHash,
_input.teeNitroImageHash,
_input.teeTdxImageHash,
AggregateVerifier.ZkHashes(_input.zkRangeHash, _input.zkAggregationHash),
_input.multiproofConfigHash,
_input.l2ChainId,
Expand Down Expand Up @@ -1066,14 +1076,17 @@ contract SystemDeploy is Script {
}

function _assertValidMultiproofInput(ImplementationInput memory _input) internal view {
require(_input.teeImageHash != bytes32(0), "SystemDeploy: teeImageHash not set");
require(_input.teeNitroImageHash != bytes32(0), "SystemDeploy: teeNitroImageHash not set");
require(_input.teeTdxImageHash != bytes32(0), "SystemDeploy: teeTdxImageHash not set");
require(_input.zkRangeHash != bytes32(0), "SystemDeploy: zkRangeHash not set");
require(_input.zkAggregationHash != bytes32(0), "SystemDeploy: zkAggregationHash not set");
require(_input.multiproofConfigHash != bytes32(0), "SystemDeploy: multiproofConfigHash not set");
require(_input.multiproofGameType != 0, "SystemDeploy: multiproofGameType not set");
require(_input.nitroEnclaveVerifier != address(0), "SystemDeploy: nitroEnclaveVerifier not set");
require(_input.tdxVerifier != address(0), "SystemDeploy: tdxVerifier not set");
require(address(_input.sp1Verifier) != address(0), "SystemDeploy: sp1Verifier not set");
DeployUtils.assertValidContractAddress(_input.nitroEnclaveVerifier);
DeployUtils.assertValidContractAddress(_input.tdxVerifier);
DeployUtils.assertValidContractAddress(address(_input.sp1Verifier));
require(_input.multiproofBlockInterval != 0, "SystemDeploy: multiproof block interval not set");
require(
Expand Down
Loading
Loading