When producing a dummy signature for the purpose of estimating the transaction fee, do not assume an external signer performs R-value grinding on the signature.
In particular, this avoids a scenario where the fee rate is 1 sat / vbyte and a transaction with a 72 byte signature is not accepted into our mempool.
Suggested testing:
-
On master, launch with
-signet
and create an external signer wallet using e.g. a Trezor and HWI, see guide (with the GUI it should “just work” once you have the HWI path configured). -
Create a few addresses and fund them from the faucet: https://signet.bc-2.jp/ (wait for confirmation)
-
Create another address, and now send the entire wallet to it, set the fee to 1 sat/byte
-
Most likely this transaction never gets broadcast and you won’t see it on the signet explorer
-
With this PR, try again.
-
Check the explorer and inspect the transaction. Each input witness starts with either
30440220
(R has 32 bytes) or30440221
(R has 33 bytes). See this explainer for DER encoding.
Fixes #26030