Commit 710cab1
committed
Merge bitcoin/bitcoin#26032: wallet: skip R-value signature grinding for external signers
807de2c wallet: skip R-value grinding for external signers (Sjors Provoost)
72b763e wallet: annotate bools in descriptor SPKM FillPSBT() (Sjors Provoost)
Pull request description:
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:
1. On master, launch with `-signet` and create an external signer wallet using e.g. a Trezor and HWI, see [guide](https://github.com/bitcoin/bitcoin/blob/master/doc/external-signer.md#example-usage) (with the GUI it should "just work" once you have the HWI path configured).
2. Create a few addresses and fund them from the faucet: https://signet.bc-2.jp/ (wait for confirmation)
3. Create another address, and now send the entire wallet to it, set the fee to 1 sat/byte
4. Most likely this transaction never gets broadcast and you won't see it on the [signet explorer](https://explorer.bc-2.jp)
5. With this PR, try again.
6. Check the explorer and inspect the transaction. Each input witness starts with either `30440220` (R has 32 bytes) or `30440221` (R has 33 bytes). See this explainer for [DER encoding](https://bitcoin.stackexchange.com/questions/92680/what-are-the-der-signature-and-sec-format).
Fixes #26030
ACKs for top commit:
S3RK:
ACK 807de2c
achow101:
ACK 807de2c
furszy:
ACK 807de2c
ishaanam:
utACK 807de2c
Tree-SHA512: 64f626a3030ef0ab1e43af86d8fba113151512561baf425e6e5182af53df3a64fa9e85c7f67bf4ed15b5ad6e5d5afc7fbba8b6e1f3bad388e48db51cb9446074File tree
5 files changed
+27
-16
lines changed- src/wallet
5 files changed
+27
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2495 | 2495 | | |
2496 | 2496 | | |
2497 | 2497 | | |
2498 | | - | |
| 2498 | + | |
2499 | 2499 | | |
2500 | 2500 | | |
2501 | 2501 | | |
| |||
2536 | 2536 | | |
2537 | 2537 | | |
2538 | 2538 | | |
2539 | | - | |
| 2539 | + | |
2540 | 2540 | | |
2541 | 2541 | | |
2542 | 2542 | | |
| |||
2553 | 2553 | | |
2554 | 2554 | | |
2555 | 2555 | | |
2556 | | - | |
| 2556 | + | |
2557 | 2557 | | |
2558 | 2558 | | |
2559 | 2559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
184 | | - | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| |||
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
308 | | - | |
| 310 | + | |
309 | 311 | | |
310 | 312 | | |
311 | 313 | | |
| |||
828 | 830 | | |
829 | 831 | | |
830 | 832 | | |
831 | | - | |
| 833 | + | |
832 | 834 | | |
833 | 835 | | |
834 | 836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1642 | 1642 | | |
1643 | 1643 | | |
1644 | 1644 | | |
1645 | | - | |
| 1645 | + | |
1646 | 1646 | | |
1647 | 1647 | | |
1648 | 1648 | | |
1649 | 1649 | | |
1650 | 1650 | | |
1651 | 1651 | | |
1652 | 1652 | | |
1653 | | - | |
| 1653 | + | |
1654 | 1654 | | |
1655 | 1655 | | |
1656 | 1656 | | |
| |||
1706 | 1706 | | |
1707 | 1707 | | |
1708 | 1708 | | |
| 1709 | + | |
1709 | 1710 | | |
1710 | 1711 | | |
1711 | 1712 | | |
| |||
1718 | 1719 | | |
1719 | 1720 | | |
1720 | 1721 | | |
1721 | | - | |
1722 | | - | |
| 1722 | + | |
| 1723 | + | |
1723 | 1724 | | |
1724 | 1725 | | |
1725 | 1726 | | |
| |||
4081 | 4082 | | |
4082 | 4083 | | |
4083 | 4084 | | |
| 4085 | + | |
| 4086 | + | |
| 4087 | + | |
| 4088 | + | |
| 4089 | + | |
4084 | 4090 | | |
4085 | 4091 | | |
4086 | 4092 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
947 | 947 | | |
948 | 948 | | |
949 | 949 | | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
950 | 953 | | |
951 | 954 | | |
952 | 955 | | |
| |||
1004 | 1007 | | |
1005 | 1008 | | |
1006 | 1009 | | |
1007 | | - | |
| 1010 | + | |
1008 | 1011 | | |
1009 | 1012 | | |
1010 | 1013 | | |
| |||
0 commit comments