Skip to content

Commit 2010cf4

Browse files
committed
Merge pull request bitcoin#291 from JornC/segwit-address
BIP142 - Typos and grammar
2 parents e38e909 + 4866fcd commit 2010cf4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

bip-0142.mediawiki

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ To define standard payment address for native segregated witness (segwit) transa
1919

2020
The new Bitcoin address format defined is for the Pay-to-Witness-Public-Key-Hash (P2WPKH) and Pay-to-Witness-Script-Hash (P2WSH) transaction described in segregated witness soft fork (BIP141). The scriptPubKey is an OP_0 followed by a push of 20-byte-hash (P2WPKH) or 32-byte hash (P2WSH).
2121

22-
The new address is encoded in a simlar way as existing address formats:
22+
The new address is encoded in a way similar to existing address formats:
2323

2424
base58-encode:
2525
[1-byte address version]
@@ -32,23 +32,23 @@ For P2WPKH address, the address version is 6 (0x06) for a main-network address o
3232

3333
For P2WSH address, the address version is 10 (0x0A) for a main-network address or 40 (0x28) for a testnet address.
3434

35-
The witness program version is an 1-byte value between 0 (0x00) and 16 (0x10). Only version 0 is defined in BIP141. Versions 1 to 16 are reserved for future extensions.
35+
The witness program version is a 1-byte value between 0 (0x00) and 16 (0x10). Only version 0 is defined in BIP141. Versions 1 to 16 are reserved for future extensions.
3636

37-
Following the witness program version is a 0x00 padding to make sure that each witness program version will have an unique prefix.
37+
Following the witness program version is a 0x00 padding to make sure that each witness program version will have a unique prefix.
3838

3939
Following the padding is the program hash, 20 byte for a P2WPKH address and 32 byte for a P2WSH address.
4040

4141
The 4-byte checksum is the first four bytes of the double SHA256 hash of the serialization of the previous items.
4242

43-
All addresses generated with this scheme will have a constant length, with 36 digits for 20-byte and 53 digits for 32-byte. Different witness program version will have an unique prefix shown in the following table:
43+
All addresses generated with this scheme will have a constant length, with 36 digits for 20-byte and 53 digits for 32-byte. Different witness program versions will have a unique prefix, as shown in the following table:
4444

4545
{|class="wikitable" style="text-align: center;"
4646
|-
4747
!rowspan=3 style=""|Witness program version
4848
!colspan=4 style=""|Hash size
4949
|-
50-
!colspan=2 style=""|20-byte (36 digits)
51-
!colspan=2 style=""|32-byte (53 digits)
50+
!colspan=2 style=""|20-byte (36 characters)
51+
!colspan=2 style=""|32-byte (53 characters)
5252
|-
5353
!Mainnet
5454
!Testnet
@@ -94,12 +94,12 @@ All addresses generated with this scheme will have a constant length, with 36 di
9494

9595
== Rationale ==
9696

97-
The BIP141 defines 2 ways of encoding "witness program", a data push of 2 to 32 bytes:
97+
BIP141 defines 2 ways of encoding a "witness program", a data push of 2 to 32 bytes:
9898

9999
* A native witness program output is a scriptPubKey with a push of version byte followed by a push of witness program, and nothing else;
100100
* Segwit-in-P2SH is a BIP16 P2SH redeemScript with a push of version byte followed by a push of witness program, while the scriptPubKey looks like a normal P2SH output.
101101
102-
As the BIP13 P2SH address has been defined in 2012, using segwit-in-P2SH allows most existing wallets to pay a segwit-compatible wallet without any upgrade. However, this method requires more block space and is only a short-term solution to make the transition smoother. Eventually, all users are expected to use the more efficient native witness program as the primary payment method.
102+
Considering the BIP13 P2SH address has been defined in 2012, using segwit-in-P2SH allows most existing wallets to pay a segwit-compatible wallet without any upgrade. However, this method requires more block space and is only a short-term solution to make the transition smoother. Eventually, all users are expected to use the more efficient native witness program as the primary method of payment.
103103

104104
The drawbacks of Bitcoin addresses have been extensively discussed in BIP13. Since then, better payment methods have been proposed or deployed, for example:
105105
*BIP47 Reusable Payment Codes for Hierarchical Deterministic Wallets
@@ -108,13 +108,13 @@ The drawbacks of Bitcoin addresses have been extensively discussed in BIP13. Sin
108108
109109
However, none of these are as widely adopted as the suboptimal base-58 scriptPubKey template addresses, which is still a standard for the whole eco-system, from wallets, block explorers, merchants, exchanges, to end users. It is believed that the proposed P2WPKH and P2WSH address format is the easiest way for wallets and services to adopt native witness program, which is particularly important in the context of scaling the capacity of the blockchain.
110110

111-
While P2WPKH address is specific for simple payment to a single public key, P2WSH address allows arbitrarily complex segwit transactions, resemble to the BIP13 P2SH address.
111+
While P2WPKH address is specific for simple payment to a single public key, P2WSH address allows arbitrarily complex segwit transactions, similar to the BIP13 P2SH address.
112112

113113
== Compatibility ==
114114

115-
This proposal is not backward compatible. However, an older implementation will report the new address type as invalid and will refuse to create a transaction.
115+
This proposal is not backward-compatible. However, an older implementation will report the new address type as invalid, and refuse to create a transaction.
116116

117-
This proposal is forward compatible to the future versions of witness program of 20 and 32 bytes.
117+
This proposal is forward-compatible with future versions of witness programs of 20 and 32 bytes.
118118

119119
== Example ==
120120

@@ -126,15 +126,15 @@ when encoded as a P2PKH template, would become:
126126

127127
DUP HASH160 <010966776006953D5567439E5E39F86A0D273BEE> EQUALVERIFY CHECKSIG
128128
129-
And the corresponding version 1 Bitcoin address is
129+
With the corresponding version 1 Bitcoin address being:
130130

131131
16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM
132132
133133
When the same public key is encoded as P2WPKH, the scriptPubKey becomes:
134134

135135
OP_0 <010966776006953D5567439E5E39F86A0D273BEE>
136136
137-
Using 0x06 as witness version, followed 0x00 as witness version, and a 0x00 padding, the equivalent P2WPKH address is:
137+
Using 0x06 as address version, followed by 0x00 as witness program version, and a 0x00 padding, the equivalent P2WPKH address is:
138138

139139
p2xtZoXeX5X8BP8JfFhQK2nD3emtjch7UeFm
140140

0 commit comments

Comments
 (0)