Skip to content

Commit de495b2

Browse files
committed
Merge branch 'staging' into feat/proof-aggregator-upgrade-scripts
2 parents 33ff32a + 42c7549 commit de495b2

Some content is hidden

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

42 files changed

+4096
-237
lines changed

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
source /home/runner/.bashrc
3232
~/.sp1/bin/sp1up
3333
34+
- name: Install risc0 toolchain
35+
run: |
36+
curl -L https://risczero.com/install | bash
37+
source ~/.bashrc
38+
~/.risc0/bin/rzup install
39+
3440
- name: Cache Rust dependencies
3541
uses: actions/cache@v3
3642
with:
@@ -70,7 +76,8 @@ jobs:
7076
- name: Run Clippy on AggregationMode
7177
run: |
7278
cd aggregation_mode
73-
cargo clippy --all -- -D warnings
79+
# We need to skip the build as clippy does not support the riscv32im-risc0-zkvm-elf target
80+
RISC0_SKIP_BUILD=1 cargo clippy --all -- -D warnings
7481
7582
test:
7683
runs-on: aligned-runner
@@ -89,6 +96,12 @@ jobs:
8996
source /home/runner/.bashrc
9097
~/.sp1/bin/sp1up
9198
99+
- name: Install risc0 toolchain
100+
run: |
101+
curl -L https://risczero.com/install | bash
102+
source ~/.bashrc
103+
~/.risc0/bin/rzup install
104+
92105
- name: Cache Rust dependencies
93106
uses: actions/cache@v3
94107
with:

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@
3434
[submodule "contracts/lib/sp1-contracts"]
3535
path = contracts/lib/sp1-contracts
3636
url = https://github.com/succinctlabs/sp1-contracts
37+
[submodule "contracts/lib/risc0-ethereum"]
38+
path = contracts/lib/risc0-ethereum
39+
url = https://github.com/risc0/risc0-ethereum

Makefile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,24 @@ anvil_start_with_more_prefunded_accounts:
151151
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7 -a 2000
152152

153153
__AGGREGATION_MODE__: ## ____
154-
start_proof_aggregator_local: ## Start the proof aggregator locally using Mock Verifier Contract
155-
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release -- config-files/config-proof-aggregator-mock.yaml
156154

157-
start_proof_aggregator_local_with_proving: ## Start the proof aggregator locally using SP1 Verifier Contract
158-
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove -- config-files/config-proof-aggregator.yaml
155+
is_aggregator_set:
156+
@if [ -z "$(AGGREGATOR)" ]; then \
157+
echo "Error: AGGREGATOR is not set. Please provide arg AGGREGATOR='sp1' or 'risc0'."; \
158+
exit 1; \
159+
fi
160+
161+
start_proof_aggregator_dev: is_aggregator_set ## Starts proof aggregator with mock proofs (DEV mode)
162+
AGGREGATOR=$(AGGREGATOR) RISC0_DEV_MODE=1 cargo run --manifest-path ./aggregation_mode/Cargo.toml --release -- config-files/config-proof-aggregator-mock.yaml
163+
164+
start_proof_aggregator: is_aggregator_set ## Starts proof aggregator with proving activated
165+
AGGREGATOR=$(AGGREGATOR) cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove -- config-files/config-proof-aggregator.yaml
166+
167+
start_proof_aggregator_gpu: is_aggregator_set ## Starts proof aggregator with proving + GPU acceleration (CUDA)
168+
AGGREGATOR=$(AGGREGATOR) SP1_PROVER=cuda cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove,gpu -- config-files/config-proof-aggregator.yaml
169+
170+
install_aggregation_mode: ## Install the aggregation mode with proving enabled
171+
cargo install --path aggregation_mode --features prove
159172

160173
_AGGREGATOR_:
161174

@@ -703,11 +716,11 @@ upgrade_proof_aggregator:
703716
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/upgrade_proof_aggregator.sh
704717

705718
build_aligned_contracts:
706-
@cd contracts/src/core && forge build
719+
@cd contracts/src/core && forge build --via-ir
707720

708721
show_aligned_error_codes:
709722
@echo "\nAlignedLayerServiceManager errors:"
710-
@cd contracts && forge inspect src/core/IAlignedLayerServiceManager.sol:IAlignedLayerServiceManager errors
723+
@cd contracts && forge inspect src/core/IAlignedLayerServiceManager.sol:IAlignedLayerServiceManager errors
711724
@echo "\nBatcherPaymentService errors:"
712725
@cd contracts && forge inspect src/core/BatcherPaymentService.sol:BatcherPaymentService errors
713726

0 commit comments

Comments
 (0)