A minimal Bitcoin-style blockchain implemented in Go. Built to understand distributed consensus from the ground up — not as a tutorial walkthrough, but as a working implementation with real architectural decisions.
- Proof-of-Work mining with configurable difficulty
- UTXO transaction model — unspent output tracking, not account balances
- Mempool — pending transaction pool before block inclusion
- Wallet — key generation, signing, address derivation
- Simple P2P sync — basic peer discovery and chain propagation
- JSON-RPC / CLI — interact with the node programmatically
Clean Architecture with domain-driven design: domain logic is isolated from infrastructure concerns. Each layer (domain, application, infrastructure, interface) has a clear boundary so the core blockchain rules don't leak into HTTP handlers or storage code.
/domain — Block, Transaction, Chain, UTXO core logic
/application — Mining, wallet, mempool use cases
/infrastructure — Storage, P2P networking
/interface — JSON-RPC server, CLI
Most tutorial blockchains use account balances (like Ethereum). UTXO is harder — you track individual unspent outputs, not totals — but it's how Bitcoin actually works. Double-spend prevention, transaction validity, and chain validation all work differently under UTXO.
git clone https://github.com/dudedani/gochain-lite
cd gochain-lite
go build ./...
./gochain-lite node start
./gochain-lite wallet new
./gochain-lite tx send --from <addr> --to <addr> --amount 10Go · Clean Architecture · UTXO model · SHA-256 PoW · JSON-RPC