bch: gate work-source donation script on v36 (P2SH) — close recompute/GENTX residual - #653
Closed
frstrtr wants to merge 1 commit into
Closed
Conversation
… version Shares are authored v36-native (pool_entrypoint result.share_version=36), and generate_share_transaction rebuilds the coinbase donation with get_donation_script(36) -> 23-byte COMBINED P2SH. The work source still served get_donation_script(35) -> 67-byte forrestv P2PK, so the miner-hashed template coinbase and the verify-side rebuild diverged at the donation output (first diverging byte offset 104: script-len 0x43 P2PK vs 0x17 P2SH) on every non-genesis share -> 100 percent recompute/GENTX mismatch. Gate the work-source donation on 36 to match. Regtest grind 12/12 accepted, GENTX-MISMATCH 10->0, chain==verified 12/12, author coinbase now byte-matches verify rebuild.
Owner
Author
|
Closing: sole commit f049bd7 is already in origin/master (landed via the #652/#654 stack merge 2026-07-09 16:00). Base ref bch/v36-author-verify-preimage is an orphaned feature branch, not master; merging here would not touch master. Content confirmed present — redundant PR. Reopen if this analysis is wrong. |
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.
Stacks on #652 (bch/v36-author-verify-preimage). Fences to src/impl/bch/pool_entrypoint.hpp only.
Root (byte-diff)
Shares author v36-native (result.share_version=36), and generate_share_transaction rebuilds the coinbase donation with get_donation_script(36) -> 23-byte COMBINED P2SH. The work source still served get_donation_script(35) -> 67-byte forrestv P2PK. The miner-hashed template coinbase and the verify-side rebuild therefore diverged at the donation output:
=> 100 percent recompute/GENTX mismatch on every non-genesis share (genesis is 100-percent-donation single-output, structurally different).
Fix
One line: work_source->set_donation_script(get_donation_script(36)) to match authored version.
Evidence (regtest grind, demo floors 207fffff/1d00ffff)
Attribution-clean, GPG-signed 285EFE76. NOT self-merged — operator merge-tap.