Skip to content

Commit 09cc63c

Browse files
Merge branch 'staging' into feataggmode/add-grafana-dashboard
2 parents dad51de + 864d2ef commit 09cc63c

File tree

12 files changed

+137
-15
lines changed

12 files changed

+137
-15
lines changed

Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,12 @@ agg_mode_gateway_send_payment:
335335
0x922D6956C99E12DFeB3224DEA977D0939758A1Fe \
336336
--private-key 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
337337

338-
agg_mode_gateway_send_sp1_proof:
339-
@cargo run --manifest-path aggregation_mode/cli/Cargo.toml -- submit sp1 \
340-
--proof scripts/test_files/sp1/sp1_fibonacci_5_0_0.proof \
341-
--vk scripts/test_files/sp1/sp1_fibonacci_5_0_0_vk.bin \
342-
--private-key "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
338+
339+
agg_mode_install_cli: ## Install the aggregation mode CLI
340+
@cargo install --path aggregation_mode/cli
341+
342+
agg_mode_task_sender_start: agg_mode_install_cli ## Send proofs to agg mode gateway
343+
@. scripts/.agg_mode.task_sender.env && . ./scripts/agg_mode_send_sp1_proof_interval.sh
343344

344345
agg_mode_get_quotas:
345346
curl -X GET http://127.0.0.1:8089/quotas/0x70997970C51812dc3A010C7d01b50e0d17dc79C8
@@ -997,6 +998,10 @@ upgrade_proof_aggregator: ## Upgrade ProofAggregator contract. Parameters: NETWO
997998
@echo "Upgrading ProofAggregator Contract on $(NETWORK) network..."
998999
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/upgrade_proof_aggregator.sh
9991000

1001+
deploy_agg_mode_payment_service:
1002+
@echo "Deploying Agg Mode Payment Service contract on $(NETWORK) network..."
1003+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_agg_mode_payment_service.sh
1004+
10001005
__SP1_FFI__: ##
10011006
build_sp1_macos:
10021007
@cd operator/sp1/lib && cargo build $(RELEASE_FLAG)

aggregation_mode/gateway/src/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize};
44

55
#[derive(Clone, Debug, Deserialize, Serialize)]
66
pub struct Config {
7+
pub ip: String,
78
pub port: u16,
89
pub db_connection_url: String,
910
pub network: String,

aggregation_mode/gateway/src/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl GatewayServer {
7777
.route("/proof/risc0", web::post().to(Self::post_proof_risc0))
7878
.route("/quotas/{address}", web::get().to(Self::get_quotas))
7979
})
80-
.bind(("127.0.0.1", port))
80+
.bind((self.config.ip.as_str(), port))
8181
.expect("To bind socket correctly")
8282
.run()
8383
.await

aggregation_mode/sdk/src/types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::str::FromStr;
33
#[derive(Debug, Clone)]
44
pub enum Network {
55
Devnet,
6+
Hoodi,
67
}
78

89
#[derive(Debug, Clone)]
@@ -15,6 +16,7 @@ impl FromStr for Network {
1516
fn from_str(s: &str) -> Result<Self, Self::Err> {
1617
match s.to_lowercase().as_str() {
1718
"devnet" => Ok(Self::Devnet),
19+
"hoodi" => Ok(Self::Hoodi),
1820
_ => Err(NetworkError::InvalidNetwork),
1921
}
2022
}
@@ -24,12 +26,14 @@ impl Network {
2426
pub fn chain_id(&self) -> u64 {
2527
match self {
2628
Self::Devnet => 31_337,
29+
Self::Hoodi => 56_0048,
2730
}
2831
}
2932

3033
pub fn gateway_url(&self) -> String {
3134
match self {
3235
Self::Devnet => "http://127.0.0.1:8089".to_string(),
36+
Self::Hoodi => "http://hoodi.gateway.alignedlayer.com:8080".to_string(),
3337
}
3438
}
3539
}

config-files/config-agg-mode-gateway-ethereum-package.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
ip: "127.0.0.1"
12
port: 8089
23
db_connection_url: "postgres://postgres:postgres@localhost:5435/"
34
eth_rpc_url: "http://localhost:8545"
45
payment_service_address: "0x922D6956C99E12DFeB3224DEA977D0939758A1Fe"
56
network: "devnet"
6-
max_daily_proofs_per_user: 100
7+
max_daily_proofs_per_user: 32
78
last_block_fetched_filepath: "config-files/proof-aggregator.last_block_fetched.json"
89

910
# Metrics

config-files/config-agg-mode-gateway.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ip: "127.0.0.1"
12
port: 8089
23
db_connection_url: "postgres://postgres:postgres@localhost:5435/"
34
eth_rpc_url: "http://localhost:8545"

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@
55
"alignedAggregatorAddress": "0x7EB3B63A4F3e7810Cc9bbc346749E2491Da4D7Cc"
66
},
77
"programs_id": {
8-
"sp1AggregationProgramVKHash": "0x00a18429d092a8e1f58aea6ff650ad715ad4e6d7056600bb201d38460244507b",
9-
"risc0AggregationProgramImageId": "0x4cc11a4ac146ce4fc71493d694a9707194316cbb609603a195ffbe0c4c099c97"
8+
"sp1AggregationProgramVKHash": "0x00d6e32a34f68ea643362b96615591c94ee0bf99ee871740ab2337966a4f77af",
9+
"risc0AggregationProgramImageId": "0x8908f01022827e80a5de71908c16ee44f4a467236df20f62e7c994491629d74c"
10+
},
11+
"amounts": {
12+
"amountToPayInWei": 1000000000000000,
13+
"paymentExpirationTimeSeconds": 2592000,
14+
"subscriptionLimit": 100,
15+
"maxSubscriptionTimeAhead": 7776000
1016
},
1117
"permissions": {
12-
"owner": "0xF138043AC49a0cbB1C8fF03433B51861eA0AE927"
18+
"owner": "0x8F2485805f174048855878593D323Bcfcf813149",
19+
"paymentServiceOwner": "0x8F2485805f174048855878593D323Bcfcf813149",
20+
"paymentServiceAdmin": "0x7E55B3c57027B60021B643e176e08b1ce3deAA61",
21+
"recipient": "0xe321E05030a9ffF10a4cbBa4aDF4F38814c7c59B"
1322
}
1423
}
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"addresses": {
3-
"alignedProofAggregationService": "0xEFeD2fd949995BE1a1C7f61AbFC0A33412c37f95",
4-
"alignedProofAggregationServiceImplementation": "0x11F1aB1521074868fC3c2EFf78c2cD228eA58EdC"
3+
"alignedProofAggregationService": "0x6B34AAaE780A5EAB4c91AB8F54f2a421E9c2FB59",
4+
"alignedProofAggregationServiceImplementation": "0x82c4F7cFD952851cC0Da84F476b710e3846f3b5d",
5+
"aggregationModePaymentService": "0x7222E0183cE1A96619d0c883e9bfc6b76D4e780e",
6+
"aggregationModePaymentServiceImplementation": "0x964e0c891C1F4583C3EC9366704406a06dFAb401"
57
}
6-
}
8+
}
9+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
# ENV VARIABLES
4+
#
5+
# PROOF_AGGREGATOR_DEPLOY_CONFIG_PATH: Path to the proof aggregator deploy config file
6+
# - Holesky Stage: ./script/deploy/config/holesky/proof-aggregator-service.holesky.config.stage.json
7+
# - Holesky Prod: ./script/deploy/config/holesky/proof-aggregator-service.holesky.config.json
8+
# - Sepolia: ./script/deploy/config/sepolia/proof-aggregator-service.sepolia.config.json
9+
#
10+
# PROOF_AGGREGATOR_OUTPUT_PATH: Path to the proof aggregator output file
11+
# - Holesky Stage: ./script/output/holesky/proof_aggregation_service_deployment_output.stage.json
12+
# - Holesky Prod: ./script/output/holesky/proof_aggregation_service_deployment_output.json
13+
# - Sepolia: ./script/output/sepolia/proof_aggregation_service_deployment_output.json
14+
#
15+
# RPC_URL: The RPC URL to connect to the Ethereum network
16+
#
17+
# PRIVATE_KEY: The private key to use for the deployment
18+
#
19+
# ETHERSCAN_API_KEY: The Etherscan API key to use for verification
20+
#
21+
22+
# cd to the directory of this script so that this can be run from anywhere
23+
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
24+
# At this point we are in contracts/scripts
25+
cd "$parent_path"
26+
27+
# At this point we are in contracts
28+
cd ../
29+
30+
# Deploy agg mode payment service contract
31+
forge script script/deploy/AggregationModePaymentServiceDeployer.s.sol \
32+
$PROOF_AGGREGATOR_DEPLOY_CONFIG_PATH \
33+
$PROOF_AGGREGATOR_OUTPUT_PATH \
34+
--rpc-url $RPC_URL \
35+
--private-key $PRIVATE_KEY \
36+
--broadcast \
37+
--verify \
38+
--etherscan-api-key $ETHERSCAN_API_KEY \
39+
--slow \
40+
--sig "run(string configPath, string outputPath)" \
41+
--via-ir

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 "0x0769eb53"
6-
@verifySp1_solidity_signature "0x96f7966f"
5+
@verifyRisc0_solidity_signature "0xbe96ce93"
6+
@verifySp1_solidity_signature "0x39ad96d9"
77

88
config_file_path =
99
case @aligned_config_file do

0 commit comments

Comments
 (0)