Skip to content

Commit 618688f

Browse files
committed
Merge branch 'staging' into feat/aggregate-proofs-in-chunks
2 parents e957da2 + 0656d2b commit 618688f

File tree

44 files changed

+2943
-2508
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2943
-2508
lines changed

Makefile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export OPERATOR_ADDRESS ?= $(shell yq -r '.operator.address' $(CONFIG_FILE))
88
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml
99

1010
OPERATOR_VERSION=v0.15.2
11+
EIGEN_SDK_GO_VERSION_DEVNET=v0.1.13
1112
EIGEN_SDK_GO_VERSION_TESTNET=v0.2.0-beta.1
1213
EIGEN_SDK_GO_VERSION_MAINNET=v0.2.0-beta.1
1314

@@ -71,10 +72,17 @@ go_deps:
7172
install_foundry:
7273
curl -L https://foundry.paradigm.xyz | bash
7374

75+
install_eigenlayer_cli_devnet: ## Install Eigenlayer CLI v0.11.3 (Devnet compatible)
76+
curl -sSfL https://raw.githubusercontent.com/layr-labs/eigenlayer-cli/master/scripts/install.sh | sh -s -- v0.11.3
77+
7478
anvil_deploy_eigen_contracts:
7579
@echo "Deploying Eigen Contracts..."
7680
. contracts/scripts/anvil/deploy_eigen_contracts.sh
7781

82+
anvil_deploy_risc0_contracts:
83+
@echo "Deploying RISC0 Contracts..."
84+
. contracts/scripts/anvil/deploy_risc0_contracts.sh
85+
7886
anvil_deploy_sp1_contracts:
7987
@echo "Deploying SP1 Contracts..."
8088
. contracts/scripts/anvil/deploy_sp1_contracts.sh
@@ -167,6 +175,9 @@ start_proof_aggregator: is_aggregator_set ## Starts proof aggregator with provin
167175
start_proof_aggregator_gpu: is_aggregator_set ## Starts proof aggregator with proving + GPU acceleration (CUDA)
168176
AGGREGATOR=$(AGGREGATOR) SP1_PROVER=cuda cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove,gpu -- config-files/config-proof-aggregator.yaml
169177

178+
install_aggregation_mode: ## Install the aggregation mode with proving enabled
179+
cargo install --path aggregation_mode --features prove
180+
170181
_AGGREGATOR_:
171182

172183
build_aggregator:
@@ -200,7 +211,9 @@ operator_set_eigen_sdk_go_version_testnet:
200211
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_TESTNET)"
201212
go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_TESTNET)
202213

203-
operator_set_eigen_sdk_go_version_devnet: operator_set_eigen_sdk_go_version_mainnet
214+
operator_set_eigen_sdk_go_version_devnet:
215+
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_DEVNET)"
216+
go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_DEVNET)
204217

205218
operator_set_eigen_sdk_go_version_mainnet:
206219
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_MAINNET)"
@@ -708,6 +721,10 @@ deploy_proof_aggregator:
708721
@echo "Deploying ProofAggregator contract on $(NETWORK) network..."
709722
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_proof_aggregator.sh
710723

724+
upgrade_proof_aggregator:
725+
@echo "Upgrading ProofAggregator Contract on $(NETWORK) network..."
726+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/upgrade_proof_aggregator.sh
727+
711728
build_aligned_contracts:
712729
@cd contracts/src/core && forge build --via-ir
713730

aggregation_mode/src/aggregators/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ impl ZKVMEngine {
7373
ZKVMEngine::SP1 => {
7474
let proofs: Vec<SP1ProofWithPubValuesAndElf> = proofs
7575
.into_iter()
76+
// Fetcher already filtered for SP1
77+
// We do this for type casting, as to avoid using generics
78+
// or macros in this function
7679
.filter_map(|proof| match proof {
7780
AlignedProof::SP1(proof) => Some(*proof),
7881
_ => None,
@@ -111,6 +114,9 @@ impl ZKVMEngine {
111114
ZKVMEngine::RISC0 => {
112115
let proofs: Vec<Risc0ProofReceiptAndImageId> = proofs
113116
.into_iter()
117+
// Fetcher already filtered for Risc0
118+
// We do this for type casting, as to avoid using generics
119+
// or macros in this function
114120
.filter_map(|proof| match proof {
115121
AlignedProof::Risc0(proof) => Some(*proof),
116122
_ => None,

contracts/deployments/31337.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"CREATE2_SALT": "0x0000000000000000000000000000000000000000000000000000000000000009",
3-
"SP1_VERIFIER_GATEWAY_GROTH16": "0xbC42A182543d5AF01f51040955D149A74C015098",
4-
"V4_0_0_RC3_SP1_VERIFIER_GROTH16": "0x737A46c3A4579A452302130D762eFa66C6f81e28"
5-
}
3+
"SP1_VERIFIER_GATEWAY_GROTH16": "0xB146FbFdFeC2a5182b3Cef9becE03290224256D5",
4+
"V4_0_0_RC3_SP1_VERIFIER_GROTH16": "0x93a993C79738eA5D8836e42C6c422259684639Dc"
5+
}

contracts/remappings.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ forge-std/=lib/forge-std/src/
77
@openzeppelin-upgrades/contracts/=lib/eigenlayer-middleware/lib/openzeppelin-contracts-upgradeable/contracts/
88
@sp1-contracts/=lib/sp1-contracts/contracts/src/
99
@risc0-contracts/=lib/risc0-ethereum/contracts/src/
10+
openzeppelin/=lib/risc0-ethereum/lib/openzeppelin-contracts
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
pragma solidity ^0.8.20;
3+
4+
import {Script} from "forge-std/Script.sol";
5+
import {console2} from "forge-std/console2.sol";
6+
import {IRiscZeroVerifier} from "@risc0-contracts/IRiscZeroVerifier.sol";
7+
import {ControlID, RiscZeroGroth16Verifier} from "@risc0-contracts/groth16/RiscZeroGroth16Verifier.sol";
8+
9+
contract Risc0VerifierRouterDeployer is Script {
10+
function run() external {
11+
uint256 deployerKey = uint256(vm.envBytes32("DEPLOYER_PRIVATE_KEY"));
12+
13+
vm.startBroadcast(deployerKey);
14+
15+
IRiscZeroVerifier verifier = new RiscZeroGroth16Verifier(ControlID.CONTROL_ROOT, ControlID.BN254_CONTROL_ID);
16+
console2.log("Deployed RiscZeroGroth16Verifier to", address(verifier));
17+
18+
vm.stopBroadcast();
19+
}
20+
}

contracts/script/deploy/config/devnet/proof-aggregator-service.devnet.config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"address": {
3-
"sp1VerifierAddress": "0xbC42A182543d5AF01f51040955D149A74C015098",
4-
"risc0VerifierAddress": "0x00000000000000000000000000000000000000FF",
3+
"sp1VerifierAddress": "0xB146FbFdFeC2a5182b3Cef9becE03290224256D5",
4+
"risc0VerifierAddress": "0x663F3ad617193148711d28f5334eE4Ed07016602",
55
"alignedAggregatorAddress": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
66
"alignedAggregatorAddressPrivateKey": "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6"
77
},

contracts/script/deploy/config/holesky/proof-aggregator-service.holesky.config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"address": {
33
"sp1VerifierAddress": "0x397A5f7f3dBd538f23DE225B51f532c34448dA9B",
4+
"risc0VerifierAddress": "0xf70aBAb028Eb6F4100A24B203E113D94E87DE93C",
45
"alignedAggregatorAddress": "0x9403dF48130621f87974a5A1d1d11d3aF1222A82"
56
},
67
"permissions": {

contracts/script/deploy/config/holesky/proof-aggregator-service.holesky.config.stage.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"address": {
33
"sp1VerifierAddress": "0x397A5f7f3dBd538f23DE225B51f532c34448dA9B",
4+
"risc0VerifierAddress": "0xf70aBAb028Eb6F4100A24B203E113D94E87DE93C",
45
"alignedAggregatorAddress": "0x3595aa7d30f89f65933e7421dec77e4478d9fb01"
56
},
67
"permissions": {

contracts/script/deploy/config/mainnet/proof-aggregator-service.holesky.config.json renamed to contracts/script/deploy/config/mainnet/proof-aggregator-service.mainnet.config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"address": {
33
"sp1VerifierAddress": "0x397A5f7f3dBd538f23DE225B51f532c34448dA9B",
4+
"risc0VerifierAddress": "0x8EaB2D97Dfce405A1692a21b3ff3A172d593D319",
45
"alignedAggregatorAddress": "<aligned_aggregator_address>"
56
},
67
"permissions": {

contracts/script/deploy/config/mainnet_staging/proof-aggregator-service.holesky.config.json renamed to contracts/script/deploy/config/mainnet_staging/proof-aggregator-service.mainnet.config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"address": {
33
"sp1VerifierAddress": "0x397A5f7f3dBd538f23DE225B51f532c34448dA9B",
4+
"risc0VerifierAddress": "0x8EaB2D97Dfce405A1692a21b3ff3A172d593D319",
45
"alignedAggregatorAddress": "<aligned_aggregator_address>"
56
},
67
"permissions": {

0 commit comments

Comments
 (0)