diff --git a/doc/release-notes-20861.md b/doc/release-notes-20861.md index 5c68e4ab0c..2a7902e119 100644 --- a/doc/release-notes-20861.md +++ b/doc/release-notes-20861.md @@ -1,3 +1,25 @@ +Wallet and signing +------------------ + +- ELEMENTS: The default sighash used when signing pre-Taproot (legacy and + segwit v0) inputs now commits to the output rangeproofs on chains where + `SIGHASH_RANGEPROOF` is active (i.e. dynafed is active). Concretely, when no + sighash type is specified, the wallet, the `signrawtransactionwithkey` / + `signrawtransactionwithwallet` / `walletprocesspsbt` / `descriptorprocesspsbt` + RPCs, and `elements-tx` now default to `SIGHASH_ALL|RANGEPROOF` instead of + `SIGHASH_ALL`. This removes the previous default's third-party rangeproof + (witness) malleability and matches the rangeproof coverage that Taproot inputs + already have. + + The new default is gated on activation: node-backed signing checks live + dynafed activation at the current tip, while the offline `elements-tx` tool + gates on the selected chain's parameters (only chains where dynafed is always + active). On chains where `SIGHASH_RANGEPROOF` is not active, the historical + `SIGHASH_ALL` default is used so that signatures remain standard and valid. + Taproot signing is unaffected: the `SIGHASH_RANGEPROOF` bit is ignored for + Taproot (which always commits to rangeproofs). Users can still request any + specific sighash type explicitly to override the default. + Updated RPCs ------------ diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 83e6435fc4..2ac0fb357e 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -5,6 +5,7 @@ #include // IWYU pragma: keep #include +#include #include #include #include @@ -21,6 +22,7 @@ #include