Expand description
Stratum V1 pool (server role). Rust owns each session — subscription, extranonce1, jobs, the share arithmetic and every refusal the arithmetic decides — and asks the model only who may mine and whether a share proven valid is credited.
Modules§
- actions
- What the model decides as a Stratum V1 pool: who may mine, which valid shares it credits, and the work and difficulty it hands out. Rust owns the sessions, extranonces, jobs and every share’s arithmetic, so a share reaches the model only once it is proven to meet the difficulty.
- wire
- Stratum V1 on the wire, for both roles: newline-delimited JSON-RPC messages, and the share arithmetic a pool and a miner must agree on byte for byte — the coinbase a job describes, the block header a share commits to, its double SHA-256, and its difficulty.
Constants§
- IDLE_
TIMEOUT - MAX_
IDLE_ TIMEOUT_ SECS - MAX_
JOBS - Jobs a connection keeps; shares for older ones are stale.
- MAX_
SEEN_ SHARES - Shares remembered per connection to refuse duplicates.
- MAX_
WORKERS - Workers one connection may authorize.
- POOL_
NBITS - nbits of the pool’s own jobs: the easiest target there is, as on regtest.