btc(v36 F11): canonical donation-script output exclusion + value-invariance KAT - #355
Merged
Conversation
Mirror of LTC v36 commit 18dd945 onto the BTC variant. All three gentx sites (generate_share_transaction / create_local_share_v35 / create_local_share) now exclude BOTH donation scripts (COMBINED + P2PK) from per-miner payout dests and fold the COMBINED_DONATION_SCRIPT-keyed weight into the single donation-last output. Rides core/donation.hpp SSOT (FLAG6 #139). No F1 entanglement (F11 touches only the payout-sort path). Prep-branch staging; PR stays unopened until integrator dispatches the F-mirror post crossing-soak (#97). +51/-6, matches LTC F11 line counts.
Mirror ltc-doge #349 (31a0c2e): factor the canonical exclude-then-append donation handling at the three gentx sites into build_payout_outputs_excluding_donation(), and guard the parity arithmetic with a 5-case value-invariance KAT (BTC_F11_DonationInvariance) — the test shape that backfills the coverage gap which let PR-0 S1 silently revert LTC F11. KAT over core::donation SSOT constants: (a) value invariance, (b) COMBINED weight folds into donation-last, (c) both donation scripts excluded from per-miner dests, (d) P2PK-drop boundary (value-neutral iff P2PK weight==0), (e) real-consensus-bytes pin (23B P2SH / 67B P2PK). Wire share_test.cpp as btc_share_test (twin of ltc share_test, uniquely named to avoid the CMP0002 collision; btc had no live share_test - B0-deferred). Add btc_share_test to build.yml --target allowlist; drift-guard green (67). 5/5 KAT + 6/6 btc_share_test suite local-green.
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
btc(v36 F11): canonical donation-script output exclusion + value-invariance KAT
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.
BTC F-mirror F11 — last V36 parity milestone for BTC (F1/F2/F10 already in). Mirrors LTC F11 (#349) onto the BTC SHA256d sharechain.
What
share_check.hpp: canonical exclude-then-append donation handling in the payout sort — both donation scripts (P2SH combined + P2PK) are excluded from per-miner destinations, donation folded into the single donation-last output. Factored into a donation-exclude helper.f11_donation_invariance_test.cpp: value-invariance KAT, same shape as LTCf11_donation_invariance_test(ltc(v36): re-apply F11 canonical donation fold + value-invariance KAT #349). 5 cases proving the exclusion is byte/value-identical: combined-fold, both-scripts-excluded, no-donation-keys identity, dropped-P2PK-weight leak accounting, and real donation-constant pinning. Core invariant:sum(payout_outputs) + donation_amount == subsidy(no value created/destroyed).Fence
src/impl/btconly, plus thebtc_share_testCI allowlist entry inbuild.yml(the standard dgb: conform subsidy to p2pool-dgb-scrypt oracle (COIN=1e6, weeks+1) [COMPAT] #137 NOT_BUILT convention) and the test CMake wiring (uniquely-named target to avoid the CMP0002 collision with ltcshare_test).Verification
btc_share_test6/6 PASS (5 F11 invariance KATs + share_test init).Consensus payout-output change — for operator tap. I do not self-merge.