Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting Started

Welcome to the Void Reference Implementation! This guide will help you set up the project, run local examples, and start building your own applications using the provided modular architecture. Whether you're interested in TEE-style attestation or ZK proving, you'll find step-by-step instructions below.

Prerequisites

  • Linux (tested on Ubuntu)
  • Rust toolchain (via rustup) and Cargo
  • Foundry (forge, anvil, cast)

More detailed setup instructions

Clone the repo

git clone https://github.com/essential-contributions/void-reference-impl.git
cd void-reference-impl

Repo Layout

  • app-swap/: Example app implementation
    • core/: Pure Rust state machine and read-only queries
    • contracts/: Solidity contracts and deploy scripts
  • void/: Shared libraries and tools
    • void-core/: primitives for events, types, hashes, and state stores (binary Merkle trie, ZK witness variants)
    • void-node/: generic node runtime (fetchers, archivers, state buffers, JSON-RPC router and Axum server glue)
    • void-contracts/: reusable Solidity building blocks and interfaces
  • e2e/: runnable examples with nodes (that run the app code) and testing scripts (TEE and ZK flavors)
  • benchmarks/: performance benchmarks for ZK proving and raw single-threaded transaction processing throughput

What's Next

Feel free to start by running the Benchmarks and/or Tests locally (see benchmarks/ and e2e/).

Next, you can dive deeper into understanding the core code of the example app (see app-swap/). Feel free to use it as a reference for building your own app:

  • Copy app-swap/ into a new crate, implement your domain-specific events and state transition function.
  • Keep the same state pattern (Binary Merkle Trie store) so you can reuse the node and proofs.
  • Adjust queries.rs to add read-only helpers your node will expose over JSON-RPC.
  • Update the contracts in app-swap/contracts to match your app’s actions.

You can also dig around the repo for more documentation, including architecture overviews and details about Nodes.