Skip to content

chore: update sp1 version + use compressed sp1 proofs + docs to generate sp1 proofs and verify them on aligned#240

Merged
taturosati merged 27 commits intomainfrom
232-docs-zero-to-sp1
Jun 3, 2024
Merged

chore: update sp1 version + use compressed sp1 proofs + docs to generate sp1 proofs and verify them on aligned#240
taturosati merged 27 commits intomainfrom
232-docs-zero-to-sp1

Conversation

@taturosati
Copy link
Copy Markdown
Contributor

@taturosati taturosati commented May 29, 2024

  • Updated sp1 version to v1.0.4-testnet
  • Use verify_compressed instead of verify
    • Had to regenerate test proofs using prove_compressed
  • Docs on how to generate sp1 proofs and then verify them on aligned

How to test

Follow docs on README.md (copied below). The only caveat is you will have to use localhost instead of batcher.alignedlayer.com, since version with verify compressed is not deployed yet.

SP1

Dependencies

This guide assumes that:

  • sp1 prover installed (instructions here)
  • sp1 project to generate the proofs (instructions here)
  • aligned layer repository cloned:
    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:

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:

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>

@taturosati taturosati linked an issue May 29, 2024 that may be closed by this pull request
@taturosati taturosati self-assigned this May 30, 2024
Comment thread README.md Outdated
@taturosati taturosati merged commit 0fac425 into main Jun 3, 2024
@taturosati taturosati deleted the 232-docs-zero-to-sp1 branch June 3, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: zero to sp1

3 participants