Skip to content

v0.2.5 - stratum & dispatch correctness fixes (issue #2)

Choose a tag to compare

@blindrun blindrun released this 17 Aug 19:51
· 50 commits to main since this release

Six correctness fixes in the stratum and dispatch paths, all from an external
audit (issue #2, thanks @odiseusme) and verified against the code:

  1. Robust socket writes - the send path now writes the whole buffer or fails,
    so a short write can't send truncated JSON as a successful share; it uses
    MSG_NOSIGNAL and ignores SIGPIPE, so a pool disconnecting mid-send no longer
    kills the miner.
  2. Job id travels with the job - a new block arriving mid-batch can no longer
    cause a solution to be submitted under the wrong job id and rejected.
  3. Nonce stays in your subspace - a launch that would cross the owned-nonce
    boundary is clamped, so no work leaks into the pool's extranonce prefix.
  4. --batch is validated - clamped to a non-zero multiple of 256, closing the
    overlap / infinite-retest / skip-and-overstate cases.
  5. Vulkan memory barrier - the dataset build's writes are now a guaranteed
    dependency for the search reads, not just fence-ordered.
  6. Lenient JSON - trailing whitespace in a pool's numeric fields no longer
    silently drops the subscribe reply onto the default extranonce.

No dev fee. make test green on both backends.