Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
555d50e
chore: update sp1 version & regenerate test proofs
taturosati May 29, 2024
952331a
docs: generate sp1 proof & verify it in aligned
taturosati May 29, 2024
cc908d9
docs: add ws:// to prefix batcher url
taturosati May 29, 2024
4a7b049
Merge branch 'main' into 232-docs-zero-to-sp1
taturosati May 29, 2024
5d58161
fix: go sp1 test
taturosati May 29, 2024
9fe4e88
chore: commit sp1 proof
taturosati May 29, 2024
3d287fe
chore: add deps to github action
taturosati May 29, 2024
b764b54
chore: update sp1 version to v1.0.3-testnet
taturosati May 29, 2024
fef31e6
chore: test sp1 rust bindings on github action
taturosati May 29, 2024
a0d16e6
feat (operator): sp1 is no longer restricted by max proof size
taturosati May 30, 2024
a39575e
fix (operator): call to sp1 binding
taturosati May 30, 2024
79c5a59
debug: print statements to see failure on github action
taturosati May 30, 2024
10ecb5b
chore: update sp1 to v1.0.4-testnet
taturosati May 30, 2024
053a799
chore: sp1 is just cdylib
taturosati May 30, 2024
84447f3
fix (sp1): import lib.so on linux
taturosati May 30, 2024
59c02ae
Merge branch 'main' into 232-docs-zero-to-sp1
taturosati May 30, 2024
8a95886
chore: remove debug statements
taturosati May 30, 2024
d897359
Merge branch 'main' into 232-docs-zero-to-sp1
taturosati May 30, 2024
c721bc1
Merge branch 'main' into 232-docs-zero-to-sp1
taturosati May 30, 2024
f7e14fe
chore: remove unused dep libc
taturosati May 30, 2024
c109ab1
Merge branch 'origin/main' into '232-docs-zero-to-sp1'
taturosati May 31, 2024
fe2f3ea
Merge branch 'main' into 232-docs-zero-to-sp1
MauroToscano May 31, 2024
7533adb
Merge branch 'main' into 232-docs-zero-to-sp1
taturosati May 31, 2024
7e44fbc
chore: add proof generator address to send command
taturosati May 31, 2024
2637136
fix (readme): missing backslash on command
taturosati May 31, 2024
c7dabe2
fix (readme): batcher url
taturosati May 31, 2024
5213cbb
Merge branch 'main' into 232-docs-zero-to-sp1
jotabulacios Jun 3, 2024
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
12 changes: 2 additions & 10 deletions .github/workflows/test-sp1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,12 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Clear device space
run: |
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: false

- name: Test SP1 Rust
run: make test_sp1_rust_ffi
- name: Test SP1 go bindings
run: make test_sp1_go_bindings_linux
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,10 @@ __SP1_FFI__: ##
build_sp1_macos:
@cd operator/sp1/lib && cargo build --release
@cp operator/sp1/lib/target/release/libsp1_verifier_ffi.dylib operator/sp1/lib/libsp1_verifier.dylib
@cp operator/sp1/lib/target/release/libsp1_verifier_ffi.a operator/sp1/lib/libsp1_verifier.a

build_sp1_linux:
@cd operator/sp1/lib && cargo build --release
@cp operator/sp1/lib/target/release/libsp1_verifier_ffi.so operator/sp1/lib/libsp1_verifier.so
@cp operator/sp1/lib/target/release/libsp1_verifier_ffi.a operator/sp1/lib/libsp1_verifier.a

test_sp1_rust_ffi:
@echo "Testing SP1 Rust FFI source code..."
Expand Down
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,6 @@ If you want to have some data to see on it, you can start our infinite task send
make batcher_send_burst_groth16
```

</details>

## Tests

To run the go tests
Expand All @@ -773,6 +771,50 @@ To run the go tests
make test
```

# Verify Proofs

## SP1

### Dependencies
This guide assumes that:
- sp1 prover installed (instructions [here](https://succinctlabs.github.io/sp1/getting-started/install.html))
- sp1 project to generate the proofs (instructions [here](https://succinctlabs.github.io/sp1/generating-proofs/setup.html))
- aligned layer repository cloned:
```bash
git clone https://github.com/yetanotherco/aligned_layer.git
```

### How to generate a proof

> AlignedLayer only verifies SP1 in compressed version.
> You can check you are using compressed by opening script/src/main.rs
and check that the proof is generated with `client.prove_compressed` instead of `client.prove`.

First, open a terminal and navigate to the script folder in the sp1 project directory

Then, run the following command to generate a proof:
```bash
cargo run --release
```

### How to get the proof verified by AlignedLayer

After generating the proof, you will have to find two different files:
- proof file: usually found under `script` directory, with the name `proof.json` or similar
- elf file: usually found under `program/elf/` directory

Then, you can send the proof to the AlignedLayer network by running the following command
from `batcher/client` folder inside the AlignedLayer repository directory:

```bash
cargo run --release -- \
--proving_system SP1 \
--proof <proof_path> \
--vm_program <vm_program_path> \
--conn wss://batcher.alignedlayer.com \
--proof_generator_addr <proof_generator_addr>
```

## FAQ

### What is the objective of Aligned?
Expand Down
Loading