Skip to content

dgb: embed-at-mint MM commitment into coinbase scriptSig (phase DB) - #486

Merged
frstrtr merged 1 commit into
masterfrom
dgb/doge-mm-db-embed-at-mint
Jun 25, 2026
Merged

dgb: embed-at-mint MM commitment into coinbase scriptSig (phase DB)#486
frstrtr merged 1 commit into
masterfrom
dgb/doge-mm-db-embed-at-mint

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Phase DB embed-at-mint, re-opened off current master per integrator core=SSOT adjudication (concurrence chain unanimous: ltc-doge-production-steward + dgb).

What: ConnCoinbasePplnsInputs gains an optional aux_mm_commitment; build_connection_coinbase_from_pplns appends the pre-built 44-byte AuxPoW MM tag (magic fabe6d6d || aux_root32 BE || size4 LE || nonce4 LE) to the coinbase scriptSig when present. DEFAULT nullopt -> gentx BYTE-IDENTICAL to standalone-parent build (structural no-op; default V36 build cannot regress).

SSOT invariant: consumes the canonical c2pool::merged::build_auxpow_commitment as a read-only product; no DGB-local layout logic, no edit to the 44-byte layout or the shared DOGE-aux seam. Independent of #475 (the SSOT KAT-pin) — both pin to the same core builder, so this is mergeable off master without #475 landing first.

Not wired here: sourcing a LIVE aux merkle root (the producer only populates the field under #ifdef AUX_DOGE) is the gated DC routing slice.

KAT (dgb_connection_coinbase_test, both arms):

  • E1 NulloptIsByteIdentical — nullopt == no-aux gentx, txid-identical
  • E2 AppendsMmTagToScriptSig — gentx grows by EXACTLY 44 bytes, tag matches core SSOT output, scriptSig == baseline || tag

10/10 green default + 10/10 green -DAUX_DOGE=ON. Fenced to src/impl/dgb/; zero ltc/doge edits. GPG-signed. NO self-merge — operator tap.

Wire the AuxPoW merged-mining commitment into the per-connection coinbase
assembler so a won DGB block, built as the DOGE merged-mining parent
(-DAUX_DOGE=ON), carries the 44-byte MM tag (magic fabe6d6d || aux_root32 BE
|| size4 LE || nonce4 LE) the aux verifier decodes.

ConnCoinbasePplnsInputs gains an optional aux_mm_commitment carrying the
pre-built tag; build_connection_coinbase_from_pplns appends it to the coinbase
scriptSig when present. DEFAULT nullopt leaves the scriptSig -- and therefore
the whole gentx -- BYTE-IDENTICAL to the standalone-parent build: the no-op is
structural, so the default V36 DGB build cannot regress. The producer
(main_dgb seam) only ever populates the field under #ifdef AUX_DOGE; sourcing a
LIVE aux merkle root is the gated DC routing slice and is not wired here.

Per the integrator core=SSOT adjudication, the commitment blob is consumed as a
read-only product of the canonical builder c2pool::merged::build_auxpow_commitment
(shared A-level merged_mining.cpp / coinbase_builder.hpp). This slice carries no
DGB-local layout logic and makes no edit to the 44-byte layout or the shared
DOGE-aux seam; it is independent of #475 (the SSOT KAT-pin) -- both pin to the
same core builder. Fenced to src/impl/dgb/; zero ltc/doge tree edits.

KAT (connection_coinbase_test, runs in both default and AUX_DOGE arms):
  E1 NulloptIsByteIdentical  -- nullopt == no-aux gentx, txid-identical
  E2 AppendsMmTagToScriptSig -- gentx grows by EXACTLY 44 bytes, tag bytes
     match the core SSOT output, scriptSig == baseline || tag
10/10 green both arms (default + -DAUX_DOGE=ON).
frstrtr added a commit that referenced this pull request Jun 25, 2026
Pure, header-only DC decision contract the eventual DC run-loop wiring
(AUX_DOGE node seam + submit) must satisfy, landed BEFORE the seam is
touched (seam parked on #82 + ltc-doge written concurrence).

coin/aux_dual_target_select.hpp:
  - aux_mint_decision(aux_enabled, has_doge_job): embed the fabe6d6d MM
    commitment IFF aux MM enabled AND a DOGE job is present; else no-op
    (mirrors #486 embed-at-mint nullopt byte-identity).
  - select_submit(pow, dgb_target, has_doge_job, doge_target): independent
    per-path thresholds against one scrypt pow_hash (mirrors dc_proof
    DualTargetIndependentThresholds); DOGE-aux only fires when minted.
  - selection_is_consistent(): load-bearing DC<->DB guard,
    fire_doge_aux ==> embed_commitment, coupling submit back to #475/#486.

test/aux_dual_target_select_test.cpp: 5/5 KATs, non-circular goldens
(fabe6d6d tag, embed truth table, independent threshold table, no-job
suppression, the impossible DOGE-win-without-mint state). Registered in
test/CMakeLists.txt + both build.yml --target allowlists (#143 trap).

Fenced dgb/, not rewired, consumes nothing in src/impl/doge, no node
seam touch, zero consensus surface.
frstrtr added a commit that referenced this pull request Jun 25, 2026
Pure, header-only DC decision contract the eventual DC run-loop wiring
(AUX_DOGE node seam + submit) must satisfy, landed BEFORE the seam is
touched (seam parked on #82 + ltc-doge written concurrence).

coin/aux_dual_target_select.hpp:
  - aux_mint_decision(aux_enabled, has_doge_job): embed the fabe6d6d MM
    commitment IFF aux MM enabled AND a DOGE job is present; else no-op
    (mirrors #486 embed-at-mint nullopt byte-identity).
  - select_submit(pow, dgb_target, has_doge_job, doge_target): independent
    per-path thresholds against one scrypt pow_hash (mirrors dc_proof
    DualTargetIndependentThresholds); DOGE-aux only fires when minted.
  - selection_is_consistent(): load-bearing DC<->DB guard,
    fire_doge_aux ==> embed_commitment, coupling submit back to #475/#486.

test/aux_dual_target_select_test.cpp: 5/5 KATs, non-circular goldens
(fabe6d6d tag, embed truth table, independent threshold table, no-job
suppression, the impossible DOGE-win-without-mint state). Registered in
test/CMakeLists.txt + both build.yml --target allowlists (#143 trap).

Fenced dgb/, not rewired, consumes nothing in src/impl/doge, no node
seam touch, zero consensus surface.
frstrtr added a commit that referenced this pull request Jun 25, 2026
Pure, header-only DC decision contract the eventual DC run-loop wiring
(AUX_DOGE node seam + submit) must satisfy, landed BEFORE the seam is
touched (seam parked on #82 + ltc-doge written concurrence).

coin/aux_dual_target_select.hpp:
  - aux_mint_decision(aux_enabled, has_doge_job): embed the fabe6d6d MM
    commitment IFF aux MM enabled AND a DOGE job is present; else no-op
    (mirrors #486 embed-at-mint nullopt byte-identity).
  - select_submit(pow, dgb_target, has_doge_job, doge_target): independent
    per-path thresholds against one scrypt pow_hash (mirrors dc_proof
    DualTargetIndependentThresholds); DOGE-aux only fires when minted.
  - selection_is_consistent(): load-bearing DC<->DB guard,
    fire_doge_aux ==> embed_commitment, coupling submit back to #475/#486.

test/aux_dual_target_select_test.cpp: 5/5 KATs, non-circular goldens
(fabe6d6d tag, embed truth table, independent threshold table, no-job
suppression, the impossible DOGE-win-without-mint state). Registered in
test/CMakeLists.txt + both build.yml --target allowlists (#143 trap).

Fenced dgb/, not rewired, consumes nothing in src/impl/doge, no node
seam touch, zero consensus surface.
@frstrtr
frstrtr merged commit 69f7ed5 into master Jun 25, 2026
47 of 49 checks passed
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