Skip to content

Commit b47e4e2

Browse files
committed
Merge remote-tracking branch 'origin/staging' into feat/zisk-aggregator
2 parents 51de3c9 + deab06b commit b47e4e2

68 files changed

Lines changed: 2662 additions & 2312 deletions

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: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- ".github/workflows/build-and-test-rust.yml"
1414

1515
jobs:
16-
build:
16+
build-and-test:
1717
runs-on: aligned-runner
1818

1919
steps:
@@ -26,6 +26,9 @@ jobs:
2626
components: rustfmt, clippy
2727
override: true
2828

29+
- name: foundry-toolchain
30+
uses: foundry-rs/foundry-toolchain@v1.2.0
31+
2932
# Reference: https://github.com/succinctlabs/sp1/actions/runs/8886659400/workflow#L61-L65
3033
- name: Install sp1 toolchain
3134
run: |
@@ -82,47 +85,13 @@ jobs:
8285
# We need to skip the build as clippy does not support the riscv32im-risc0-zkvm-elf target
8386
RISC0_SKIP_BUILD=1 cargo clippy --all -- -D warnings
8487
85-
test:
86-
runs-on: aligned-runner
87-
needs: build
88-
steps:
89-
- name: Checkout code
90-
uses: actions/checkout@v4
91-
92-
- name: foundry-toolchain
93-
uses: foundry-rs/foundry-toolchain@v1.2.0
94-
95-
# Reference: https://github.com/succinctlabs/sp1/actions/runs/8886659400/workflow#L61-L65
96-
- name: Install sp1 toolchain
97-
run: |
98-
curl -L https://sp1.succinct.xyz | bash
99-
source /home/runner/.bashrc
100-
~/.sp1/bin/sp1up
101-
102-
- name: Install risc0 toolchain
103-
run: |
104-
curl -L https://risczero.com/install | bash
105-
source ~/.bashrc
106-
~/.risc0/bin/rzup install
107-
108-
- name: Cache Rust dependencies
109-
uses: actions/cache@v3
110-
with:
111-
path: |
112-
~/.cargo/registry
113-
~/.cargo/git
114-
crates/target
115-
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
116-
restore-keys: |
117-
${{ runner.os }}-rust-
118-
11988
- name: Run Batcher tests
12089
run: |
12190
cd crates
12291
cargo test --all
12392
12493
- name: Run AggregationMode tests
12594
run: |
126-
cd aggregation_mode/proof_aggregator && cargo test
95+
cd aggregation_mode/proof_aggregator && SKIP_AGG_PROGRAMS_BUILD=1 cargo test
12796
cd ../gateway && cargo test
12897
cd ../payments_poller && cargo test

Makefile

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -277,30 +277,18 @@ proof_aggregator_start_gpu_ethereum_package: is_aggregator_set reset_last_aggreg
277277

278278
verify_aggregated_proof_sp1:
279279
@echo "Verifying SP1 in aggregated proofs on $(NETWORK)..."
280-
@cd crates/cli/ && \
281-
cargo run verify-agg-proof \
280+
@cd aggregation_mode/cli/ && \
281+
cargo run verify-on-chain \
282282
--network $(NETWORK) \
283+
--beacon-url $(BEACON_URL) \
284+
--rpc-url $(RPC_URL) \
283285
--from-block $(FROM_BLOCK) \
284-
--proving_system SP1 \
285-
--public_input ../../scripts/test_files/sp1/sp1_fibonacci_5_0_0.pub \
286-
--program-id-file ../../scripts/test_files/sp1/sp1_fibonacci_5_0_0.vk \
287-
--beacon_url $(BEACON_URL) \
288-
--rpc_url $(RPC_URL)
289-
290-
verify_aggregated_proof_risc0:
291-
@echo "Verifying RISC0 in aggregated proofs on $(NETWORK)..."
292-
@cd crates/cli/ && \
293-
cargo run verify-agg-proof \
294-
--network $(NETWORK) \
295-
--from-block $(FROM_BLOCK) \
296-
--proving_system Risc0 \
297-
--program-id-file ../../scripts/test_files/risc_zero/fibonacci_proof_generator/fibonacci_id_3_0_3.bin \
298-
--public_input ../../scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci_3_0_3.pub \
299-
--beacon_url $(BEACON_URL) \
300-
--rpc_url $(RPC_URL)
286+
--proving-system SP1 \
287+
--vk-hash ../../scripts/test_files/sp1/sp1_fibonacci_5_0_0.vk \
288+
--public-inputs ../../scripts/test_files/sp1/sp1_fibonacci_5_0_0.pub
301289

302290
proof_aggregator_install: ## Install the aggregation mode with proving enabled
303-
cargo install --path aggregation_mode --features prove,gpu --bin proof_aggregator_gpu --locked
291+
cargo install --path aggregation_mode/proof_aggregator --features prove,gpu --bin proof_aggregator_gpu --locked
304292

305293
proof_aggregator_write_program_ids: ## Write proof aggregator zkvm programs ids
306294
@cd aggregation_mode/proof_aggregator && ./scripts/build_programs.sh
@@ -331,9 +319,11 @@ agg_mode_payments_poller_start_ethereum_package: agg_mode_run_migrations
331319

332320
AGG_MODE_SENDER ?= 0x70997970C51812dc3A010C7d01b50e0d17dc79C8
333321
agg_mode_gateway_send_payment:
334-
@cast send --value 1ether \
335-
0x922D6956C99E12DFeB3224DEA977D0939758A1Fe \
336-
--private-key 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
322+
@cd aggregation_mode/cli && \
323+
cargo run --release -- deposit \
324+
--private-key 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d \
325+
--network devnet \
326+
--rpc-url http://localhost:8545
337327

338328
agg_mode_gateway_send_sp1_proof:
339329
@cargo run --manifest-path aggregation_mode/cli/Cargo.toml -- submit sp1 \

0 commit comments

Comments
 (0)