Skip to content
/ reva Public

A minimal implementation of ZKPs of Ethereum block execution using Reth. Supports both Ethereum and OP Stack.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

lita-xyz/reva

Repository files navigation

Reth Valida (ReVa)

A minimal implementation of generating zero-knowledge proofs of EVM block execution using Reth. Supports both Ethereum and OP Stack.

Caution

This repository is still an active work-in-progress and is not audited or meant for production usage.

Attribution

The basis for this work is the existing 'RSP' project by Succinct Labs.

Getting Started

To use ReVa, you must first have the Valida tools installed, which includes the Valida VM and Rust compiler. Then follow the instructions below.

Building the Host application

In the directory bin/host, run:

cargo +valida build --release

this will build the binary bin/host/target/release/reva for your host architecture.

Running the Host application

Running the host application will generate an input file to be used by the target/client application. Simply suppply a block number, a chain ID (1 for ethereum, 10 for OP), and an RPC URL:

./bin/host/target/release/reva --block-number 20000005 --chain-id 1 --rpc-url <RPC>

The host application executes the block while fetching additional data necessary for offline execution. All the data required to run the execution and verification logic inside the Valida VM is serialized into a file bin/host/input/<chain_id>/<block_no>.bin.

You can also run the host directly by running the following command:

cargo run --bin reva --release -- --block-number 20000005 --chain-id 1 --rpc-url <RPC>

Using client input

The client input generated by executing against RPC can be used by the respective target/client applications. To build these applications for the Valida VM, use the following commands:

Eth client

cd bin/client-eth
cargo +valida build --target=valida-unknown-baremetal-gnu --release

OP client

cd bin/client-op
cargo +valida build --target=valida-unknown-baremetal-gnu --release

Running/proving

To run each client application on the given input, simply use valida run like so:

valida run --fast target/valida-unknown-baremetal-gnu/release/reva-client-{op,eth} log < bin/host/input/<chain_id>/<block_no>.bin

To prove, use:

valida prove target/valida-unknown-baremetal-gnu/release/reva-client-{op,eth} log < bin/host/input/<chain_id>/<block_no>.bin

About

A minimal implementation of ZKPs of Ethereum block execution using Reth. Supports both Ethereum and OP Stack.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published