Bitcoin mining MVP + DePIN protocol in Zig. Extracted from Trinity monolith for independent development and reuse.
- Bitcoin Mining — Proof-of-Work consensus algorithm
- SHA-256 — GF256 implementation via GoldenFloat
- DePIN — Decentralized physical infrastructure network
- Mining Pool — Stratum protocol for collaborative mining
# Build
zig build
# Run miner
./zig-out/bin/btc-mining
# Run DePIN node
./zig-out/bin/pas-node┌─────────────────────────────────────────┐
│ Crypto Mining Core │
├─────────────────────────────────────────┤
│ btc_mining_mvp.zig (24KB) │
│ - Mining coordinator │
│ - Worker pool │
│ - Stratum protocol │
├─────────────────────────────────────────┤
│ pas_mining_core.zig (13KB) │
│ - DePIN network │
│ - Physical mining │
│ - Node discovery │
├─────────────────────────────────────────┤
│ crypto/ │
│ - GF256 (SHA-256 implementation) │
│ - secp256k1 elliptic curves │
│ - Block validation │
└─────────────────────────────────────────┘
- zig-golden-float — Numerical kernel (GF256, SHA-256)
MIT License — see LICENSE file.
- Trinity — Main framework
- zig-golden-float — Numerical kernel