Skip to content

Commit b078046

Browse files
Merge 60b37dc into d603f66
2 parents d603f66 + 60b37dc commit b078046

File tree

3 files changed

+12
-30
lines changed

3 files changed

+12
-30
lines changed

contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

contracts/src/core/AlignedProofAggregationService.sol

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ contract AlignedProofAggregationService is
3333
/// https://dev.risczero.com/api/blockchain-integration/contracts/verifier#contract-addresses
3434
address public risc0VerifierAddress;
3535

36-
/// @notice whether we are in dev mode or not
37-
/// if the sp1 verifier address is set to this address, then we skip verification
38-
address public constant VERIFIER_MOCK_ADDRESS = address(0xFF);
39-
4036
/// The unique identifier (image ID) of the RISC Zero aggregator program.
4137
/// This ensures that only proofs generated by a trusted Risc0 program can be verified.
4238
bytes32 public risc0AggregatorProgramImageId;
@@ -73,10 +69,7 @@ contract AlignedProofAggregationService is
7369
{
7470
(bytes32 merkleRoot) = abi.decode(sp1PublicValues, (bytes32));
7571

76-
// In dev mode, proofs are mocked, so we skip the verification part
77-
if (_isSP1VerificationEnabled()) {
78-
ISP1Verifier(sp1VerifierAddress).verifyProof(sp1AggregatorProgramVKHash, sp1PublicValues, sp1ProofBytes);
79-
}
72+
ISP1Verifier(sp1VerifierAddress).verifyProof(sp1AggregatorProgramVKHash, sp1PublicValues, sp1ProofBytes);
8073

8174
aggregatedProofs[merkleRoot] = true;
8275
emit AggregatedProofVerified(merkleRoot, blobVersionedHash);
@@ -88,13 +81,10 @@ contract AlignedProofAggregationService is
8881
{
8982
(bytes32 merkleRoot) = abi.decode(risc0JournalBytes, (bytes32));
9083

91-
// In dev mode, proofs are mocked, so we skip the verification part
92-
if (_isRisc0VerificationEnabled()) {
93-
bytes32 risc0JournalDigest = sha256(risc0JournalBytes);
94-
IRiscZeroVerifier(risc0VerifierAddress).verify(
95-
risc0ReceiptSeal, risc0AggregatorProgramImageId, risc0JournalDigest
96-
);
97-
}
84+
bytes32 risc0JournalDigest = sha256(risc0JournalBytes);
85+
IRiscZeroVerifier(risc0VerifierAddress).verify(
86+
risc0ReceiptSeal, risc0AggregatorProgramImageId, risc0JournalDigest
87+
);
9888

9989
aggregatedProofs[merkleRoot] = true;
10090
emit AggregatedProofVerified(merkleRoot, blobVersionedHash);
@@ -125,14 +115,6 @@ contract AlignedProofAggregationService is
125115
return aggregatedProofs[merkleRoot];
126116
}
127117

128-
function _isSP1VerificationEnabled() internal view returns (bool) {
129-
return sp1VerifierAddress != VERIFIER_MOCK_ADDRESS;
130-
}
131-
132-
function _isRisc0VerificationEnabled() internal view returns (bool) {
133-
return risc0VerifierAddress != VERIFIER_MOCK_ADDRESS;
134-
}
135-
136118
function _authorizeUpgrade(address newImplementation)
137119
internal
138120
override

0 commit comments

Comments
 (0)