1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2025-08-02 03:48:10 +00:00

CH07: drop cafe tx since we're not using that tx

This commit is contained in:
David A. Harding 2023-03-14 09:43:07 -10:00
parent 66c0861b62
commit 9acf053805

View File

@ -240,7 +240,7 @@ the scriptSig has succeeded in resolving the conditions imposed
by the scriptPubKey and, therefore, the input is a valid authorization by the scriptPubKey and, therefore, the input is a valid authorization
to spend the UTXO. If any result other than "TRUE" remains after to spend the UTXO. If any result other than "TRUE" remains after
execution of the combined script, the input is invalid because it has execution of the combined script, the input is invalid because it has
failed to satisfy the spending conditions placed on the UTXO. failed to satisfy the spending conditions placed on the output.
[[p2pkh]] [[p2pkh]]
@ -255,27 +255,26 @@ signature created by the corresponding private key (see
<<digital_sigs>>). Let's look at an example of a P2PKH scriptPubKey: <<digital_sigs>>). Let's look at an example of a P2PKH scriptPubKey:
---- ----
OP_DUP OP_HASH160 <Cafe Public Key Hash> OP_EQUALVERIFY OP_CHECKSIG OP_DUP OP_HASH160 <Key Hash> OP_EQUALVERIFY OP_CHECKSIG
---- ----
The +Cafe Public Key Hash+ is equivalent to the Bitcoin address of the The +Key Hash+ the data that would be encoded into a legacy Base58Check
cafe, without the Base58Check encoding. Most applications would show the address. Most applications would show the _public key hash_ in a script
_public key hash_ in hexadecimal encoding and not the familiar Bitcoin using hexadecimal encoding and not the familiar Bitcoin
address Base58Check format that begins with a "1." address Base58Check format that begins with a "1."
The preceding scriptPubKey can be satisfied with a scriptSig The preceding scriptPubKey can be satisfied with a scriptSig
of the form: of the form:
---- ----
<Cafe Signature> <Cafe Public Key> <Signature> <Public Key>
---- ----
The two scripts together would form the following combined validation The two scripts together would form the following combined validation
script: script:
---- ----
<Cafe Signature> <Cafe Public Key> OP_DUP OP_HASH160 <Sig> <Pubkey> OP_DUP OP_HASH160 <Hash> OP_EQUALVERIFY OP_CHECKSIG
<Cafe Public Key Hash> OP_EQUALVERIFY OP_CHECKSIG
---- ----
When executed, this combined script will evaluate to TRUE if, and only When executed, this combined script will evaluate to TRUE if, and only
@ -1316,9 +1315,8 @@ inside a P2SH script.
===== Pay-to-Witness-Public-Key-Hash (P2WPKH) ===== Pay-to-Witness-Public-Key-Hash (P2WPKH)
In <<spending_bitcoin>>, ((("use cases", "buying coffee", In <<spending_bitcoin>>, ((("use cases", "buying coffee",
id="aliced")))Alice created a transaction to pay Bob for a cup of id="aliced")))Let's start by looking at the example of a P2PKH
coffee. That transaction created a P2PKH output with a value of 0.015 scriptPubKey:
BTC that was spendable by Bob. The outputs script looks like this:
.Example P2PKH scriptPubKey .Example P2PKH scriptPubKey
---- ----