Skip to main content

Module stratum

Module stratum 

Source
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.

Functions§

spawn