Skip to content
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
3200e0c
feat: risc0 aggregation program
MarcosNicolau Apr 15, 2025
2f54502
feat: [wip] risc0 aggregator backend
MarcosNicolau Apr 15, 2025
62bfb60
feat: ProofAggregationService risc0 verification
MarcosNicolau Apr 15, 2025
c475a63
feat: error handling + fetch risc0 proofs
MarcosNicolau Apr 15, 2025
e2dcf30
feat: send risc0 aggregated proof to AlignedProofAggregationService c…
MarcosNicolau Apr 15, 2025
1c4440b
feat: deploy AlignedProofAggregationService contract with risc0 verifier
MarcosNicolau Apr 16, 2025
df1d83a
feat: allow risc0 succinct proofs
MarcosNicolau Apr 16, 2025
4bc1a52
chore: modified risc0 no_pub_inputs to generate a succinct proof inst…
MarcosNicolau Apr 16, 2025
56a9d87
feat: fetch proofs based on zkvm engine
MarcosNicolau Apr 16, 2025
09fbad3
feat: deploy risc0 groth16 verifier
MarcosNicolau Apr 16, 2025
6c544d0
chore: commands to start proof agregator based on verifier
MarcosNicolau Apr 16, 2025
fb0ed79
Merge branch 'feat/aggregation-mode-risc0' into feat/aggregation-mode…
MarcosNicolau Apr 16, 2025
85667e1
chore: anvil deploy target
MarcosNicolau Apr 16, 2025
4d77ae9
chore: update risc0 to v2.0.0
MarcosNicolau Apr 16, 2025
9a375ce
tmp update contract to send journal digest direclty instead of comput…
MarcosNicolau Apr 16, 2025
c57229a
chore: bump risc0-ethereum to v2.0.1
MarcosNicolau Apr 21, 2025
85ae0f6
debug: assert digest match
MarcosNicolau Apr 21, 2025
c5e330a
debug: using static image id
MarcosNicolau Apr 21, 2025
b137020
fix: compute image id bytes in little endian not in be
MarcosNicolau Apr 21, 2025
d0a4be6
feat: local verification of aggregated risc0 proof
MarcosNicolau Apr 21, 2025
8a70e50
chore: undo debug changes
MarcosNicolau Apr 21, 2025
8309ea8
Merge branch 'staging' into feat/aggregation-mode-risc0
MarcosNicolau Apr 21, 2025
b7198f7
Merge branch 'feat/aggregation-mode-risc0' into feat/aggregation-mode…
MarcosNicolau Apr 21, 2025
ad02b7b
chore: remove elf and imageid .sol files
MarcosNicolau Apr 21, 2025
369cdc6
chore: add gpu feature flag to run with cuda
MarcosNicolau Apr 21, 2025
54c35d0
Merge branch 'feat/aggregation-mode-risc0' into feat/aggregation-mode…
MarcosNicolau Apr 21, 2025
7720553
docs: add gpu command
MarcosNicolau Apr 21, 2025
ebdc910
chore: undo no_pub_input file changes
MarcosNicolau Apr 21, 2025
ef4419f
fix: risc0 remappings compilation
MarcosNicolau Apr 21, 2025
1b8873a
ci: fix contracts build + install risc0 toolchain
MarcosNicolau Apr 22, 2025
01f60f4
chore: better proof aggregator makefile targets
MarcosNicolau Apr 22, 2025
20b7d61
docs: update how to run proof aggregator readme
MarcosNicolau Apr 22, 2025
454f80c
ci: skip build on clippy
MarcosNicolau Apr 22, 2025
5e43630
chore: address clippy warnings
MarcosNicolau Apr 22, 2025
0b5f8a8
Merge branch 'feat/aggregation-mode-risc0' into feat/aggregation-mode…
MarcosNicolau Apr 22, 2025
a478287
chore: add risc0 verifier address for all networks
MarcosNicolau Apr 22, 2025
79eb6b3
fix: correctly setting risc0 tiny-keccak patch
MarcosNicolau Apr 23, 2025
bd5ad9d
chore: rename prove feature to proving to prevent collision with risc…
MarcosNicolau Apr 23, 2025
ef2b968
Revert "chore: rename prove feature to proving to prevent collision w…
MarcosNicolau Apr 23, 2025
319c112
chore: address juli's comments
MarcosNicolau Apr 23, 2025
ac646c6
refactor: replace sp1,risc0 features for .env variables
MarcosNicolau Apr 23, 2025
74f15be
chore: update makefile for new aggregator env config
MarcosNicolau Apr 23, 2025
e446794
Merge branch 'feat/aggregation-mode-risc0' into feat/aggregation-mode…
MarcosNicolau Apr 23, 2025
255b889
chore: rename configs to match chain
MarcosNicolau Apr 23, 2025
0828d98
chore: add --via-ir flag to risc0 anvil deploy
MarcosNicolau Apr 23, 2025
3e5c252
Merge branch 'staging' into feat/aggregation-mode-risc0-contracts
MarcosNicolau Apr 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/build-and-test-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ jobs:
source /home/runner/.bashrc
~/.sp1/bin/sp1up

- name: Install risc0 toolchain
run: |
curl -L https://risczero.com/install | bash
source /home/runner/.bashrc
/home/runner/.risc0/bin/rzup install

- name: Cache Rust dependencies
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -70,7 +76,8 @@ jobs:
- name: Run Clippy on AggregationMode
run: |
cd aggregation_mode
cargo clippy --all -- -D warnings
# We need to skip the build as clippy does not support the riscv32im-risc0-zkvm-elf target
RISC0_SKIP_BUILD=1 cargo clippy --all -- -D warnings

test:
runs-on: aligned-runner
Expand All @@ -89,6 +96,12 @@ jobs:
source /home/runner/.bashrc
~/.sp1/bin/sp1up

- name: Install risc0 toolchain
run: |
curl -L https://risczero.com/install | bash
source /home/runner/.bashrc
/home/runner/.risc0/bin/rzup install

- name: Cache Rust dependencies
uses: actions/cache@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@
[submodule "contracts/lib/sp1-contracts"]
path = contracts/lib/sp1-contracts
url = https://github.com/succinctlabs/sp1-contracts
[submodule "contracts/lib/risc0-ethereum"]
path = contracts/lib/risc0-ethereum
url = https://github.com/risc0/risc0-ethereum
26 changes: 20 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ anvil_deploy_eigen_contracts:
@echo "Deploying Eigen Contracts..."
. contracts/scripts/anvil/deploy_eigen_contracts.sh

anvil_deploy_risc0_contracts:
@echo "Deploying RISC0 Contracts..."
. contracts/scripts/anvil/deploy_risc0_contracts.sh

anvil_deploy_sp1_contracts:
@echo "Deploying SP1 Contracts..."
. contracts/scripts/anvil/deploy_sp1_contracts.sh
Expand Down Expand Up @@ -151,11 +155,21 @@ anvil_start_with_more_prefunded_accounts:
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7 -a 2000

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

start_proof_aggregator_local_with_proving: ## Start the proof aggregator locally using SP1 Verifier Contract
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove -- config-files/config-proof-aggregator.yaml
is_aggregator_set:
@if [ -z "$(AGGREGATOR)" ]; then \
echo "Error: AGGREGATOR is not set. Please provide arg AGGREGATOR='sp1' or 'risc0'."; \
exit 1; \
fi

start_proof_aggregator_dev: is_aggregator_set ## Starts proof aggregator with mock proofs (DEV mode)
RISC0_DEV_MODE=1 cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features $(AGGREGATOR) -- config-files/config-proof-aggregator-mock.yaml

start_proof_aggregator: is_aggregator_set ## Starts proof aggregator with proving activated
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove,$(AGGREGATOR) -- config-files/config-proof-aggregator.yaml

start_proof_aggregator_gpu: is_aggregator_set ## Starts proof aggregator with proving + GPU acceleration (CUDA)
SP1_PROVER=cuda cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove,gpu,$(AGGREGATOR) -- config-files/config-proof-aggregator.yaml

_AGGREGATOR_:

Expand Down Expand Up @@ -699,11 +713,11 @@ deploy_proof_aggregator:
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_proof_aggregator.sh

build_aligned_contracts:
@cd contracts/src/core && forge build
@cd contracts/src/core && forge build --via-ir

show_aligned_error_codes:
@echo "\nAlignedLayerServiceManager errors:"
@cd contracts && forge inspect src/core/IAlignedLayerServiceManager.sol:IAlignedLayerServiceManager errors
@cd contracts && forge inspect src/core/IAligedLayerServiceManager.sol:IAlignedLayerServiceManager errors
@echo "\nBatcherPaymentService errors:"
@cd contracts && forge inspect src/core/BatcherPaymentService.sol:BatcherPaymentService errors

Expand Down
Loading
Loading