Skip to content

Commit ff12d58

Browse files
committed
chore: add config files + make commands
1 parent 7d4e14b commit ff12d58

File tree

5 files changed

+27
-7
lines changed

5 files changed

+27
-7
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@ anvil_start_with_block_time_with_more_prefunded_accounts:
150150
@echo "Starting Anvil..."
151151
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7 -a 2000
152152

153+
__AGGREGATION_MODE__:
154+
start_proof_aggregator_local:
155+
cargo run --manifest-path ./aggregation-mode/Cargo.toml --release -- config-files/config-proof-aggregator.yaml
156+
157+
start_proof_aggregator_local_with_proving:
158+
cd aggregation-mode && \
159+
cargo run --manifest-path ./aggregation-mode/Cargo.toml --release --features prove -- config-files/config-proof-aggregator.yaml
160+
153161
_AGGREGATOR_:
154162

155163
build_aggregator:
@@ -588,7 +596,6 @@ aligned_get_user_balance_holesky:
588596
--network holesky \
589597
--user_addr $(USER_ADDR)
590598

591-
592599
__GENERATE_PROOFS__:
593600
# TODO add a default proving system
594601

aggregation-mode/readme.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ make deploy_aligned_contracts
1313
make anvil_start_with_block_time
1414
```
1515

16-
2. Compile and run aggregator (this might take long as it uses more aggressive optimization leves):
16+
3. Start proof aggregator:
1717
```shell
18-
cd aggregation-mode
19-
# This will compile with a mock prover
20-
cargo run --release
21-
# This will run the prover (requires powerful machine)
22-
cargo build --release --features prove
18+
# This will not run a real prover but a mocked
19+
make start_proof_aggregator_local
20+
# This will run an actual prover (requires powerful machine)
21+
make start_proof_aggregator_local_with_proving
2322
```
23+
24+
Note: it might take a while to compile as it uses more aggressive optimization levels.

aggregation-mode/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ async fn main() {
2929

3030
// init proof aggregator
3131
let config_file_path = read_config_filepath_from_args();
32+
tracing::info!("Loading config from {}..", config_file_path);
3233
let config = Config::from_file(&config_file_path).expect("Config is valid");
3334
let mut proof_aggregator = ProofAggregator::new(config);
35+
tracing::info!("Config loaded proof aggregator initialized");
3436

3537
// push some proofs from fs
3638
for _ in 0..2 {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"099dcf35ae8034b4184e1dfd0c1d9eec"},"ciphertext":"4ff6a86d5203e6496eee64e613f717ef087ffd0ac027911693214edc2142d7e3","kdf":"scrypt","kdfparams":{"dklen":32,"n":8192,"p":1,"r":8,"salt":"6b1afc37be33d7fbfc6e0fc536430838d01b13668f4fcc2a31b7dc8442647d53"},"mac":"7ddbaaad2be3b53bc5791250c350fc73fb181991a3fc958ef096b3f18060935e"},"id":"44d59152-aaf8-4d50-a412-1653bbaad7c4","version":3}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
proof_aggregation_service_address: "0xcbEAF3BDe82155F56486Fb5a1072cb8baAf547cc"
2+
private_key: "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6"
3+
eth_rpc_url: "http://localhost:8545"
4+
max_proofs_in_queue: 2
5+
submit_proofs_every_secs: 10
6+
7+
ecdsa:
8+
private_key_store_path: "config-files/anvil.proof-aggregator.ecdsa.key.json"
9+
private_key_store_password: ""

0 commit comments

Comments
 (0)