bch(kat): coinbase DGB<->BCH byte-vector pairing (slice 2) -- p2poolBCH oracle ground-truth - #195
Merged
Merged
Conversation
…ctor vs p2poolBCH util/pack ground-truth Serializes a full BCH legacy (no-SegWit) coinbase via coin/transaction.hpp and pins the bytes against ground-truth emitted by the p2poolBCH reference packer (p2pool/util/pack.py tx_id_type, the same oracle the share/PPLNS sweep used). Catches any drift in field order, CompactSize/VarStr length-prefixing, int endianness, or an accidental SegWit marker/flag byte. Completes the byte-vector half promised by slice 1 (coinbase_kat_segwit_predicate_test). Wired as a dedicated executable (links transaction.cpp for the out-of-line MutableTransaction ctor), same link set as block_connector_test. p2pool-merged-v36 surface: none.
Slice 2 of the DGB<->BCH coinbase KAT pairing added bch_coinbase_kat_bytevector_test (CMake add_executable + add_test) but did not wire it into the explicit --target list the COIN_BCH build legs enumerate, so the executable never compiled. ctest still saw the add_test registration and reported it ***Not Run -> 1/20 failed on both the Linux Release and ASan+UBSan legs. Add the target alongside its slice-1 sibling bch_coinbase_kat_segwit_predicate_test in both legs. Test-only, mirrors the existing enumeration; no source or consensus change.
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.
BCH coinbase KAT — byte-vector pairing (slice 2)
Standalone BCH-lane PR for the DGB<->BCH coinbase-byte KAT pairing. Separate PR by design (per-coin isolation): does NOT fold into DGB #171; #171 stays DGB-tree only.
What this adds
src/impl/bch/test/coinbase_kat_bytevector_test.cpp— full-coinbase serialize byte-vector asserted against p2poolBCHutil/pack+data.pyoracle ground-truth (gentx_before_refhash: DONATION_SCRIPT || int64(0) || OP_RETURN refhash stub). Vectors are oracle-derived, not self-generated.bch_-prefixed ctest target viasrc/impl/bch/test/CMakeLists.txt— runs on the COIN_BCH Linux Release + ASan legs.Relationship to slice 1
Slice 1 (
coinbase_kat_segwit_predicate_test.cpp, pins the gated-segwit-OFF predicate = the one real DGB<->BCH divergence) already landed in master via #156. This PR is slice 2 only, rebased onto master.Conformance
Builder under test =
coinbase_commitment.hpp, already verified conformant vs p2poolBCH @6603b79. This is KAT-vector pinning, not a re-author. Zero p2pool-v36 surface change.Merge operator-gated.