Skip to content

dgb(DC): AuxPoW proof byte-parity + dual-target KAT, explicit DGB parent binding - #395

Merged
frstrtr merged 1 commit into
masterfrom
dgb/doge-mm-dc
Jun 24, 2026
Merged

dgb(DC): AuxPoW proof byte-parity + dual-target KAT, explicit DGB parent binding#395
frstrtr merged 1 commit into
masterfrom
dgb/doge-mm-dc

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 24, 2026

Copy link
Copy Markdown
Owner

First DC slice — fenced, test-only KAT dgb_aux_doge_dc_proof_test (4/4 green locally). Pins load-bearing DC contracts before any run-loop wiring consumes them (deep-spec 2/3/9).

Scope (consume-only): only src/impl/dgb/test/ + .github/workflows/build.yml allowlist (both --target arms, #143 NOT_BUILT guard). ZERO edits under src/impl/doge/coin/.

Explicit DGB parent binding at every call site (THE TRAP handled): doge::coin::CAuxPowdgb::coin::MutableTransaction, doge::coin::parse_aux_header<PackStream, dgb::coin::MutableTransaction>. No bare CAuxPow<>/parse_aux_header in code.

Invariants: (1) build_auxpow_proof(DGB)==serialization of equivalent CAuxPow, byte-identical; (2) proof under DOGE header round-trips parse_aux_header<…,dgb> to identical bytes; (3) recovered parent coinbase==witness-stripped DGB coinbase DB committed (#314); (4) dual-target share-check fires DGB-parent and DOGE-aux independently on same scrypt pow_hash.

Base off live master (#367/f649af758); #313 commits a07cbfa/1e8aa72a/1955c185 confirmed ancestors. GPG-signed.

…ent binding

Cut the DGB+DOGE merged-mining phase DC branch off master. First DC slice:
a fenced, test-only KAT (dgb_aux_doge_dc_proof_test) that pins the load-bearing
DC contracts before any run-loop wiring consumes them.

The shared aux module (src/impl/doge/coin/auxpow.hpp) and parse_aux_header
default their parent coinbase type to ltc::coin::MutableTransaction. Relying on
that default under a DGB parent would silently serialize LTC-shaped bytes
(MWEB/HogEx fields DGB lacks) with no compile error. Every instantiation and
call site here binds the DGB parent type EXPLICITLY:
  doge::coin::CAuxPow<dgb::coin::MutableTransaction>
  doge::coin::parse_aux_header<PackStream, dgb::coin::MutableTransaction>

Pins, all cross-path / round-trip invariants (no external golden):
  - c2pool::merged::build_auxpow_proof(DGB inputs) is byte-identical to the
    serialization of the equivalent CAuxPow<dgb::coin::MutableTransaction>.
  - that proof, framed under a DOGE header carrying the 0x100 AuxPoW version
    bit, round-trips through parse_aux_header back to identical bytes.
  - the recovered parent coinbase equals the witness-stripped DGB coinbase DB
    committed (the DB<->DC parent_coinbase_no_witness trait contract, #314).
  - the dual-target share-check fires the DGB-parent and DOGE-aux paths
    independently against the same scrypt pow_hash.

Consumes the shared module + the neutral c2pool/merged primitive read-only;
modifies nothing in src/impl/doge/coin/. Registered in test/CMakeLists.txt and
both build.yml --target arms (NOT_BUILT sentinel guard). 4/4 green.
@frstrtr
frstrtr merged commit cd73de9 into master Jun 24, 2026
32 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