How chia-network/pool2-reference works
Pool2 Reference is a reference Chia pool server. Farmers register and authenticate over the v2 HTTP API, submit partials, and receive difficulty-weighted payouts after background work validates partials and processes pooled rewards. The service coordinates full-node, wallet, and persistence operations; scheduled loops invoke its distinct tasks. The README documents the major runtime layers, while some wiring is supported only by the SOURCE INDEX; unsampled details and uncertain links are omitted.
Main entry points: service.py Pool Service · reference.py CLI Entrypoint · v2.py V2 Handlers · farmer_rpc.py HTTP Server
Components 18
Farmer API
- HTTP Server
chia_pool/server/farmer_rpc.py - V2 Handlers
chia_pool/farmer_rpc/v2.py - JWT Authentication
chia_pool/farmer_rpc/authentication.py
Pool Operations
- Pool Service
chia_pool/service/service.py
Chia Integrations
- Full Node Client
chia_pool/node/rpc_wrapper.py - Wallet Client
chia_pool/wallet/rpc_wrapper.py
Persistence and Contracts
- Node RPC Contract
chia_pool/api/node_rpc.py - Wallet RPC Contract
chia_pool/api/wallet_rpc.py - Store Contract
chia_pool/api/store.py - SQLite Store
chia_pool/store/sqlite.py - Service Contract
chia_pool/api/service.py - Server Contract
chia_pool/api/server.py
Server Runtime
- Scheduled Tasks
chia_pool/server/pooling_tasks.py - Config Loading
chia_pool/config_loading.py - CLI Entrypoint
chia_pool/reference.py
Other components
- Farmer
- Chia Full Node
- Chia Wallet
Connections 25
- Farmer → HTTP Server: sends requests
- HTTP Server → V2 Handlers: routes requests
- V2 Handlers → JWT Authentication: verifies tokens
chia_pool/farmer_rpc/v2.py - V2 Handlers → Pool Service: uses service
chia_pool/farmer_rpc/v2.py - V2 Handlers → Store Contract: reads and writes
chia_pool/farmer_rpc/v2.py - V2 Handlers → Node RPC Contract: checks chain state
chia_pool/farmer_rpc/v2.py - Scheduled Tasks → Pool Service: runs service tasks
chia_pool/server/pooling_tasks.py - Pool Service → Store Contract: reads and writes
chia_pool/service/service.py - Pool Service → Node RPC Contract: checks chain data
chia_pool/service/service.py - Pool Service → Wallet RPC Contract: submits transactions
chia_pool/service/service.py - CLI Entrypoint → HTTP Server: starts server
chia_pool/reference.py - CLI Entrypoint → Scheduled Tasks: starts loops
chia_pool/reference.py - CLI Entrypoint → Pool Service: creates service
chia_pool/reference.py - CLI Entrypoint → SQLite Store: creates store
chia_pool/reference.py - CLI Entrypoint → Full Node Client: creates client
chia_pool/reference.py - CLI Entrypoint → Wallet Client: creates client
chia_pool/reference.py - Full Node Client → Node RPC Contract: implements contract
chia_pool/node/rpc_wrapper.py - Wallet Client → Wallet RPC Contract: implements contract
chia_pool/wallet/rpc_wrapper.py - SQLite Store → Store Contract: implements contract
chia_pool/store/sqlite.py - Pool Service → Service Contract: implements contract
chia_pool/service/service.py - HTTP Server → Server Contract: implements contract
chia_pool/server/farmer_rpc.py - Full Node Client → Chia Full Node: calls RPC
chia_pool/node/rpc_wrapper.py - Wallet Client → Chia Wallet: calls RPC
chia_pool/wallet/rpc_wrapper.py - HTTP Server → Config Loading: loads configuration
chia_pool/server/farmer_rpc.py - Scheduled Tasks → Config Loading: loads configuration
chia_pool/server/pooling_tasks.py