Skip to content

Commit 1d8d779

Browse files
bitschmidtyjnewbery
authored andcommitted
compatibility segwit framework changes, bitcoin-core segwit data
1 parent 6b46159 commit 1d8d779

File tree

5 files changed

+310
-0
lines changed

5 files changed

+310
-0
lines changed

_data/compatibility/bitcoin-core-wallet.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,34 @@ rbf:
7373
- image: /img/compatibility/bitcoin-core/transaction-details-replacement.png
7474
caption: >
7575
Receiving Replacement Transaction - Transaction Details screen for replacement transaction. No RBF note.
76+
segwit:
77+
tested:
78+
date: "2019-03-28"
79+
platforms:
80+
- macOS
81+
version: "0.17.1"
82+
features:
83+
receive:
84+
p2sh_wrapped: "true"
85+
bech32: "true"
86+
default: "p2sh_wrapped"
87+
send:
88+
bech32: "true"
89+
change_bech32: "true"
90+
segwit_v1: "Transaction can be created and broadcast, but does not make it
91+
to the mempool."
92+
bech32_p2wsh: "true"
93+
examples:
94+
- image: /img/compatibility/bitcoin-core/segwit/receive-screen.png
95+
caption: >
96+
Receive - Generate a new address with tooltip. Bech32 option defaults to
97+
unchecked. If checked, the checkbox will still be unchecked once
98+
Bitcoin-Qt is restarted.
99+
- image: /img/compatibility/bitcoin-core/segwit/address-screen.png
100+
caption: >
101+
Address Details - Showing Bech32 address as well as equivalent uri and QR code.
102+
- image: /img/compatibility/bitcoin-core/segwit/send-screen.png
103+
caption: >
104+
Send - By default, the change address takes the same type as the address
105+
being paid to. Can be overridden with change control's 'Custom change
106+
address'.

_data/schemas/compatibility.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,58 @@ properties:
121121
caption:
122122
description: Caption to give the image
123123
type: string
124+
125+
segwit:
126+
description: Container for information about segwit support
127+
type: object
128+
additionalProperties: false
129+
properties:
130+
tested: *tested
131+
examples: *examples
132+
features:
133+
description: Segwit receiving features
134+
type: object
135+
properties:
136+
receive:
137+
description: Features related to generating segwit receive addresses
138+
type: object
139+
properties:
140+
p2sh_wrapped:
141+
description: Does the wallet allow receiving to P2SH-wrapped segwit?
142+
type: string
143+
enum: *feat
144+
bech32:
145+
description: Does the wallet allow receiving to Bech32 native segwit addresses?
146+
type: string
147+
enum: *feat
148+
default:
149+
description: What is the default address receive type?
150+
type: string
151+
enum:
152+
- "p2pkh"
153+
- "p2sh"
154+
- "p2sh_wrapped"
155+
- "p2sh_wrapped_p2wsh"
156+
- "bech32"
157+
- "bech32_p2wsh"
158+
additionalProperties: false
159+
send:
160+
description: Features related to sending to segwit addresses
161+
type: object
162+
properties:
163+
bech32:
164+
description: Does the wallet allow sending to Bech32 native segwit addresses?
165+
type: string
166+
enum: *feat
167+
change_bech32:
168+
description: Does the wallet return change to itself in a Bech32 native segwit address?
169+
type: string
170+
enum: *feat
171+
segwit_v1:
172+
description: Does the wallet allow sending to segwit v1 witnesses?
173+
type: string
174+
bech32_p2wsh:
175+
description: Does the wallet allow sending to Bech32 native segwit p2wsh addresses?
176+
type: string
177+
enum: *feat
178+
additionalProperties: false

_includes/templates/compatibility-page.md

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,166 @@ block chain space used, this is the most efficient form of fee bumping.
208208
{% assign break = forloop.index | modulo:2 %}
209209
{% if break == 0 %}<br clear="both" />{% endif %}
210210
{% endfor %}
211+
212+
213+
## Segwit Addresses
214+
215+
Transactions that spend bitcoins secured by segregated witness (segwit) use less
216+
block weight than equivalent non-segwit (legacy) transactions, allowing
217+
segwit transactions to pay less total fee to achieve the same feerate as legacy transactions.
218+
219+
{% if tool.segwit %}
220+
221+
{% assign tested = tool.segwit.tested. %}
222+
**Tested**: {% if tested.version != "n/a" %} *version {{tested.version}}* {% endif %} on *{{tested.platforms}}*
223+
224+
**Tested on**: *{{tested.date}}*
225+
226+
### Receive support
227+
228+
{% assign segwit = tool.segwit.features. %}
229+
{:id="segwit-receive-p2sh_wrapped"}
230+
{% case segwit.receive.p2sh_wrapped %}
231+
{% when "true" %}{:.feature-yes}
232+
- **Allows receiving to P2SH-wrapped segwit**<br>
233+
Allows the generation of P2SH-wrapped (either P2WPKH or P2WSH) segwit receiving addresses.
234+
{% when "false" %}{:.feature-no}
235+
- **Does not allow receiving to P2SH-wrapped segwit**<br>
236+
Does not allow the generation of P2SH-wrapped (either P2WPKH or P2WSH) segwit receiving addresses.
237+
{% when "na" %}{:.feature-neutral}
238+
- **No receiving capabilities**<br>
239+
There are no receiving capabilities for this service.
240+
{% when "untested" %}{:.feature-neutral}
241+
- **Not tested**<br>
242+
We either didn’t test this or could not appropriately determine the results
243+
{% else %}{% include ERROR_42_UNEXPECTED_VALUE %}
244+
{% endcase %}
245+
246+
{:id="segwit-receive-bech32"}
247+
{% case segwit.receive.bech32 %}
248+
{% when "true" %}{:.feature-yes}
249+
- **Allows receiving to bech32 segwit addresses**<br>
250+
Allows the generation of bech32 native (either P2WPKH or P2WSH) segwit receiving addresses.
251+
{% when "false" %}{:.feature-no}
252+
- **Does not allow receiving to bech32 segwit addresses**<br>
253+
Does not allow the generation of bech32 native (either P2WPKH or P2WSH) segwit receiving addresses.
254+
{% when "na" %}{:.feature-neutral}
255+
- **No receiving capabilities**<br>
256+
There are no receiving capabilities for this service.
257+
{% when "untested" %}{:.feature-neutral}
258+
- **Not tested**<br>
259+
We either didn’t test this or could not appropriately determine the results
260+
{% else %}{% include ERROR_42_UNEXPECTED_VALUE %}
261+
{% endcase %}
262+
263+
{:id="segwit-receive-default"}
264+
{% case segwit.receive.default %}
265+
{% when "p2pkh" %}{:.feature-no}
266+
- **Default receiving address is P2PKH**<br>
267+
This service generates legacy P2PKH receiving addresses by default.
268+
{% when "p2sh" %}{:.feature-no}
269+
- **Default receiving address is P2SH**<br>
270+
This service generates P2SH (not P2SH-wrapped segwit) receiving addresses by
271+
default.
272+
{% when "p2sh_wrapped" %}{:.feature-yes}
273+
- **Default receiving address is P2SH-wrapped P2WPKH**<br>
274+
This service generates P2SH-wrapped P2WPKH segwit receiving addresses by
275+
default.
276+
{% when "p2sh_wrapped_p2wsh" %}{:.feature-yes}
277+
- **Default receiving address is P2SH-wrapped P2WSH**<br>
278+
This service generates P2SH-wrapped P2WSH segwit receiving addresses by default.
279+
{% when "bech32" %}{:.feature-yes}
280+
- **Default receiving address is bech32 P2WPKH**<br>
281+
This service generates bech32 P2WPKH segwit receiving addresses by default.
282+
{% when "bech32_p2wsh" %}{:.feature-yes}
283+
- **Default receiving address is bech32 P2WSH**<br>
284+
This service generates bech32 P2WSH segwit receiving addresses by default.
285+
{% when "na" %}{:.feature-neutral}
286+
- **No receiving capabilities**<br>
287+
There are no receiving capabilities for this service.
288+
{% when "untested" %}{:.feature-neutral}
289+
- **Not tested**<br>
290+
We either didn’t test this or could not appropriately determine the results
291+
{% else %}{% include ERROR_42_UNEXPECTED_VALUE %}
292+
{% endcase %}
293+
294+
### Send support
295+
296+
{:id="segwit-send-bech32"}
297+
{% case segwit.send.bech32 %}
298+
{% when "true" %}{:.feature-yes}
299+
- **Allows sending to bech32 P2WPKH addresses**<br>
300+
Allows sending to bech32 P2WPKH native segwit addresses.
301+
{% when "false" %}{:.feature-no}
302+
- **Does not allow sending to bech32 P2WPKH addresses**<br>
303+
Does not allow sending to bech32 P2WPKH native segwit addresses.
304+
{% when "na" %}{:.feature-neutral}
305+
- **No receiving capabilities**<br>
306+
There are no sending capabilities for this service.
307+
{% when "untested" %}{:.feature-neutral}
308+
- **Not tested**<br>
309+
We either didn’t test this or could not appropriately determine the results
310+
{% else %}{% include ERROR_42_UNEXPECTED_VALUE %}
311+
{% endcase %}
312+
313+
{:id="segwit-send-bech32_p2wsh"}
314+
{% case segwit.send.bech32_p2wsh %}
315+
{% when "true" %}{:.feature-yes}
316+
- **Allows sending to bech32 P2WSH addresses**<br>
317+
Allows sending to bech32 P2WSH native segwit addresses.
318+
{% when "false" %}{:.feature-no}
319+
- **Does not allow sending to bech32 P2WSH addresses**<br>
320+
Does not allow sending to bech32 P2WSH native segwit addresses.
321+
{% when "na" %}{:.feature-neutral}
322+
- **No receiving capabilities**<br>
323+
There are no sending capabilities for this service.
324+
{% when "untested" %}{:.feature-neutral}
325+
- **Not tested**<br>
326+
We either didn’t test this or could not appropriately determine the results
327+
{% else %}{% include ERROR_42_UNEXPECTED_VALUE %}
328+
{% endcase %}
329+
330+
{:id="segwit-send-change_bech32"}
331+
{% case segwit.send.change_bech32 %}
332+
{% when "true" %}{:.feature-yes}
333+
- **Creates bech32 change addresses**<br>
334+
When sending, generates bech32 (either P2WPKH or P2WSH) segwit change addresses.
335+
{% when "false" %}{:.feature-no}
336+
- **Does not create bech32 change addresses**<br>
337+
When sending, does not generate bech32 (either P2WPKH or P2WSH) segwit change addresses.
338+
{% when "na" %}{:.feature-neutral}
339+
- **No receiving capabilities**<br>
340+
There are no sending capabilities for this service.
341+
{% when "untested" %}{:.feature-neutral}
342+
- **Not tested**<br>
343+
We either didn’t test this or could not appropriately determine the results
344+
{% else %}{% include ERROR_42_UNEXPECTED_VALUE %}
345+
{% endcase %}
346+
347+
{:id="segwit-send-segwit_v1"}
348+
{:.feature-neutral}
349+
- **How is sending to segwit v1 addresses handled?**<br>
350+
{{ segwit.send.segwit_v1 }}
351+
352+
### Usability
353+
354+
*Click on a thumbnail for a larger image or to the play its video.*
355+
356+
{% for example in tool.segwit.examples %}{% capture /dev/null %}
357+
{% if example.link %}
358+
{% assign link = example.link %}
359+
{% else %}
360+
{% assign link = example.image %}
361+
{% endif %}
362+
{% endcapture %}
363+
<div markdown="1" class="compat-usability">
364+
[![{{example.caption|escape_once}}]({{example.image}}){:width="250px"}]({{link}})
365+
<br /><span class="compat-caption">{{example.caption}}</span>
366+
</div>
367+
{% assign break = forloop.index | modulo:2 %}
368+
{% if break == 0 %}<br clear="both" />{% endif %}
369+
{% endfor %}
370+
371+
{% else %}
372+
*We have not yet tested {{tool.name}} for segwit capabilities.*
373+
{% endif %}

en/compatibility.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,64 @@ h1, h2, h3, h4, h5, h6 { text-align: center; }
5252
{% endfor %}
5353

5454
</table>
55+
56+
## Segwit Addresses
57+
58+
<table class="compatibility">
59+
<tr>
60+
<th></th>
61+
<th colspan="3">Receiving support</th>
62+
<th colspan="4">Sending support</th>
63+
</tr>
64+
<tr>
65+
<th></th>
66+
<th>P2SH-wrapped</th>
67+
<th>bech32</th>
68+
<th>default address</th>
69+
<th>P2WPKH</th>
70+
<th>P2WSH</th>
71+
<th>bech32 change</th>
72+
<th>segwit v1</th>
73+
</tr>
74+
75+
{% assign tools = site.data.compatibility | sort %}
76+
{% for wrapped_tool in tools %}
77+
{% assign tool = wrapped_tool[1] %}
78+
<tr>
79+
<td><a href="{{tool.internal_url}}#segwit-addresses">{{tool.name}}</a></td>
80+
{% if tool.segwit %}
81+
82+
{% assign segwit_receive_default = "" %}
83+
{% case tool.segwit.features.receive.default %}
84+
{% when "p2pkh" %}
85+
{% assign segwit_receive_default = "P2PKH" %}
86+
{% when "p2sh" %}
87+
{% assign segwit_receive_default = "P2SH" %}
88+
{% when "p2sh_wrapped" %}
89+
{% assign segwit_receive_default = "P2SH-P2WPKH" %}
90+
{% when "p2sh_wrapped_p2wsh" %}
91+
{% assign segwit_receive_default = "P2SH-P2WSH" %}
92+
{% when "bech32" %}
93+
{% assign segwit_receive_default = "P2WPKH" %}
94+
{% when "bech32_p2wsh" %}
95+
{% assign segwit_receive_default = "P2WSH" %}
96+
{% when "na" %}
97+
{% when "untested" %}
98+
{% assign cell_label = "?" %}
99+
{% else %}{% include ERROR_43_unexpected_value %}
100+
{% endcase %}
101+
102+
{% include functions/compat-cell.md state=tool.segwit.features.receive.p2sh_wrapped anchor="#segwit-receive-p2sh_wrapped" %}
103+
{% include functions/compat-cell.md state=tool.segwit.features.receive.bech32 anchor="#segwit-receive-bech32" %}
104+
<td class="compat default"><a href="{{tool.internal_url}}#segwit-receive-default">{{segwit_receive_default}}</a></td>
105+
{% include functions/compat-cell.md state=tool.segwit.features.send.bech32 anchor="#segwit-send-bech32" %}
106+
{% include functions/compat-cell.md state=tool.segwit.features.send.bech32_p2wsh anchor="#segwit-send-bech32_p2wsh" %}
107+
{% include functions/compat-cell.md state=tool.segwit.features.send.change_bech32 anchor="#segwit-send-change_bech32" %}
108+
<td class="compat default"><a href="{{tool.internal_url}}#segwit-send-segwit_v1">...</a></td>
109+
{% else %}
110+
<td colspan="7" class="default"></td>
111+
{% endif %}
112+
</tr>
113+
{% endfor %}
114+
115+
</table>
Loading

0 commit comments

Comments
 (0)