Primus โ a post-quantum Layer-1 blockchain in Rust (research project, ML-DSA-87 everywhere)
โ Rust ๐ 2026-07-03 ๐ค surdeus ๐๏ธ 1Spent the last few months building a Layer-1 blockchain from scratch as a way to go deep on post-quantum cryptography in a real system rather than a toy. A few things that might interest this crowd:
- No elliptic curves anywhere. Every signature โ transactions, peer identity, admin auth โ is ML-DSA-87 (NIST PQC standard). That means 2592-byte public keys and 4627-byte signatures flowing through everything, which forced some interesting stack-management work: ML-DSA-87 signing needs ~4 MiB of stack, so all crypto ops run on an explicit 16 MiB-stack thread to avoid
STATUS_STACK_OVERFLOWon Windows (and silent corruption on Linux under load). - No HTTP. P2P transport is QUIC + TCP with a custom Noise_XX handshake that binds the ephemeral session key to the peer's long-term ML-DSA-87 identity before any application data moves.
- Merkle-Patricia Trie state root with compact (~2 KB) inclusion/exclusion proofs for light clients โ went through two iterations to get proof size down from an initial ~25 KB.
- WASM smart contracts via Wasmtime under a strict 16 MiB memory / 512 KiB stack mandate, gas-metered host functions.
Workspace is ~7 crates (types โ storage โ vm โ core, with net-opt decoupled from core via a trait for dependency inversion). Repo: (GitHub - LeechoShoop/primus-project: Post-quantum Layer-1 blockchain in Rust โ ML-DSA-87 signatures, Noise_XX P2P transport over QUIC/TCP (no HTTP), Merkle-Patricia Trie state, WASM smart contracts. Solo research/portfolio project, not actively maintained. ยท GitHub)
This is a solo research project, not under active development going forward โ publishing it mainly for anyone curious how a PQ-native L1 fits together end to end, or who wants to pick it apart. Happy to answer questions about any of the design decisions above.
2 posts - 2 participants
๐ท๏ธ Rust_feed