Brandon
Standalone Rust toolkit for Ethereum ERA/ERA1 archives.
✓ Read and stream ERA files
✓ Random-access blocks by slot
✓ Build new ERA archives
✓ Verify archive integrity
✓ Convert between archive layouts
✓ Zero-copy block iteration
✓ Works across Ethereum client implementations
$ brandon info mainnet-00000-5ec1ffb8.era1
Format: ERA1
File size: 3.71 MiB (3891337)
Starting slot: 0
Slot range: 0..8191
Block count: 8191
State present: no
Total entries: 32770
Entry breakdown:
BlockAccumulator 1
BlockBody 8192
BlockIndex 1
CompressedHeader 8192
Receipts 8192
TotalDifficulty 8192
Install
From source:
CLI
Inspect a file
Verify integrity
Read blocks
# Single block by slot
# Stream all blocks
# Extract blocks to directory
# Include beacon state (ERA files only)
Convert and restructure
# Rebuild indexes (fixes corrupt offsets without touching block data)
# Strip receipts to save disk space
# Strip everything except block headers
# Split into individual {slot}.snappy files
Build an ERA file
# From directory of {slot}.snappy files
# With beacon state
Library
Add to Cargo.toml:
[]
= "0.1"
Read a file
use ;
let file = open?;
let mut reader = new;
while let Some = reader.next_entry?
Random access by slot
use EraRandomReader;
let file = open?;
let mut reader = new?;
println!;
if let Some = reader.read_block_at_slot? else
Build an ERA file
use EraBuilder;
use FrameEncoder;
use Write;
let compressed = ;
let mut builder = new;
builder.add_block;
builder.set_state;
let mut output = create?;
builder.build?;
Convert and transform
use ;
use File;
// Reindex a file with corrupt offsets
let input = open?;
let output = create?;
reindex?;
// Strip receipts to save space
let input = open?;
let output = create?;
strip?;
// ERA1 to ERA synthesis (bring your own SSZ library)
use era1_to_era;
use Era1Block;
let input = open?;
let output = create?;
// Buffers are reused across all blocks—zero per-block allocation
era1_to_era?;
Verify a file
use verify_era;
let data = read?;
let result = verify_era;
if !result.valid
println!;
What it does
| CAPABILITY | DESCRIPTION |
|---|---|
| Read | Stream ERA/ERA1 files, random access by slot |
| Write | Build ERA files from compressed block data |
| Verify | Structural validation, index integrity, manifest hashes |
| Convert | Rebuild indexes, remove entries, extract block |
Format support
| FORMAT | SPEC | DESCRIPTION |
|---|---|---|
| ERA1 | e2store era1 | Pre-merge execution blocks |
| ERA | e2store era | Post-merge beacon chain |
| e2store | e2store | Container format |
Development
# Run tests
# Run CLI from source
# Build release binary
License
MIT OR Apache-2.0