Skip to content

v2.3.2

Choose a tag to compare

@warioishere warioishere released this 23 Aug 07:45
· 191 commits to main since this release

Job Declaration Protocol

  • An allocate token now authorises exactly one declaration, and is spent before the pool asks its node to validate the job. A second declaration on the same token is answered invalid-mining-job-token.
  • A refused declaration spends its token just like an accepted one. This is a deliberate change: a client that re-declares after stale-chain-tip builds against a fresh template and takes the next token from its queue, so it never hands the old one back.
  • An allocate the pool cannot answer now says so and closes the connection, instead of leaving the client waiting for a response AllocateMiningJobToken defines no error frame for.
  • A payout list that is absent — the pool serving this miner no job at all — is reported as absent, not as a payout split needing more than one output. The old wording sent the operator looking for a split that does not exist instead of at the distribution build that failed.
  • A declared job is validated once per frame instead of twice, and the per-frame declare context travels as a single type.

Version rolling

  • An extended job allows version rolling unconditionally.
  • SV1 rejects version bits outside the mask the miner negotiated (BIP-310).

Custom extranonce

  • A Solo address can pin its own extranonce prefix per worker, authorised by a signed challenge and a stored bearer token.
  • The reserved-prefix rule now lives on the table as a CHECK constraint rather than only in the API handler. The handler was its single enforcement point while the table itself is hand-writable.

Statistics

  • Stale shares get their own column pair, and both new reject reasons reach the API — the per-worker breakdown adds up to the rejected total again.

One concept, one implementation

  • The block-found and declaration paths travel in named types instead of runs of same-typed positional arguments. Exchanging two of them compiled and wrote a session id into the address column.
  • The template revenue, the node validation, the declare-error construction, the wire-codec primitives and the pool's epoch-millisecond clock each have one implementation again.
  • SV2 spec citations name their heading instead of a section number, so a renumbering upstream cannot quietly invalidate them.

Fixes

  • A JDP-declared block lost its blocks_entity row. The session id written there did not fit the column, and the insert is best-effort, so the row was dropped without a trace. Payout accounting was never affected.

Removed

  • Two empty skeleton modules in the SV2 crate that the crate had grown away from — errors and configuration live next to what they describe.

Upgrade notes

  • Migration 0012 adds the custom-extranonce tables and a CHECK constraint pinning a customer-set prefix above the extranonce allocator's own worker partitions (prefix >= 33554432, i.e. 0x02000000).
  • ⚠️ The migration fails if an existing row violates that constraint, and the failure is deliberate: such a row is exactly the collision the constraint exists to prevent, and wants looking at rather than migrating around. Check before deploying:
    SELECT address, worker, to_hex(prefix) FROM pplns_custom_extranonce WHERE prefix < 33554432;
    An empty result means the migration applies cleanly.
  • No configuration keys were removed in this release.