A Rust workspace for the Plinko PIR stack: Ethereum state extraction, iPRF + hint generation, and formal verification artifacts.
- Speed: Directly reads the MDBX database using
reth-db, bypassing RPC overhead. - Efficiency: Streams data to the output files with minimal memory footprint.
- State Tree Support: Extracts both Accounts and Storage Slots into a unified flat database format suitable for PIR.
# Build all release binaries
cargo build --release
# Run plinko
./target/release/plinko \
--db-path /path/to/reth/db \
--output-dir ./data \
--limit 1000000 # Optional: Extract subset for testing--db-path: Path to the Reth database (default:/var/lib/reth/mainnet/db).--output-dir: Output directory (default:data).--limit: (Optional) Limit the number of accounts/slots extracted (for testing).
The extractor produces five files:
database.bin: Flat array of 40-byte entries (v3 schema)account-mapping.bin:Address(20) || Index(4)storage-mapping.bin:Address(20) || SlotKey(32) || Index(4)code_store.bin:[count: u32][hash0: 32B]...metadata.json: snapshot metadata and schema version
Full layout details and size breakdowns: docs/data_format.md.
- O(1) hint search via iPRF
- Optimal query time trade-off O~(n/r)
- O(1) update time via XOR deltas
- Ethereum-scale practicality
- GPU-accelerated hint generation
More detail: docs/protocol_overview.md.
- Mainnet v3 snapshot + sizes:
docs/data_format.md - Regression data (legacy v2):
docs/data_format.md
- Protocol overview:
docs/protocol_overview.md - Data format and datasets:
docs/data_format.md - Hint generation:
docs/hint_generation.md - Update strategy:
docs/update_strategy.md - Benchmarks:
docs/benchmarks.md - Verification:
docs/verification.md
- Paper: docs/2024-318.pdf - Original academic paper
- Parsed Paper (machine-readable JSON):
- plinko_paper_index.json - Document structure
- plinko_paper_part2_technical.json - Technical foundations
- plinko_paper_part3_scheme.json - Plinko scheme details
- plinko_paper_part6_algorithms.json - Pseudocode
- Coq Formalization: docs/Plinko.v - Mechanized proofs and reference implementation
- Ops Docs:
- Plinko: Single-Server PIR with Efficient Updates - Vitalik Buterin's overview
- Plinko Paper (ePrint 2024/318) - Academic paper by Mughees, Shi, and Chen
- Morris-Rogaway 2013 - Swap-or-Not small-domain PRP construction
Alex Hoover: Plinko - Single-Server PIR with Efficient Updates via Invertible PRFs