dgb(DC): AuxPoW proof byte-parity + dual-target KAT, explicit DGB parent binding - #395
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.