Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 2.12 KB

File metadata and controls

59 lines (44 loc) · 2.12 KB

zig-crypto-mining

Bitcoin mining MVP + DePIN protocol in Zig. Extracted from Trinity monolith for independent development and reuse.

Features

  • 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

Quick Start

# Build
zig build

# Run miner
./zig-out/bin/btc-mining

# Run DePIN node
./zig-out/bin/pas-node

Architecture

┌─────────────────────────────────────────┐
│         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                  │
└─────────────────────────────────────────┘

Dependencies

License

MIT License — see LICENSE file.

Related