Edited ch06.asciidoc with Atlas code editor

pull/339/head
judymcconville@roadrunner.com 7 years ago
parent a99f5fdfa4
commit b73c75aa90

@ -94,7 +94,7 @@ UTXO are tracked by every full-node bitcoin client in the UTXO set. New transact
Transaction outputs consist of two parts:
* ((("satoshis")))An amount of bitcoin, denominated in _satoshis_, the smallest bitcoin unit
* An amount of bitcoin, denominated in _satoshis_, the smallest bitcoin unit
* A cryptographic puzzle that determines the conditions required to spend the output
((("locking scripts")))((("scripting", "locking scripts")))((("witnesses")))((("scriptPubKey")))The cryptographic puzzle is also known as a _locking script_, a _witness script_, or a +scriptPubKey+.
@ -191,7 +191,7 @@ Consider our example in <<transactions_behind_the_scenes>>. The transaction inpu
As you can see, there is only one input in the list (because one UTXO contained sufficient value to make this payment). The input contains four elements:
* A ((("transactions", "transaction IDs")))transaction ID, referencing the transaction that contains the UTXO being spent
* A ((("transaction IDs (txd)")))transaction ID, referencing the transaction that contains the UTXO being spent
* An output index (+vout+), identifying which UTXO from that transaction is referenced (first one is zero)
* A +scriptSig+, which satisfies the conditions placed on the UTXO, unlocking it for spending
* A sequence number (to be discussed later)
@ -282,7 +282,7 @@ Hints:
[[tx_fees]]
==== Transaction Fees
((("transactions", "outputs and inputs", "transaction fees")))((("transaction fees")))((("mining and consensus", "transaction fees")))Most transactions include transaction fees, which compensate the bitcoin miners for securing the network. Fees also serve as a security mechanism themselves, by making it economically infeasible for attackers to flood the network with transactions. Mining and the fees and rewards collected by miners are discussed in more detail in <<bitcoin_network_ch08>>.
((("transactions", "outputs and inputs", "transaction fees")))((("fees", "transaction fees")))((("mining and consensus", "transaction fees")))Most transactions include transaction fees, which compensate the bitcoin miners for securing the network. Fees also serve as a security mechanism themselves, by making it economically infeasible for attackers to flood the network with transactions. Mining and the fees and rewards collected by miners are discussed in more detail in <<bitcoin_network_ch08>>.
This section examines how transaction fees are included in a typical transaction. Most wallets calculate and include transaction fees automatically. However, if you are constructing transactions programmatically, or using a command-line interface, you must manually account for and include these fees.
@ -460,7 +460,7 @@ First, the unlocking script is executed, using the stack execution engine. If th
((("transactions", "scripts and Script language", "Pay-to-Public-Key-Hash")))((("Pay-to-Public-Key-Hash (P2PKH)")))The vast majority of transactions processed on the bitcoin network spend outputs locked with a Pay-to-Public-Key-Hash or "P2PKH" script. These outputs contain a locking script that locks the output to a public key hash, more commonly known as a bitcoin address. An output locked by a P2PKH script can be unlocked (spent) by presenting a public key and a digital signature created by the corresponding private key (see <<digital_sigs>>).
((("transactions", "use cases", "buying coffee")))((("use cases", "buying coffee")))For example, let's look at Alice's payment to Bob's Cafe again. Alice made a payment of 0.015 bitcoin to the cafe's bitcoin address. That transaction output would have a locking script of the form:
((("use cases", "buying coffee")))For example, let's look at Alice's payment to Bob's Cafe again. Alice made a payment of 0.015 bitcoin to the cafe's bitcoin address. That transaction output would have a locking script of the form:
----
OP_DUP OP_HASH160 <Cafe Public Key Hash> OP_EQUALVERIFY OP_CHECKSIG

Loading…
Cancel
Save