Skip to content

fix(dgb): P0 master-red — pin reconstruct test merkle_root to actual tx-vector root - #315

Merged
frstrtr merged 1 commit into
masterfrom
dgb/fix-reconstruct-coinbasefirst
Jun 22, 2026
Merged

fix(dgb): P0 master-red — pin reconstruct test merkle_root to actual tx-vector root#315
frstrtr merged 1 commit into
masterfrom
dgb/fix-reconstruct-coinbasefirst

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 22, 2026

Copy link
Copy Markdown
Owner

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.

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
frstrtr merged commit ca7c7dc into master Jun 22, 2026
31 checks passed
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
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