# Grandine zkVM Integration Study (2025-07-25)
Running grandine risc0 test state
1. `pectra-devnet-6 without epoch transition`
- **RISC0_DEV_MODE=1** (dev mode)
- cmd:
```
RISC0_DEV_MODE=1 RUST_LOG=info ./target/release/zkvm_host --test "pectra-devnet-6 without epoch transition" execute
```
- result:
```
INFO risc0_zkvm::host::server::exec::executor: execution time: 233.025777s
read input: 443847879
state transition: 3878333922
write output: 196300
elapsed: 204.54s
cycles: 4919394304
```
Take about **3m20s**.
- **RISC0_DEV_MODE=0** (generating a real proof)
- cmd:
```
RISC0_DEV_MODE=0 RUST_LOG=info ./target/release/zkvm_host --test "pectra-devnet-6 without epoch transition" execute
```
- result:
*cancelled after running for more than 4 hours*
2. `pectra-devnet-6 with epoch transition`
- **RISC0_DEV_MODE=1** (dev mode)
- cmd:
```
RISC0_DEV_MODE=1 RUST_LOG=info ./target/release/zkvm_host --test "pectra-devnet-6 wit epoch transition" execute
```
- result:
```
INFO risc0_zkvm::host::server::exec::executor: execution time: 1565.041949055s
read input: 443289185
state transition: 35890144311
write output: 177150
elapsed: 1565.34s
cycles: 39242432512
```
Take about **26m** to run!
3. `mainnet without epoch transition`
- **RISC0_DEV_MODE=1** (dev mode)
- cmd:
```
RISC0_DEV_MODE=1 RUST_LOG=info ./target/release/zkvm_host --test "mainnet without epoch transition" execute
```
- result:
*cancelled after running for more than 4 hours*
## About SimpleSerialize
- doc & specification: https://www.ssz.dev/
- for serialize and deserialize: https://simpleserialize.com/
- block stf format: https://github.com/ethereum/consensus-specs/blob/master/tests/formats/operations/README.md
This is how you decompress a ssz_snappy file:
```python
import snappy
import sys
with open(sys.argv[1], "rb") as in_stream:
compressed_data = in_stream.read()
decompressed_data = snappy.decompress(compressed_data)
with open(sys.argv[2], 'wb') as out_stream:
out_stream.write(decompressed_data)
```
This is the bash script to call the above python wrapper
```sh
#!/bin/bash
set -x
python ~/.local/bin/d-ssz-snappy.py "$@"
```
## Notes
- Running `prove` and `execute` subcommands take about the same time, but just returning different values. For `prove`, returning a tuple including the execution proof, for `execute`, a tuple including the execution stats report.
- I am running the above benchmark locally on a Macbook Air 2020 with M1 chip.