Skip to content

trusts-stack-network/trust-stack-network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Trust Stack Network

Trust Stack Network (TSN)

Post-quantum privacy blockchain
Plonky2 STARKs • ML-DSA-65 • Poseidon2 • Shielded Transactions

Version Rust Tests Testnet License

WebsiteWhitepaperWhitepaper PDFDocsBlogExplorerNetwork Simulation


What is TSN?

Trust Stack Network is a Layer 1 blockchain designed from the ground up for privacy and post-quantum security. Every transaction is shielded by default using zero-knowledge proofs, and all cryptographic primitives are quantum-resistant — protecting funds against both classical and future quantum adversaries.

Key Features

Feature Description
Plonky2 STARKs Hash-based zero-knowledge proofs — no trusted setup, truly post-quantum
ML-DSA-65 (FIPS 204) NIST post-quantum digital signatures for all transactions and blocks
SLH-DSA (FIPS 205) Stateless hash-based signatures as secondary post-quantum layer
Poseidon2 ZK-friendly hash function over the Goldilocks field, 3x faster than Poseidon
Shielded Transactions Amounts and addresses hidden by default via ZK commitments and nullifiers
UTXO Model Bitcoin-inspired unspent transaction outputs with privacy
MIK Consensus Mining Identity Key — Proof of Work with anti-Sybil protection
Kademlia DHT Decentralized peer discovery with gossip-based block propagation

Security Model

TSN is designed to be fully quantum-safe — not just signatures, but the entire transaction privacy stack:

Attack Vector Protection
Forge signatures ML-DSA-65 (NIST PQ standard)
Break ZK proofs Plonky2 STARKs (hash-based, no elliptic curves)
Crack commitments Poseidon over Goldilocks field
Brute force hashes Poseidon2 (256-bit security)
Sybil mining MIK identity bound to blockchain

Mining Identity Key (MIK)

Every miner must register a Mining Identity Key before mining:

  • Derived from their ML-DSA-65 public key: MIK_ID = SHA-256("TSN_MIK_ID_v1" || pubkey || block_height)
  • One active MIK per public key — prevents Sybil attacks
  • Lifecycle: registration → activation delay (10 blocks) → active → optional expiry/revocation
  • Block signatures verified against the miner's registered MIK

Architecture

┌──────────────────────────────────────────────────────────────────────┐
│                           TSN Node v0.4.0                            │
├──────────────┬──────────────┬──────────────┬─────────────────────────┤
│    Core      │    Crypto    │  Consensus   │        Network          │
│  Block       │  Poseidon2   │  PoW Mining  │  P2P Protocol           │
│  Transaction │  ML-DSA-65   │  MIK Anti-   │  Kademlia DHT           │
│  UTXO State  │  Plonky2 ZK  │    Sybil     │  Gossip & Sync          │
│  Validation  │  SLH-DSA     │  Difficulty   │  Rate Limiting          │
│              │  Nullifiers  │    Adjust    │  Anti-Eclipse            │
├──────────────┴──────────────┴──────────────┴─────────────────────────┤
│  Storage (SledDB)  │  Wallet (Shielded ZK)  │  RPC (REST + JSON-RPC) │
├────────────────────┼────────────────────────┼────────────────────────┤
│  Explorer          │  Faucet (Testnet)      │  Metrics & Health      │
└────────────────────┴────────────────────────┴────────────────────────┘

Cryptography Stack

Layer Primitive Standard Purpose
Signatures ML-DSA-65 FIPS 204 Transaction & block signing
Backup Signatures SLH-DSA (SPHINCS+) FIPS 205 Stateless hash-based fallback
ZK Proofs Plonky2 STARKs Shielded transaction validity
Hash Function Poseidon2 PoW mining, Merkle trees, commitments
Field Goldilocks p = 2⁶⁴ - 2³² + 1 ZK-friendly arithmetic
Encryption ChaCha20-Poly1305 RFC 8439 Note payload encryption

Signature Sizes

Parameter ML-DSA-65
Public Key 1,952 bytes
Secret Key 4,032 bytes
Signature 3,309 bytes

Commitment Scheme

Note Commitment = Poseidon(domain=1, value, pk_hash, randomness)
Nullifier       = Poseidon(domain=3, nullifier_key, commitment, position)
Merkle Node     = Poseidon(domain=5, left, right)

Node Types

Type Role Reward
Miner Produces blocks, earns block reward 85% of block reward
Relay/Seed Stores chain, relays blocks & transactions 8% relay pool
Prover Generates ZK proofs on demand Proving fees
Light Client Wallet-only, verifies via proofs

Network

Parameter Value
Default Port 8333
Block Reward 50 TSN
Target Block Time 10 seconds
Difficulty Adjustment Every 10 blocks
Coin Decimals 9 (1 TSN = 10⁹ base units)
Max Spends per Tx 10
Max Outputs per Tx 4
Peer Discovery Kademlia DHT
Block Propagation Gossip protocol

Testnet

The private testnet is live with 5 nodes across Europe:

Node Address
seed-1 seed1.tsnchain.com:9333
seed-2 seed2.tsnchain.com:9333
seed-3 seed3.tsnchain.com:9333
seed-4 seed4.tsnchain.com:9333

API Overview

Each TSN node exposes a REST API:

Endpoint Description
GET /chain/info Blockchain height, latest hash
GET /block/:hash Get block by hash
GET /block/height/:n Get block by height
POST /tx/v2 Submit shielded V2 transaction
GET /mempool View pending transactions
GET /peers List connected peers
POST /nullifiers/check Verify spent nullifiers
GET /witness/v2/position/:n Get Merkle witness for ZK proof
POST /faucet/claim Claim testnet tokens
GET /sync/status Node sync progress
GET /explorer Built-in block explorer
GET /wallet Built-in web wallet

Codebase

  • 81,000+ lines of Rust
  • 766 unit tests across 99 test executables
  • 270+ source files across 20+ modules
  • 694 commits of active development
  • 5 nodes running on private testnet
  • Written in Rust 2021 edition

Roadmap

Phase 1 — Foundations ✅

Core blockchain engine: blocks, transactions, UTXO, Poseidon2 hashing, ML-DSA-65 signatures, Proof of Work consensus with MIK anti-Sybil, P2P networking with Kademlia DHT, SledDB storage, shielded wallet, JSON-RPC API, block explorer, and testnet faucet.

Phase 2 — Advanced Features (In Progress)

Multi-role nodes (Miner, Relay, Prover, Light Client), Plonky3 STARK migration (replacing legacy Groth16/Halo2), browser-based WASM prover, and enhanced shielded wallet with viewing keys.

Phase 3 — Smart Contracts

zkVM (zero-knowledge virtual machine) for executing smart contracts inside ZK proofs. Multi-asset UTXO support, TSN-20 token standard, and Ethereum bridge via light client verification.

Phase 4 — Launch

┌──────────────────────────────────────────────────────────────────┐
│                                                                  │
│  APRIL 2026          MAY — JULY 2026            Q3 2026          │
│  ───────────         ──────────────────         ────────         │
│                                                                  │
│  ┌──────────┐        ┌──────────────────┐       ┌────────────┐  │
│  │ PRIVATE  │───────>│   INCENTIVIZED   │──────>│  MAINNET   │  │
│  │ TESTNET  │        │  PUBLIC TESTNET  │       │  LAUNCH    │  │
│  └──────────┘        └──────────────────┘       └────────────┘  │
│                                                                  │
│  • 5 internal nodes   • Open to everyone        • Genesis block  │
│  • Stress testing     • Bug bounty program      • Fair launch    │
│  • Bug hunting        • Node operator rewards   • No premine     │
│  • Core validation    • Smart contract testing  • Full privacy   │
│  • ZK proof testing   • Security audit          • zkVM live      │
│                       • 2-3 months duration                      │
│                                                                  │
└──────────────────────────────────────────────────────────────────┘

Phase 5 — Post-Mainnet

Gold-backed stablecoin ZST (1 ZST = 1g gold) as an independent Layer 2, with decentralized oracle price feeds and 150% over-collateralization in TSN.

Links

License

Proprietary — source code is not yet public. Open-source release planned for mainnet.

Releases

No releases published

Packages

 
 
 

Contributors