Skip to content

dgb: per-connection Stratum coinbase assembler + coinb1/coinb2 split SSOT - #327

Merged
frstrtr merged 1 commit into
masterfrom
dgb/conn-coinbase-assembler-split
Jun 22, 2026
Merged

dgb: per-connection Stratum coinbase assembler + coinb1/coinb2 split SSOT#327
frstrtr merged 1 commit into
masterfrom
dgb/conn-coinbase-assembler-split

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Phase B pillar (per the integrator hand-off after #322): implement the per-connection coinbase assembly.

What

  • New src/impl/dgb/coin/connection_coinbase.hpp: build_connection_coinbase_parts() assembles the prospective next-share gentx for one Stratum connection through the existing assemble_gentx_coinbase SSOT, then splits it into the Stratum coinb1/coinb2 pair around the OP_RETURN 8-byte extranonce slot.
  • Invariant: coinb1 || extranonce1(4) || extranonce2(4) || coinb2 == full gentx bytes — the reconstruction mining_submit relies on.
  • build_ref_op_return(): canonical 6a28 || ref_hash(32) || last_txout_nonce(8 LE) commitment, byte-identical to the verification SSOT in share_check.hpp.

Conformance

KAT (4/4 local) pins the assembled bytes byte-identical to the canonical frstrtr/p2pool-dgb-scrypt oracle wire (reusing the same NOSEG ground-truth vector as the gentx assembler KAT) plus the split invariant. Pure / no tracker dependency, so the vector is the oracle serializer output, not self-generated.

Scope / safety

  • Fenced to the DGB tree (coin/ + test/) + the build.yml --target allowlist (both arms). No shared / bitcoin_family / core / ltc / doge touch.
  • Runtime byte-unchanged: new file + new test only; DGBWorkSource::build_connection_coinbase() still returns the empty stub. The live PPLNS payout-map + ref_hash tracker-seam wiring into the work source is the next stacked slice.
  • GPG-signed. Surface-for-tap — no self-merge.

…SSOT

Add coin/connection_coinbase.hpp: build_connection_coinbase_parts() builds
the prospective next-share gentx for one Stratum connection via the
assemble_gentx_coinbase SSOT, then splits it into the Stratum coinb1/coinb2
pair around the OP_RETURN 8-byte extranonce slot so that
coinb1 || extranonce1(4) || extranonce2(4) || coinb2 reconstructs the exact
gentx bytes the submit path validates.

KAT (4) pins the assembled bytes byte-identical to the canonical
frstrtr/p2pool-dgb-scrypt oracle wire (same NOSEG vector as the gentx
assembler KAT) and the split invariant. Pure / no tracker dependency.
Fenced to the DGB tree; runtime byte-unchanged (new file + test only).
@frstrtr
frstrtr merged commit 09d2d7f into master Jun 22, 2026
31 checks passed
frstrtr added a commit that referenced this pull request Jun 22, 2026
dgb(phase-b): wire per-connection coinbase payout split to PPLNS SSOT (#327-gated follow-on)
frstrtr added a commit that referenced this pull request Jun 23, 2026
dgb: per-connection Stratum coinbase assembler + coinb1/coinb2 split SSOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant