stark_evm_adapter 0.1.2

a lib/CLI for adapting STARK proofs for verification on the EVM
Documentation

STARK-EVM adapter

stark-evm-adapter is a library that provides a set of utilities to parse and manipulate the output of the STARK stone proof. Specifically, the library can be used to generate a "split proof", which is necessary for proofs to be verified on Ethereum.

[dependencies]
stark-evm-adapter = "0.1.0"

Example

use stark_evm_adapter::annotation_parser::AnnotatedProof;

// read an annotated proof
let file = std::fs::File::open("tests/fixtures/annotated_proof.json").unwrap();
let reader = std::io::BufReader::new(file);
let annotated_proof: AnnotatedProof = serde_json::from_reader(reader).unwrap();

// split the proof
let split_proofs = split_fri_merkle_statements(annotated_proof).unwrap();
println!("{}", serde_json::to_string_pretty(&split_proofs).unwrap());

CLI demo

Installation

cargo install stark_evm_adapter

Usage

stark-evm-adapter --help

To generate an annotated proof based on the outputs of the stone-prover:

stark-evm-adapter gen-annotated-proof \
    --stone-proof-file tests/fixtures/stone_proof.json \
    --stone-annotation-file tests/fixtures/stone_proof_annotation.txt \
    --stone-extra-annotation-file tests/fixtures/stone_proof_annotation_extra.txt \
    --output annotated_proof.json

The annotated proof originates from 3 file outputs of the stone-prover.

stone_proof.json comes from the cpu_air_prover command, while the annotation files come from the cpu_air_verifier command with arguments annotation_file and extra_output_file.

Once the annotated_proof.json is generated, this command will transform it to split proofs which then can be used to submit to L1 EVM verifiers:

stark-evm-adapter split-proof \
    --annotated-proof-file ./annotated_proof.json \
    --output split_proofs.json