Post-quantum privacy blockchain — Plonky3 STARKs · ML-DSA-65 · Poseidon2 · Shielded Transactions
Website • Whitepaper • Docs • Blog • Explorer • Run a Node • Discord
Note: TSN is currently in private testnet. TSN tokens have no monetary value at this stage. They will only become meaningful once the incentivized testnet and eventually mainnet are launched. Do not purchase or trade TSN tokens — they can be mined for free by running a node.
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.
| Feature | Description |
|---|---|
| Plonky3 STARKs | AIR-based zero-knowledge proofs wired into block validation — 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 PoW | ZK-friendly hash function over Goldilocks field — same hash for mining AND ZK proofs |
| Shielded Transactions | Working V2 transactions with ZK proofs, broadcast and validated across the network |
| Interactive Wallet | ./tsn wallet — generate, restore (BIP39 24-word seed), send, receive, history |
| P2P Auto-Update | Nodes detect new versions via peer handshake, download, verify, and self-update |
| Anti-Reorg Protection | MAX_REORG_DEPTH=100, Fork ID verification, anchor block filtering |
| zkVM Smart Contracts | Stack-based VM with 30+ opcodes, gas metering, and ZK execution traces |
| MIK Consensus | Mining Identity Key — Proof of Work with numeric difficulty and 512-bit nonce |
| Fast Sync | Snapshot-based synchronization — full sync in ~2 seconds |
| 3 Node Roles | Miner, Relay, Light Client — each with auto-update capability |
TSN is designed to be fully quantum-safe — not just signatures, but the entire 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 | Plonky3 STARKs (AIR) | — | 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 |
| Anti-Sybil | MIK | — | One identity per miner |
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
| Parameter | ML-DSA-65 |
|---|---|
| Public Key | 1,952 bytes |
| Secret Key | 4,032 bytes |
| Signature | 3,309 bytes |
Note Commitment = Poseidon(domain=1, value, pk_hash, randomness)
Nullifier = Poseidon(domain=3, nullifier_key, commitment, position)
Merkle Node = Poseidon(domain=5, left, right)
┌──────────────────────────────────────────────────────────────────────┐
│ TSN Node v1.3.0 │
├──────────────┬──────────────┬──────────────┬─────────────────────────┤
│ Core │ Crypto │ Consensus │ Network │
│ Block │ Poseidon2 │ PoW Mining │ libp2p (GossipSub) │
│ Transaction │ ML-DSA-65 │ MIK Anti- │ Kademlia DHT │
│ UTXO State │ Plonky3 ZK │ Sybil │ Auto-Update (P2P) │
│ Validation │ SLH-DSA │ LWMA Diff │ Anti-Eclipse │
│ │ Nullifiers │ Adjust │ Rate Limiting │
├──────────────┴──────────────┴──────────────┴─────────────────────────┤
│ VM (zkVM) │ Contracts (Escrow, Multisig, AMM) │ Stablecoin │
├──────────────┼─────────────────────────────────────┼────────────────┤
│ Storage │ Wallet (Shielded ZK + BIP39) │ RPC (REST) │
├──────────────┼─────────────────────────────────────┼────────────────┤
│ Explorer │ Faucet (Testnet) │ Metrics │
└──────────────┴─────────────────────────────────────┴────────────────┘
# Download latest release
curl -LO https://github.com/trusts-stack-network/trust-stack-network/releases/latest/download/tsn-linux-x86_64.tar.gz
tar xzf tsn-linux-x86_64.tar.gz
cd tsn-*
# Run a miner (4 threads)
./tsn miner -t 4
# Run a relay node
./tsn relay
# Run a light client
./tsn lightRequires Rust nightly (automatically selected via rust-toolchain.toml):
# Install Rust if needed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/trusts-stack-network/trust-stack-network.git
cd trust-stack-network
cargo build --release
# Run (seeds and wallet auto-detected)
./target/release/tsn miner -t 4Peer discovery is automatic via DNS seeds (seed1-4.tsnchain.com). New nodes fast-sync from a snapshot in ~2 seconds.
./tsn miner -t 4 # Mine with 4 threads
./tsn relay # Run relay node
./tsn light # Run light client
./tsn wallet # Interactive wallet menu
./tsn balance # Check balance
./tsn send --to <addr> --amount 10 # Send TSN
./tsn new-wallet # Generate new wallet (24-word BIP39 seed)
./tsn --version # Print version infoTSN supports 3 distinct node roles, selectable at startup:
Full node that validates, stores the entire blockchain, relays transactions/blocks, and mines new blocks. Miners earn 92% of the block reward (46 TSN per block). This is the default role.
Full node that stores the complete chain and relays blocks/transactions to peers, but does not mine. Relays are the backbone of the network — they ensure fast block propagation via GossipSub and serve snapshots to new nodes via fast-sync. They earn from the 3% relay reward pool.
Minimal node that does not store the full chain — it syncs only block headers and verifies transactions using ZK proofs. Designed for mobile wallets and resource-constrained devices.
| Type | Stores Chain | Mines | Relays | Auto-Update | Reward |
|---|---|---|---|---|---|
| Miner | Yes | Yes | Yes | Yes | 92% block reward |
| Relay | Yes | — | Yes | Yes | 3% relay pool |
| Light Client | — | — | — | Yes | — |
All node types auto-update when a new version is detected on the network.
TSN is one of the first blockchains with fully decentralized automatic updates. No other blockchain combines P2P version signaling with multi-source download and cryptographic verification.
How it works:
- Peers announce their version during the libp2p Identify handshake
- If a peer has a newer version, the node queries the official release
- Binary is downloaded from GitHub (primary) or tsnchain.com (fallback)
- SHA256 integrity check + Ed25519 signature verification
- Current binary backed up, new binary installed, node restarts
Node A (v1.1.0) connects to Node B (v1.2.0)
→ A detects newer version via P2P handshake
→ A downloads v1.2.0 from GitHub, verifies signature
→ A self-updates and restarts
→ A is now v1.2.0
→ A's other peers detect the update via handshake
→ Network propagates the update in minutes
Manual update: ./tsn update
TSN uses Poseidon2 as its PoW hash function instead of SHA-256 (Bitcoin) or RandomX (Monero):
- ZK-native: Same hash for mining AND shielded transaction proofs (Plonky3 STARKs). One hash for the entire stack.
- Post-quantum friendly: Algebraic hashes over large fields resist Grover's algorithm.
- ASIC-resistant: Field arithmetic is complex enough that ASICs offer limited advantage over CPUs.
1. Build block template (transactions + coinbase)
2. Generate random 512-bit nonce
3. Hash: Poseidon2(header_fields, nonce) → 32 bytes
4. Check: first_8_bytes_as_u64 < (u64::MAX / difficulty)
5. Valid → broadcast block. Invalid → new nonce.
| CPU | Threads | Hashrate |
|---|---|---|
| EPYC 7742 | 1T | 121 KH/s |
| EPYC 7742 | 4T | 257 KH/s |
| EPYC 7742 | 8T | 454 KH/s |
| Xeon E5-2697A v4 | 2T | ~80 KH/s |
Note: Poseidon2 hashrates are not comparable to SHA-256 or RandomX. Different hash functions have different work-per-hash. TSN's difficulty adjusts via LWMA (45-block window) to target 10-second blocks.
network_hashrate = difficulty / block_time
Displayed in the explorer and /chain/info API.
TSN includes a stack-based zkVM with gas metering and ZK execution traces:
- 30+ opcodes: arithmetic, storage, memory, crypto (Poseidon hash, signature verify), control flow, events
- Contract templates: Escrow (with arbitration & timeout), Multisig (N-of-M), AMM Pool, Governance
- Gas model: per-opcode costs, block gas limit 1M, max 64KB bytecode, 100K storage slots
| Parameter | Value |
|---|---|
| Default Port | 9333 |
| Block Reward | 50 TSN (92% miner, 5% dev fees, 3% relay pool) |
| Halving Interval | 4,200,000 blocks (~16 months) |
| Target Block Time | ~10 seconds |
| Difficulty Adjustment | LWMA per-block (N=45 window) |
| P2P Protocol | libp2p GossipSub mesh (D=6, heartbeat 700ms) |
| Max Reorg Depth | 100 blocks |
| Min Difficulty | 1000 |
| Nonce Size | 512 bits |
| Max TX Size | 1 MB |
| Max Supply | ~420,000,000 TSN (~10 years to reach) |
New nodes join the network in seconds by downloading a compressed state snapshot:
┌─────────────┐ GET /snapshot/info ┌─────────────┐
│ New Node │ ──────────────────────────> │ Seed Node │
│ │ GET /snapshot/download │ │
│ --fast-sync│ <────────────────────────── │ (gzip) │
│ │ │ │
│ Load state │ GET /blocks?from=N │ │
│ Sync rest │ ──────────────────────────> │ │
└─────────────┘ └─────────────┘
- New node requests a gzip-compressed state snapshot from a peer
- Loads the snapshot and verifies
state_rootintegrity - Syncs only the missing blocks since the snapshot height
- Ready to mine in ~2 seconds
| Protection | Description |
|---|---|
| Heaviest chain rule | Fork choice based on cumulative work, not height |
| MAX_REORG_DEPTH = 100 | Hard limit — no reorg deeper than 100 blocks |
| Checkpoint finality | Every 100 blocks, a checkpoint is created |
| Fork ID verification | Genesis hash checked at sync — prevents silent splits |
| Anchor block filter | Blocks must reference a recent valid ancestor |
| P2P version gate | Disconnect peers below MINIMUM_VERSION |
The private testnet is live with 5 nodes and 29,000+ blocks mined.
TSN tokens currently have no value. The testnet is for development and testing only. Tokens can be mined for free by anyone running a node. Economic value will only be introduced at the incentivized testnet phase.
Roadmap:
- Private Testnet — Active now. Internal testing and development.
- Open Testnet — Code on GitHub. Anyone can run a node and mine. No value.
- Incentivized Testnet — Rewards for miners and node operators. Tokens begin to have value.
- Mainnet — Genesis block. Fair launch. No premine.
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, REST API, block explorer, and testnet faucet.
Multi-role nodes (Miner, Relay, Light Client), Plonky3 STARK migration (AIR-based proofs via p3-uni-stark), enhanced shielded wallet with BIP39 recovery and viewing keys, hardened fast-sync with state_root verification, security audit (8.1/10 score).
zkVM (30+ opcodes), contract templates (Escrow, Multisig, AMM Pool, Governance), stablecoin module (ZST — gold-backed), P2P auto-update system.
┌──────────────────────────────────────────────────────────────────┐
│ │
│ 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 │
│ • Core validation • Node operator rewards • No premine │
│ • ZK proof testing • Security audit • Full privacy │
│ • 2-3 months duration • zkVM live │
│ │
└──────────────────────────────────────────────────────────────────┘
TSN is more than a blockchain — it's a full ecosystem of decentralized applications.
A peer-to-peer social network with zero tracking, no email/phone required, and end-to-end encrypted messaging. Think Discord + Twitter + Medium, but decentralized and private.
- Whisps (short posts) + Articles (long-form blog) with upvote/downvote
- Circles — Community groups with rooms, roles, polls, auto-moderation
- E2E Encrypted DMs — ECDH P-256 + AES-256-GCM
- BIP39 Identity — 24-word seed phrase, no email, no phone
- 5 P2P Nodes — Rust binary, libp2p gossipsub
- App: whispr.tsnchain.com
- GitHub: github.com/trusts-stack-network/whispr
- Releases: github.com/trusts-stack-network/whispr-releases (Linux + Windows + macOS)
A stablecoin pegged to gold (1 ZST = 1g XAU), over-collateralized in TSN. Djed/Zephyr-inspired reserve model with stress fees, circuit breaker, and oracle price feeds.
- 3 assets: TSN (collateral) → ZST (stablecoin) + ZRS (reserve share)
- Reserve engine: 76 tests passing, mint/burn with dynamic fees
- Protections: stress fees 0.3%-5%, circuit breaker at 120%, cooldown mechanism
A cross-chain anonymous DEX built on TSN with AMM pools, escrow P2P, yield farming, governance DAO, and prediction markets.
- AMM Swap with smart router (multi-hop), limit orders
- Liquidity Pools with yield farming rewards
- P2P Escrow for trustless OTC trades
- DAO Governance — community-driven proposals and voting
- Cross-chain — relayers staked in TSN
- Privacy — anonymous trading via TSN shielded transactions
- Halving interval: 210,000 → 4,200,000 blocks (~16 months per halving, supply max in ~10 years)
- Chain reset: fresh genesis block with correct economics
- Critical fix: rollback
canonical_heightbug causing infinite sync loops - P2P Auto-Update: nodes detect + download + verify + self-update
- Explorer URL: points to
explorer.tsnchain.com - Default mode:
./tsnauto-creates wallet and mines (no subcommand needed) - Verification keys: searched next to binary + parent dirs (build from source works)
- Firewall: port 9333 open on all nodes for HTTP sync
| Feature | Before | After |
|---|---|---|
| Mining Hot Loop | Full header rebuilt per hash | MiningHashContext — zero heap alloc |
| Hashrate Display | Truncated hash, no KH/s | Real-time KH/s, full hash |
| Explorer Hashrate | Wrong formula | Corrected: difficulty / block_time |
| Wallet TX History | Not saved | Sent + received persisted (WalletTxRecord) |
| Received TX Detection | Manual | Automatic at wallet scan |
| Nullifier Check | At send only | At scan + send (prevents double-spend) |
| P2P Version Gate | Accept all peers | Disconnect peers below MINIMUM_VERSION |
| CLI | Multiple flags required | ./tsn miner -t 4 — everything auto-detected |
| Auto-Update | None | P2P signaling + multi-source download + SHA256 verification |
- Working V2 shielded transactions (create, sign, broadcast, validate)
- Interactive wallet menu with BIP39 recovery
- MAX_REORG_DEPTH = 100, Fork ID verification, anchor block filtering
- Dual mining across multiple nodes
Full security audit: 29 findings, 23 fixes applied. Score: 5.4/10 → 8.1/10. Zero critical vulnerabilities remaining.
- LWMA per-block difficulty adjustment (N=45 window)
- GossipSub mesh P2P (replaced flood protocol)
- Cryptographic random nonces (zero miner collisions)
- Concurrent block relay, canonical height in DB
- Numeric difficulty system with 512-bit nonce
- Poseidon2 PoW (plonky3)
- Fast sync (~2 seconds)
- BIP39 wallet recovery
- DNS seed discovery
- Chain Watchdog monitoring
| Metric | Value |
|---|---|
| Language | Rust 2021 edition |
| Lines of code | 94,000+ |
| Source files | 298 |
| Tests | 369 passing |
| Commits | 32+ |
| Nodes | 5 (1 miner + 4 seeds) |
| Endpoint | Description |
|---|---|
GET /chain/info |
Block height, difficulty, latest hash, version |
GET /peers |
Connected peers |
GET /sync/status |
Sync progress and peer count |
GET /block/height/:n |
Get block by height |
POST /tx/submit |
Submit shielded transaction |
GET /explorer |
Built-in block explorer |
GET /version.json |
Node version info (used by auto-update) |
- Website: tsnchain.com
- Explorer: explorer.tsnchain.com
- Whispr: whispr.tsnchain.com
- Whitepaper: tsnchain.com/whitepaper.html
- Documentation: tsnchain.com/docs.html
- Run a Node: tsnchain.com/run-node.html
- Blog: tsnchain.com/blog.html
- X/Twitter: x.com/tsn_chain
- Medium: medium.com/@trusts-stack-network
- Discord: discord.gg/wxxNVDVn6N
MIT — Open source.
