@@ -37,6 +37,12 @@ contract AggregateVerifier is Clone, ReentrancyGuard, ISemver {
3737 ZK
3838 }
3939
40+ /// @notice Hashes for the ZK proving programs.
41+ struct ZkHashes {
42+ bytes32 rangeHash;
43+ bytes32 aggregateHash;
44+ }
45+
4046 ////////////////////////////////////////////////////////////////
4147 // Constants //
4248 ////////////////////////////////////////////////////////////////
@@ -77,8 +83,11 @@ contract AggregateVerifier is Clone, ReentrancyGuard, ISemver {
7783 /// @notice The ZK prover.
7884 IVerifier public immutable ZK_VERIFIER;
7985
80- /// @notice The hash of the ZK image.
81- bytes32 public immutable ZK_IMAGE_HASH;
86+ /// @notice The hash of the ZK range program.
87+ bytes32 public immutable ZK_RANGE_HASH;
88+
89+ /// @notice The hash of the ZK aggregate program.
90+ bytes32 public immutable ZK_AGGREGATE_HASH;
8291
8392 /// @notice The hash of the rollup configuration.
8493 bytes32 public immutable CONFIG_HASH;
@@ -247,7 +256,7 @@ contract AggregateVerifier is Clone, ReentrancyGuard, ISemver {
247256 /// @param teeVerifier The TEE verifier.
248257 /// @param zkVerifier The ZK verifier.
249258 /// @param teeImageHash The hash of the TEE image.
250- /// @param zkImageHash The hash of the ZK image .
259+ /// @param zkHashes The hashes of the ZK range and aggregate programs .
251260 /// @param configHash The hash of the rollup configuration.
252261 /// @param l2ChainId The chain ID of the L2 network.
253262 /// @param blockInterval The block interval.
@@ -260,7 +269,7 @@ contract AggregateVerifier is Clone, ReentrancyGuard, ISemver {
260269 IVerifier teeVerifier ,
261270 IVerifier zkVerifier ,
262271 bytes32 teeImageHash ,
263- bytes32 zkImageHash ,
272+ ZkHashes memory zkHashes ,
264273 bytes32 configHash ,
265274 uint256 l2ChainId ,
266275 uint256 blockInterval ,
@@ -283,7 +292,8 @@ contract AggregateVerifier is Clone, ReentrancyGuard, ISemver {
283292 TEE_VERIFIER = teeVerifier;
284293 ZK_VERIFIER = zkVerifier;
285294 TEE_IMAGE_HASH = teeImageHash;
286- ZK_IMAGE_HASH = zkImageHash;
295+ ZK_RANGE_HASH = zkHashes.rangeHash;
296+ ZK_AGGREGATE_HASH = zkHashes.aggregateHash;
287297 CONFIG_HASH = configHash;
288298 L2_CHAIN_ID = l2ChainId;
289299 BLOCK_INTERVAL = blockInterval;
@@ -910,12 +920,12 @@ contract AggregateVerifier is Clone, ReentrancyGuard, ISemver {
910920 endingL2SequenceNumber,
911921 intermediateRoots,
912922 CONFIG_HASH,
913- ZK_IMAGE_HASH
923+ ZK_RANGE_HASH
914924 )
915925 );
916926
917927 // Validate the proof.
918- if (! ZK_VERIFIER.verify (proofBytes, ZK_IMAGE_HASH , journal)) revert InvalidProof ();
928+ if (! ZK_VERIFIER.verify (proofBytes, ZK_AGGREGATE_HASH , journal)) revert InvalidProof ();
919929 }
920930
921931 /// @notice Returns the status of the parent game.
0 commit comments