What is Valence?
An open-source blockchain simulator built for inspecting, understanding, and experimenting with decentralized systems.
Valence is an educational, open-source blockchain simulator built to demystify how decentralized systems operate under the hood. It provides a complete, inspectable implementation of a distributed blockchain node written in Go, paired with a modern web dashboard and wallet interface.
Unlike simplified toy demonstrations, Valence runs a genuine multi-node peer-to-peer network on your local machine. It incorporates Proof-of-Work mining, Ed25519 digital signatures, dynamic difficulty retargeting, binary Merkle tree verification, account sequence replay protection, and asynchronous gossip-based block and transaction propagation.
The project is designed for developers, students, and researchers who want to move beyond reading whitepapers and actually observe blocks being mined, forks being resolved by Nakamoto Cumulative Work, and transactions propagating across nodes in real time.
Project Goals
Core architectural principles guiding the design and development of Valence.
Demystify Blockchain Internals
Strip away the speculation and marketing. Demonstrate exactly how cryptographic primitives, block headers, state ledgers, and consensus rules function at the source code level.
Genuine P2P Networking
A fully decentralized gossip protocol where nodes discover peers, propagate blocks, and synchronize chains without any centralized coordinator or tracker server.
Hands-on Experimentation
Run multiple nodes locally, adjust difficulty parameters, trigger chain forks, submit transactions, and inspect real-time chain reorganizations in your browser.
Transparent & Zero-Dependency
Every line of code is open source and documented. Built with standard Go libraries and zero external database dependencies for maximum auditability and ease of setup.
Technology Stack
Standards, algorithms, and libraries powering the simulator.
Known Limitations
Intentional simplifications made for educational clarity over production scalability.
In-Memory State Recalculation
Instead of a persistent State Trie, the ledger recalculates balances and nonces entirely in-memory from the chain history. This scales poorly for large chains.
Simplified P2P Networking
Node discovery relies on explicit HTTP address arrays without advanced NAT traversal or Kademlia DHT. Gossip uses standard REST rather than persistent TCP.
Single JSON File Storage
The entire blockchain is serialized into a single chain.json file rather than an optimized key-value store, meaning the chain must be fully parsed into memory at startup.
No Smart Contracts
The ledger is restricted to pure currency transfers between Ed25519 addresses. There is no Virtual Machine or scripting language available.