From be4e57f01b35d8108ebb1c405f1956cd21967c05 Mon Sep 17 00:00:00 2001 From: Alex Waters Date: Sun, 13 Jul 2014 19:43:53 -0400 Subject: [PATCH 1/6] 'key' to 'keyspace' The term 'keyspace' more accurately reflects the nature of this statement. --- ch04.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch04.asciidoc b/ch04.asciidoc index 6894d163..4e80921a 100644 --- a/ch04.asciidoc +++ b/ch04.asciidoc @@ -70,7 +70,7 @@ Below is a randomly generated private key shown in hexadecimal format (256 binar [TIP] ==== -The size of bitcoin's private key, 2^256^ is an unfathomably large number. It is approximately 10^77^ in decimal. The visible universe is estimated to contain 10^80^ atoms. +The size of bitcoin's private keyspace, 2^256^ is an unfathomably large number. It is approximately 10^77^ in decimal. The visible universe is estimated to contain 10^80^ atoms. ==== To generate a new key with the Bitcoin Core Client (see <>), use the +getnewaddress+ command. For security reasons it displays the public key only, not the private key. To ask bitcoind to expose the private key, use the +dumpprivkey+ command. The +dumpprivkey+ shows the private key in a base-58 checksum encoded format called the Wallet Import Format (WIF), which we will examine in more detail in <>. Here's an example of generating and displaying a private key using these two commands: From 77335865e93b3f46370f1dfaa756270d30a821ee Mon Sep 17 00:00:00 2001 From: Alex Waters Date: Sun, 13 Jul 2014 19:46:28 -0400 Subject: [PATCH 2/6] Typo --- ch04.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch04.asciidoc b/ch04.asciidoc index 4e80921a..908f60f0 100644 --- a/ch04.asciidoc +++ b/ch04.asciidoc @@ -70,7 +70,7 @@ Below is a randomly generated private key shown in hexadecimal format (256 binar [TIP] ==== -The size of bitcoin's private keyspace, 2^256^ is an unfathomably large number. It is approximately 10^77^ in decimal. The visible universe is estimated to contain 10^80^ atoms. +The size of bitcoin's private key space, 2^256^ is an unfathomably large number. It is approximately 10^77^ in decimal. The visible universe is estimated to contain 10^80^ atoms. ==== To generate a new key with the Bitcoin Core Client (see <>), use the +getnewaddress+ command. For security reasons it displays the public key only, not the private key. To ask bitcoind to expose the private key, use the +dumpprivkey+ command. The +dumpprivkey+ shows the private key in a base-58 checksum encoded format called the Wallet Import Format (WIF), which we will examine in more detail in <>. Here's an example of generating and displaying a private key using these two commands: From e1d642a60f911d59ac1f5bf53d780905303b5d07 Mon Sep 17 00:00:00 2001 From: joebauers Date: Tue, 15 Jul 2014 11:26:09 -0400 Subject: [PATCH 3/6] Update preface.asciidoc Few spelling and grammar changes. --- preface.asciidoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/preface.asciidoc b/preface.asciidoc index eefaeded..ed794fd0 100644 --- a/preface.asciidoc +++ b/preface.asciidoc @@ -19,7 +19,7 @@ _The best way to get the right answer on the Internet is not to ask a question, I hope you can help me find and publish the "right answer" by the time this book is ready to print. -The early-realease source code is published on Github: https://github.com/aantonop/bitcoinbook +The early-release source code is published on Github: https://github.com/aantonop/bitcoinbook File an "Issue", or fork, modify and create a "Pull Request" with your changes. @@ -74,7 +74,7 @@ pass:[product mixes] and pricing programs for pass:[organizations], pass:[government agencies], and pass:[individuals]. Subscribers have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and dozens pass:[more]. For more information about Safari Books Online, please visit us pass:[online]. +Safari Books Online offers a range of pass:[product mixes] and pricing programs for pass:[organizations], pass:[ government agencies], and pass:[individuals]. Subscribers have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and dozens pass:[more]. For more information about Safari Books Online, please visit us pass:[online]. === How to Contact Us @@ -141,8 +141,8 @@ difficulty target:: ((("target difficulty"))) A difficulty at which all the computation in the network will find blocks approximately every 10 minutes. -difficulty re-targetting:: -((("difficulty re-targetting"))) +difficulty re-targeting:: +((("difficulty re-targeting"))) A network-wide re-calculation of the difficulty which occurs once every 2106 blocks and considers the hashing power of the previous 2106 blocks. fees:: From 6f9de4bb8f6d37c4e063f92a6b8054a9a7666811 Mon Sep 17 00:00:00 2001 From: "Minh T. Nguyen" Date: Wed, 16 Jul 2014 21:59:34 -0700 Subject: [PATCH 4/6] Remove extra space --- preface.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preface.asciidoc b/preface.asciidoc index ed794fd0..7e2b6e18 100644 --- a/preface.asciidoc +++ b/preface.asciidoc @@ -74,7 +74,7 @@ pass:[product mixes] and pricing programs for pass:[organizations], pass:[ government agencies], and pass:[individuals]. Subscribers have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and dozens pass:[more]. For more information about Safari Books Online, please visit us pass:[online]. +Safari Books Online offers a range of pass:[product mixes] and pricing programs for pass:[organizations], pass:[government agencies], and pass:[individuals]. Subscribers have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and dozens pass:[more]. For more information about Safari Books Online, please visit us pass:[online]. === How to Contact Us From 5acff1cc950488d103ba4f2b287f3b3bb9f2130b Mon Sep 17 00:00:00 2001 From: "Minh T. Nguyen" Date: Wed, 16 Jul 2014 22:06:01 -0700 Subject: [PATCH 5/6] Change sentence to better describe how confirmations are counted as reported by Issue #54 --- ch05.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch05.asciidoc b/ch05.asciidoc index 27ba0eb0..f73ef8cf 100644 --- a/ch05.asciidoc +++ b/ch05.asciidoc @@ -11,7 +11,7 @@ In this chapter we will examine all the various forms of transactions, what do t [[tx_lifecycle]] === Transaction Lifecycle -A transaction's lifecycle starts with the transaction's creation, also known as origination. The transaction is then signed, with one or more signatures indicating the authorization to spend the funds referenced by the transaction. The transaction is then broadcast on the bitcoin network, where each network node (participant) validates and propagates the transaction until it reaches (almost) every node in the network. Finally, the transaction is verified by a mining node and included in a block of transactions that is recorded on the blockchain. Once recorded on the blockchain and confirmed by sufficient subsequent blocks (confirmations), the transaction is a permanent part of the bitcoin ledger and is accepted as valid by all participants. The funds allocated to a new owner by the transaction can then be spent in a new transaction, extending the chain of ownership and beginning the lifecycle of a transaction again. +A transaction's lifecycle starts with the transaction's creation, also known as origination. The transaction is then signed, with one or more signatures indicating the authorization to spend the funds referenced by the transaction. The transaction is then broadcast on the bitcoin network, where each network node (participant) validates and propagates the transaction until it reaches (almost) every node in the network. Finally, the transaction is verified by a mining node and included in a block of transactions that is recorded on the blockchain. Once confirmed on the blockchain in the first block and supported by sufficient subsequent blocks (additional confirmations), the transaction becomes a permanent part of the bitcoin ledger and is accepted as valid by all participants. The funds allocated to a new owner by the transaction can then be spent in a new transaction, extending the chain of ownership and beginning the lifecycle of a transaction again. [[tx_origination]] ==== Creating Transactions From 9cfb054fb13edce68b42020777c2b036447f8c49 Mon Sep 17 00:00:00 2001 From: "Minh T. Nguyen" Date: Wed, 16 Jul 2014 22:23:08 -0700 Subject: [PATCH 6/6] Change 'acknowledge range of locking script requirement' to 'acknowledge range of possibilities in scripting technology --- ch05.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch05.asciidoc b/ch05.asciidoc index f73ef8cf..bfc711d5 100644 --- a/ch05.asciidoc +++ b/ch05.asciidoc @@ -191,7 +191,7 @@ Bitcoin's transaction validation engine relies on two types of scripts to valida A locking script is an encumbrance placed on an output, that specifies the conditions that must be met to spend the output in the future. Historically, the locking script was called a _scriptPubKey_, because it usually contained a public key or bitcoin address. In this book we refer to it as a "locking script" to acknowledge the much broader range of possibilities of this scripting technology. In most bitcoin applications, what we refer to as a locking script will appear in the source code as "scriptPubKey". -An unlocking script is a script that "solves", or satisfies, the conditions placed on an output by a locking script and allows the output to be spent. Unlocking scripts are part of every transaction input and most of the time they contain a digital signature produced by the user's wallet from their private key. Historically, the unlocking script was called _scriptSig_, because it usually contained a digital signature. In this book we refer to it as an "unlocking script" to acknowledge the much broader range of locking script requirements, as not all unlocking scripts must contain signatures. As mentioned above, in most bitcoin applications the source code will refer to the unlocking script as "scriptSig". +An unlocking script is a script that "solves", or satisfies, the conditions placed on an output by a locking script and allows the output to be spent. Unlocking scripts are part of every transaction input and most of the time they contain a digital signature produced by the user's wallet from their private key. Historically, the unlocking script was called _scriptSig_, because it usually contained a digital signature. In this book we refer to it as an "unlocking script", again, to acknowledge the range of possibilities of the scripting technology, as not all unlocking scripts must contain signatures. As mentioned above, in most bitcoin applications the source code will refer to the unlocking script as "scriptSig". Every bitcoin client will validate transactions by executing the locking and unlocking scripts together. For each input in the transaction, the validation software will first retrieve the UTXO referenced by the input. That UTXO contains a locking script defining the conditions required to spend it. The validation software will then take the unlocking script contained in the input that is attempting to spend this UTXO and concatenate them. The locking script is added to the end of the unlocking script and then the entire combined script is executed using the script execution engine. If the result of executing the combined script is "TRUE", the unlocking script has succeeded in resolving the conditions imposed by the locking script and therefore the input is a valid authorization to spend the UTXO. If any result other than "TRUE" remains after execution of the combined script, the input is invalid as it has failed to satisfy the spending conditions placed on the UTXO. Note that the UTXO is permanently recorded in the blockchain, and therefore is invariable and is unaffected by failed attempts to spend it by reference in a new transaction. Only a valid transaction that correctly satisfies the conditions of the UTXO results in the UTXO being marked as "spent" and removed from the set of available UTXO.