fix(dgb): P0 master-red — pin reconstruct test merkle_root to actual tx-vector root - #315
Merged
Merged
Conversation
The CoinbaseFirstThenRefOrder test asserted the won-block header merkle_root equals gentx_hash for the empty-merkle_link case. That held under the old reconstruct_block_header merkle_link walk, but b91face (#303 bad-txnmrklroot fix) correctly recomputes the header root over the ACTUAL block tx vector ([gentx_hash] ++ other-tx txids) so header and body stay consistent for tx-bearing won blocks. With 2 other_txs the root is no longer gentx_hash, so the stale assertion failed on master. Re-pin the assertion to the production invariant via the same build_block_merkle_root + compute_txid SSOT the assembler uses, so the test now guards header/body merkle consistency instead of the obsolete empty-walk identity. Test-only; no behavior change.
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
fix(dgb): P0 master-red — pin reconstruct test merkle_root to actual tx-vector root
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.
P0 master-CI-red fix.
DgbReconstructWonBlock.CoinbaseFirstThenRefOrder failed on master head ee24e55 (1 failed / 1028). Root cause: the test asserted the won-block header merkle_root == gentx_hash for the empty-merkle_link case, which only held under the old reconstruct_block_header merkle_link walk. b91face (#303 bad-txnmrklroot fix) correctly recomputes the header root over the ACTUAL block tx vector ([gentx_hash] ++ other-tx txids) so header/body stay consistent for tx-bearing won blocks — with 2 other_txs the root is no longer gentx_hash, so the stale assertion fired.
Fix is test-only: re-pin the assertion to the production invariant via the same build_block_merkle_root + compute_txid SSOT the assembler uses. No source/behavior change. Local: dgb_reconstruct_won_block_test 9/9 green.
Per-coin isolation: src/impl/dgb/ only. p2pool-merged-v36 surface: none.