Skip to content

Commit 5c8700d

Browse files
authored
Merge branch 'testnet' into feat/script-send-proofs-with-random-address
2 parents 1240e0d + 14f831f commit 5c8700d

131 files changed

Lines changed: 22555 additions & 2624 deletions

File tree

Some content is hidden

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

.github/workflows/build-and-test-rust.yml

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches: ["*"]
88
paths:
99
- "batcher/**"
10+
- "aggregation_mode/**"
1011
- ".github/workflows/build-rust.yml"
1112

1213
jobs:
@@ -22,6 +23,14 @@ jobs:
2223
toolchain: stable
2324
components: rustfmt, clippy
2425
override: true
26+
27+
# Reference: https://github.com/succinctlabs/sp1/actions/runs/8886659400/workflow#L61-L65
28+
- name: Install sp1 toolchain
29+
run: |
30+
curl -L https://sp1.succinct.xyz | bash
31+
source /home/runner/.bashrc
32+
~/.sp1/bin/sp1up
33+
2534
- name: Cache Rust dependencies
2635
uses: actions/cache@v3
2736
with:
@@ -32,27 +41,54 @@ jobs:
3241
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
3342
restore-keys: |
3443
${{ runner.os }}-rust-
35-
- name: Check formatting of Rust projects
44+
45+
- name: Check formatting of Batcher
3646
run: |
3747
cd batcher
3848
cargo fmt --all -- --check
39-
- name: Run Clippy
49+
50+
- name: Run Clippy on Batcher
4051
run: |
4152
cd batcher
4253
cargo clippy --all -- -D warnings
43-
- name: Build Rust projects
54+
55+
- name: Build Batcher
4456
run: |
4557
cd batcher
4658
cargo build --all
4759
60+
- name: Check formatting of AggregationMode
61+
run: |
62+
cd aggregation_mode
63+
cargo fmt --all -- --check
64+
65+
- name: Build AggregationMode # We build before clippy to generate the ELF
66+
run: |
67+
cd aggregation_mode
68+
cargo build --all
69+
70+
- name: Run Clippy on AggregationMode
71+
run: |
72+
cd aggregation_mode
73+
cargo clippy --all -- -D warnings
74+
4875
test:
4976
runs-on: aligned-runner
5077
needs: build
5178
steps:
5279
- name: Checkout code
5380
uses: actions/checkout@v4
81+
5482
- name: foundry-toolchain
5583
uses: foundry-rs/foundry-toolchain@v1.2.0
84+
85+
# Reference: https://github.com/succinctlabs/sp1/actions/runs/8886659400/workflow#L61-L65
86+
- name: Install sp1 toolchain
87+
run: |
88+
curl -L https://sp1.succinct.xyz | bash
89+
source /home/runner/.bashrc
90+
~/.sp1/bin/sp1up
91+
5692
- name: Cache Rust dependencies
5793
uses: actions/cache@v3
5894
with:
@@ -63,7 +99,13 @@ jobs:
6399
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
64100
restore-keys: |
65101
${{ runner.os }}-rust-
66-
- name: Run tests
102+
103+
- name: Run Batcher tests
67104
run: |
68105
cd batcher
69106
cargo test --all
107+
108+
- name: Run AggregationMode tests
109+
run: |
110+
cd aggregation_mode
111+
cargo test --all

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ batcher/aligned/batch_inclusion_responses/*
1212
**/broadcast
1313
volume
1414
config-files/*.last_processed_batch.json
15+
config-files/*.last_aggregated_block.json
1516

1617
nonce_*.bin
1718

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@
3131
[submodule "claim_contracts/lib/openzeppelin-contracts"]
3232
path = claim_contracts/lib/openzeppelin-contracts
3333
url = https://github.com/OpenZeppelin/openzeppelin-contracts
34+
[submodule "contracts/lib/sp1-contracts"]
35+
path = contracts/lib/sp1-contracts
36+
url = https://github.com/succinctlabs/sp1-contracts

Makefile

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ CONFIG_FILE?=config-files/config.yaml
77
export OPERATOR_ADDRESS ?= $(shell yq -r '.operator.address' $(CONFIG_FILE))
88
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml
99

10-
OPERATOR_VERSION=v0.15.1
10+
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
12-
EIGEN_SDK_GO_VERSION_MAINNET=v0.1.13
13+
EIGEN_SDK_GO_VERSION_MAINNET=v0.2.0-beta.1
1314

1415
ifeq ($(OS),Linux)
1516
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
@@ -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_sp1_contracts:
83+
@echo "Deploying SP1 Contracts..."
84+
. contracts/scripts/anvil/deploy_sp1_contracts.sh
85+
7886
anvil_deploy_aligned_contracts:
7987
@echo "Deploying Aligned Contracts..."
8088
. contracts/scripts/anvil/deploy_aligned_contracts.sh
@@ -146,6 +154,13 @@ anvil_start_with_more_prefunded_accounts:
146154
@echo "Starting Anvil..."
147155
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7 -a 2000
148156

157+
__AGGREGATION_MODE__: ## ____
158+
start_proof_aggregator_local: ## Start the proof aggregator locally using Mock Verifier Contract
159+
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release -- config-files/config-proof-aggregator-mock.yaml
160+
161+
start_proof_aggregator_local_with_proving: ## Start the proof aggregator locally using SP1 Verifier Contract
162+
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove -- config-files/config-proof-aggregator.yaml
163+
149164
_AGGREGATOR_:
150165

151166
build_aggregator:
@@ -179,7 +194,9 @@ operator_set_eigen_sdk_go_version_testnet:
179194
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_TESTNET)"
180195
go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_TESTNET)
181196

182-
operator_set_eigen_sdk_go_version_devnet: operator_set_eigen_sdk_go_version_mainnet
197+
operator_set_eigen_sdk_go_version_devnet:
198+
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_DEVNET)"
199+
go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_DEVNET)
183200

184201
operator_set_eigen_sdk_go_version_mainnet:
185202
@echo "Setting Eigen SDK version to: $(EIGEN_SDK_GO_VERSION_MAINNET)"
@@ -589,7 +606,6 @@ aligned_get_user_balance_holesky:
589606
--network holesky \
590607
--user_addr $(USER_ADDR)
591608

592-
593609
__GENERATE_PROOFS__:
594610
# TODO add a default proving system
595611

@@ -689,6 +705,10 @@ upgrade_batcher_payment_service: ## Upgrade BatcherPayments contract. Parameters
689705
@echo "Upgrading BatcherPayments Contract on $(NETWORK) network..."
690706
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/upgrade_batcher_payment_service.sh
691707

708+
deploy_proof_aggregator:
709+
@echo "Deploying ProofAggregator contract on $(NETWORK) network..."
710+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_proof_aggregator.sh
711+
692712
build_aligned_contracts:
693713
@cd contracts/src/core && forge build
694714

0 commit comments

Comments
 (0)