Ghost Pool
Decentralized mining where every node runs its own pool. No middleman, no censorship, no trust required.
Overview
Every Ghost node is its own mining pool. This is the key differentiator from traditional mining:
| Feature | Traditional Pool | Ghost Pool |
|---|---|---|
| Operator | Centralized company | You (your node) |
| Pool Fee | 2-4% of everything | 1% of subsidy only |
| TX Fees | Pool keeps them | 100% to winning node |
| Block Template | Pool decides contents | You decide contents |
| Censorship | Pool can censor TXs | Impossible — your node, your rules |
| Trust | Trust pool for payouts | Cryptographic consensus |
Architecture
Ghost Pool runs as a daemon alongside Ghost Core:
┌─────────────────────────────────────────────────┐
│ Your Ghost Node │
├─────────────────────────────────────────────────┤
│ │
│ Ghost Core ◄──────► Ghost Pool │
│ (validates) (manages miners) │
│ │ │ │
│ │ │ │
│ ▼ ▼ │
│ Bitcoin P2P Stratum Server │
│ (blocks) (miners connect) │
│ │
│ ZMQ ◄──────► Ghost Network │
│ (share consensus) │
│ │
└─────────────────────────────────────────────────┘Components
- Stratum Server — Accepts miner connections (V1 and V2)
- Share Processor — Validates submitted shares
- Template Manager — Gets block templates from Ghost Core
- Consensus Engine — Participates in network share consensus
- Payout Engine — Calculates and distributes rewards
Stratum Setup
Ghost Pool supports standard Stratum protocol, so any ASIC miner works out of the box.
Miner Configuration
# Point your miner to your Ghost node
URL: stratum+tcp://your-node-ip:3333
User: bc1qYourBitcoinAddress.worker1
Password: x (anything, not used)Worker Naming
The username format is: address.workername
- address — Your Bitcoin payout address (required)
- workername — Optional identifier for multiple miners
Protocol Support
| Protocol | Port | Status |
|---|---|---|
| Stratum V1 | 3333 | Supported |
| Stratum V2 | 3333 | Supported |
Share Consensus
Ghost Pool nodes form a mesh network and reach Byzantine Fault Tolerant consensus on shares:
Share Submission
Miner submits share to their node. Node validates locally.
Gossip Propagation
Valid share is broadcast to all Ghost nodes via ZMQ.
Independent Validation
Each node validates the share independently.
Merkle Commitment
Nodes periodically commit share merkle roots to verify consistency.
Byzantine Fault Tolerance
The system tolerates up to 33% malicious nodes. Key properties:
- 67% supermajority required for critical decisions
- Cryptographic proofs prevent share forgery
- Median fallback if no consensus reached
- Self-healing through periodic state verification
Payout Flow
When a block is found, payouts are calculated deterministically:
1% Pool Fee Split
Block Subsidy (e.g., 3.125 BTC)
├── 99% → Miners (shared by hashrate)
└── 1% → Pool Fee
├── 0.5% → Treasury (until 21 BTC cap)
└── 0.5% → Node Reward PoolMiner Payout Formula
miner_subsidy_share = (miner_shares / total_round_shares) × miner_pool
miner_pool = block_subsidy × 0.99
# If this miner's node found the block:
total_payout = miner_subsidy_share + 100% of TX feesNode Reward Formula
node_reward = (node_shares / total_network_shares) × node_reward_pool
node_reward_pool = block_subsidy × 0.005 (rising to 0.01 after decay)Block Found Flow
When a miner finds a block that meets Bitcoin network difficulty:
Block Submission
Node immediately submits block to Bitcoin network.
BlockFound Broadcast
Node broadcasts BlockFound message to all Ghost nodes.
Round Freeze
All nodes freeze their share ledgers for this round.
Payout Proposals
Each node calculates and broadcasts their payout proposal.
Consensus Vote
Nodes vote on proposals. 67% agreement required.
Payout Transaction
Finding node creates and broadcasts payout transaction.
New Round
All nodes reset share ledgers and begin new round.
Total time from block found to payout broadcast: typically <10 seconds.
Configuration
Ghost Pool configuration options:
# /etc/ghost/pool.conf
# Stratum Server
stratum_v1_port=3333
stratum_v2_port=3334
stratum_max_connections=1000
# Difficulty (auto-adjusts, this is starting value)
stratum_difficulty=1000000
# Template preferences
template_profile=max_fee
allow_custom_templates=true
# Network
zmq_bind=tcp://0.0.0.0:8555
zmq_peers=tcp://peer1:8555,tcp://peer2:8555
# Payouts
payout_threshold=0.001 # BTC
payout_address=bc1qYourBitcoinAddressPublic vs Private Mining
Control who can connect to your pool:
# Public mining (anyone can connect)
public_mining=1
stratum_bind=0.0.0.0:3333
# Private mining (only local miners)
public_mining=0
stratum_bind=127.0.0.1:3333Public mining enables the +3 Public Mining share bonus but requires a public IP and open firewall.