Skip to content

Commit

Permalink
Apply review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
thealmarty authored and thealmarty committed Oct 29, 2024
1 parent a9612c4 commit a41f80d
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ After the Valida compiler is successfully installed, run the following command i
cargo +valida build --release
```

This is in active development. If you get compilation errors, run `git pull`, `cargo clean`, `cargo update`and try again.

If you get the following error:

```bash
Expand All @@ -20,15 +22,27 @@ error: toolchain 'valida' is not installable
Run [this script](https://github.com/lita-xyz/valida-toolchain/blob/main/install-rust) from the Valida repo to add the Valida compiler to `rustc`.

## Proving a block
After successful compilation, the binary will be in `target/delendum-unknown-baremetal-gnu/release/reth-valida`. One can prove a block by running the binary in Valida, with the block data input `input.bin` (obtained from running `prepare_block`, more details to follow). To do this, run the following commands in the `valida-toolchain` directory:
After successful compilation, the binary will be in `target/delendum-unknown-baremetal-gnu/release/reth-valida`. One can prove a block by running the binary in Valida, with the block data input `input.bin` (obtained from running `prepare_block`, more details to follow). To do this, run this command in the `valida-toolchain` directory:

```bash
./valida/target/release/valida run ../reth-valida/target/delendum-unknown-baremetal-gnu/release/reth-valida log ../prepare_block/input.bin
```

Alternatively, run the built binary in a `valida-shell` with the block data input file:

```bash
./valida/target/release/valida run ../reth-valida/target/delendum-unknown-baremetal-gnu/debug/reth-valida log ../prepare_block/input.bin
>valida run <path to reth-valida binary> log <path to input.bin>
```

## Preparing block data
To prepare the block data, clone the [prepare_block](https://github.com/lita-xyz/prepare_block) repository and run the following command (see also its [README](https://github.com/lita-xyz/prepare_block/blob/main/README.md)):

Note that `prepare_block` is not intended to be compiled with the Valida compiler because it has features that are not supported by the Valida compiler. Use the standard Rust toolchain to compile and run `prepare_block`.

```bash
cargo run -- --rpc-url "<RPC URL>" --block-number <block number>
```

The output will be in the current directory as `input.bin`.

This is in active development. If you get compilation errors, run `git pull`, `cargo clean`, `cargo update`and try again.

0 comments on commit a41f80d

Please sign in to comment.