Daniel Goh

VeilChain: A Zig-based quantum-resistant shielded PoW testnet prototype

by

VeilChain is a Zig-based blockchain node. Today it already includes a functional Proof-of-Work loop (Blake3-backed header hashing), an ASERT-like difficulty retargeting hook, chain append/validation checks, and a local multi-node testnet runner you can launch from the CLI (status, mine, testnet). It also ships early ledger primitives (note commitment, nullifier derivation + nullifier set, and a commitment tree) as foundations for the later shielded transaction + proof system work.


What’s implemented right now:

  • Consensus foundation (prototype): PoW header hashing + meetsTarget() and a working mining loop

  • Chain logic: genesis + sequential append validation (prev_hash, height, pow target)

  • Difficulty retargeting (prototype): ASERT-like target adjustment utility used by the chain

  • Testnet runner: local “multi-node” simulation that mines blocks across nodes

  • Ledger primitives (foundation): note commitments, nullifier derivation/set, simple commitment tree root

Why this matters:
If you’re building toward post-quantum and shielded-chain designs, you need an execution layer that’s deterministic and testable. VeilChain provides a real, runnable base in Zig so the next milestones (p2p connectivity, persistence, shielded transaction circuit/proofs, full RPC surface) can be added incrementally without losing correctness.


How to try it (from the repo):

```bash
zig build

zig build test

zig build test-integration

zig build run -- status

zig build run -- mine 5

zig build run -- testnet 3 3
```

GitHub: https://github.com/gorusys/veilchain
WhitePaper: https://raw.githubusercontent.com/gorusys/veilchain/main/whitepaper/VeilChain_Whitepaper_v1.0.pdf

Next milestones: persistent storage + canonical chain/reorg handling, authenticated QUIC p2p, full shielded transaction proof verification, mempool + fee market, and wallet/RPC compatibility.

8 views

Add a comment

Replies

Be the first to comment