Skip to content

Commit bdb337d

Browse files
committed
Merge branch 'staging' into feat/verify-agg-proof-on-chain
2 parents 1eb9512 + 5607821 commit bdb337d

File tree

4 files changed

+44
-5
lines changed

4 files changed

+44
-5
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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,27 @@ contract AlignedProofAggregationService is
150150
/// @param _risc0VerifierAddress The new address for the Risc0 verifier contract
151151
function setRisc0VerifierAddress(address _risc0VerifierAddress) external onlyOwner {
152152
risc0VerifierAddress = _risc0VerifierAddress;
153+
emit Risc0VerifierAddressUpdated(_risc0VerifierAddress);
153154
}
154155

155156
/// @notice Sets the image id of the Risc0 program
156157
/// @param _risc0AggregatorProgramImageId The new imageid for the Risc0 aggregator program
157158
function setRisc0AggregatorProgramImageId(bytes32 _risc0AggregatorProgramImageId) external onlyOwner {
158159
risc0AggregatorProgramImageId = _risc0AggregatorProgramImageId;
160+
emit Risc0AggregatorProgramImageIdUpdated(_risc0AggregatorProgramImageId);
161+
}
162+
163+
/// @notice Sets the address of the SP1 verifier contract
164+
/// @param _sp1VerifierAddress The new address for the SP1 verifier contract
165+
function setSP1VerifierAddress(address _sp1VerifierAddress) external onlyOwner {
166+
sp1VerifierAddress = _sp1VerifierAddress;
167+
emit SP1VerifierAddressUpdated(_sp1VerifierAddress);
159168
}
160169

161170
/// @notice Sets the vk hash of the sp1 program
162171
/// @param _sp1AggregatorProgramVKHash The new vk hash for the sp1 aggregator program
163172
function setSP1AggregatorProgramVKHash(bytes32 _sp1AggregatorProgramVKHash) external onlyOwner {
164173
sp1AggregatorProgramVKHash = _sp1AggregatorProgramVKHash;
174+
emit SP1AggregatorProgramVKHashUpdated(_sp1AggregatorProgramVKHash);
165175
}
166176
}

contracts/src/core/IAlignedProofAggregationService.sol

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
pragma solidity ^0.8.12;
22

33
interface IAlignedProofAggregationService {
4+
5+
/// @notice event that gets emitted after a successful aggregated proof verification
6+
event AggregatedProofVerified(bytes32 indexed merkleRoot, bytes32 blobVersionedHash);
7+
8+
/// @notice Event emitted when the Risc0 verifier address is updated
9+
event Risc0VerifierAddressUpdated(address indexed newAddress);
10+
11+
/// @notice Event emitted when the SP1 verifier address is updated
12+
event SP1VerifierAddressUpdated(address indexed newAddress);
13+
14+
/// @notice Event emitted when the Risc0 aggregator program image ID is updated
15+
event Risc0AggregatorProgramImageIdUpdated(bytes32 indexed newImageId);
16+
17+
/// @notice Event emitted when the SP1 aggregator program VK hash is updated
18+
event SP1AggregatorProgramVKHashUpdated(bytes32 indexed newVKHash);
19+
420
/// @notice Method to verify an aggregated proof from aligned
521
/// @dev This function is called by the aligned proof aggregator after collecting the proofs and aggregating them
622
/// to be verified on-chain. We expect the blobTransactionHash to be called before
@@ -18,8 +34,21 @@ interface IAlignedProofAggregationService {
1834
view
1935
returns (bool);
2036

21-
/// @notice event that gets emitted after a successful aggregated proof verification
22-
event AggregatedProofVerified(bytes32 indexed merkleRoot, bytes32 blobVersionedHash);
37+
/// @notice Sets the address of the Risc0 verifier contract
38+
/// @param _risc0VerifierAddress The new address for the Risc0 verifier contract
39+
function setRisc0VerifierAddress(address _risc0VerifierAddress) external;
40+
41+
/// @notice Sets the image id of the Risc0 program
42+
/// @param _risc0AggregatorProgramImageId The new imageid for the Risc0 aggregator program
43+
function setRisc0AggregatorProgramImageId(bytes32 _risc0AggregatorProgramImageId) external;
44+
45+
/// @notice Sets the address of the SP1 verifier contract
46+
/// @param _sp1VerifierAddress The new address for the SP1 verifier contract
47+
function setSP1VerifierAddress(address _sp1VerifierAddress) external;
48+
49+
/// @notice Sets the vk hash of the sp1 program
50+
/// @param _sp1AggregatorProgramVKHash The new vk hash for the sp1 aggregator program
51+
function setSP1AggregatorProgramVKHash(bytes32 _sp1AggregatorProgramVKHash) external;
2352

2453
error OnlyAlignedAggregator(address sender);
2554
}

explorer/lib/explorer/contract_managers/aligned_proof_aggregation_service.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ defmodule AlignedProofAggregationService do
22
require Logger
33

44
@aligned_config_file System.get_env("ALIGNED_PROOF_AGG_CONFIG_FILE")
5-
@verifyRisc0_solidity_signature "0x015f8668"
6-
@verifySp1_solidity_signature "0x39c94cbf"
5+
@verifyRisc0_solidity_signature "0x54687ccf"
6+
@verifySp1_solidity_signature "0xf6e04ac4"
77

88
config_file_path =
99
case @aligned_config_file do

0 commit comments

Comments
 (0)