Edited ch07_authorization-authentication.adoc with Atlas code editor

develop
clenser 7 months ago
parent 52f4c7c80c
commit 446bbfcb41

@ -1267,7 +1267,7 @@ inside a P2SH script.
[[p2wpkh]]
===== Pay to witness public key hash (P2WPKH)
Let's start ((("P2WPKH (pay to witness public key hash)", id="p2wpkh")))((("output scripts", "P2WPKH (pay to witness public key hash)", id="output-script-p2wpkh")))by looking at the example of a P2PKH
Let's start ((("scripts", "segregated witness", "P2WPKH", id="script-segwit-p2wpkh")))((("segregated witness (segwit)", "scripts and", "P2WPKH", id="segwit-script-p2wpkh")))((("P2WPKH (pay to witness public key hash)", id="p2wpkh")))((("output scripts", "P2WPKH (pay to witness public key hash)", id="output-script-p2wpkh")))by looking at the example of a P2PKH
output script:
.Example P2PKH output script
@ -1349,13 +1349,13 @@ P2WPKH should be constructed by the receiver by converting a compressed
public key to a P2WPKH hash. Neither the spender nor anyone else should
ever transform a P2PKH script, Bitcoin address, or uncompressed public
key to a P2WPKH witness script. In general, a spender should only send
to the receiver in the manner that the receiver ((("P2WPKH (pay to witness public key hash)", startref="p2wpkh")))((("output scripts", "P2WPKH (pay to witness public key hash)", startref="output-script-p2wpkh")))indicated.
to the receiver in the manner that the receiver ((("scripts", "segregated witness", "P2WPKH", startref="script-segwit-p2wpkh")))((("segregated witness (segwit)", "scripts and", "P2WPKH", startref="segwit-script-p2wpkh")))((("P2WPKH (pay to witness public key hash)", startref="p2wpkh")))((("output scripts", "P2WPKH (pay to witness public key hash)", startref="output-script-p2wpkh")))indicated.
====
[[p2wsh]]
===== Pay to witness script hash
The ((("P2WSH (pay to witness script hash)", id="p2wsh")))((("output scripts", "P2WSH (pay to witness script hash)", id="output-script-p2wsh")))second type of
The ((("scripts", "segregated witness", "P2WSH", id="script-segwit-p2wsh")))((("segregated witness (segwit)", "scripts and", "P2WSH", id="segwit-script-p2wsh")))((("P2WSH (pay to witness script hash)", id="p2wsh")))((("output scripts", "P2WSH (pay to witness script hash)", id="output-script-p2wsh")))second type of
segwit v0 witness program corresponds to a pay to script hash (P2SH) script. We
saw this type of script in <<p2sh>>. In that example, P2SH was used by
Mohammed's company to express a multisignature script. Payments to
@ -1431,7 +1431,7 @@ the legacy input script field:
===== Differentiating between P2WPKH and P2WSH
In the((("P2WPKH (pay to witness public key hash)")))((("output scripts", "P2WPKH (pay to witness public key hash)"))) previous two sections, we demonstrated two types of witness
In the((("scripts", "segregated witness", "P2WPKH")))((("segregated witness (segwit)", "scripts and", "P2WPKH")))((("P2WPKH (pay to witness public key hash)")))((("output scripts", "P2WPKH (pay to witness public key hash)"))) previous two sections, we demonstrated two types of witness
programs: <<p2wpkh>> and <<p2wsh>>. Both types of witness programs
consist of the same version number followed by a data push. They
look very similar, but are interpreted very differently: one is
@ -1444,7 +1444,7 @@ critical difference between them is the length of the witness program:
This is the one difference that allows a full node to differentiate between
the two types of witness programs. By looking at the length of the hash,
a node can determine what type of witness program it is, P2WPKH ((("P2WSH (pay to witness script hash)", startref="p2wsh")))((("output scripts", "P2WSH (pay to witness script hash)", startref="output-script-p2wsh")))or
a node can determine what type of witness program it is, P2WPKH ((("P2WSH (pay to witness script hash)", startref="p2wsh")))((("output scripts", "P2WSH (pay to witness script hash)", startref="output-script-p2wsh")))((("scripts", "segregated witness", "P2WSH", startref="script-segwit-p2wsh")))((("segregated witness (segwit)", "scripts and", "P2WSH", startref="segwit-script-p2wsh")))or
P2WSH.
==== Upgrading to Segregated Witness

Loading…
Cancel
Save