From 12eae455b239e63b7af80928df97294bf5557bd7 Mon Sep 17 00:00:00 2001 From: btc-heap-opt-2026-05 Date: Wed, 17 Jun 2026 14:24:27 +0000 Subject: [PATCH] btc(donation): emit forrestv P2PK on v36 gentx, not LTC P2SH (FLAG6) BTC get_donation_script() returned the LTC COMBINED P2SH for share_version >= 36, so the BTC v36 gentx leg (share_check.hpp:2940) paid the LTC dev-fund P2SH instead of forrestv canonical BTC-mainnet P2PK. Return the 67-byte P2PK (0x41 .. 04ffd03de4 .. 0xac) on all versions; COMBINED P2SH stays inert (LTC-only). BTC-only; static-analysis verified (canary a1 predates v36). FLAG6 conformance vs BTC own jtoomim/forrestv baseline. --- src/impl/btc/config_pool.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/impl/btc/config_pool.hpp b/src/impl/btc/config_pool.hpp index 6d72150e4..aab8e18ef 100644 --- a/src/impl/btc/config_pool.hpp +++ b/src/impl/btc/config_pool.hpp @@ -134,13 +134,14 @@ class PoolConfig : protected core::Fileconfig 0x87 // OP_EQUAL }; - // Returns the correct donation script based on share version. - // Pre-V36 shares use the original P2PK donation script. - // V36+ shares use the combined P2SH 1-of-2 multisig script. - static std::vector get_donation_script(int64_t share_version) + // BTC donation leg is forrestv's canonical P2PK on ALL share versions, + // including v36+ (FLAG6 conformance vs BTC's own jtoomim/forrestv baseline). + // The COMBINED P2SH script above is the LTC v36 donation target and is + // NEVER selected for BTC: returning it from a BTC gentx would pay the LTC + // dev-fund P2SH instead of forrestv's BTC-mainnet P2PK. The version arg is + // retained for signature parity with the LTC config but is ignored here. + static std::vector get_donation_script(int64_t /*share_version*/) { - if (share_version >= 36) - return {COMBINED_DONATION_SCRIPT.begin(), COMBINED_DONATION_SCRIPT.end()}; return {DONATION_SCRIPT.begin(), DONATION_SCRIPT.end()}; }