Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
DevDocs corrections part 1 #589
Conversation
luke-jr
added some commits
Oct 1, 2014
harding
and 1 other
commented on an outdated diff
Oct 1, 2014
| stores the hash of the previous block's header, chaining the blocks | ||
| together. This ensures a transaction cannot be modified without | ||
| modifying the block that records it and all following blocks. | ||
| Transactions are also chained together. Bitcoin wallet software gives | ||
| -the impression that satoshis are sent from and to addresses, but | ||
| -bitcoins really move from transaction to transaction. Each standard | ||
| -transaction spends the satoshis previously spent in one or more earlier | ||
| +the impression that bitcoins are sent from and to wallets, but | ||
| +bitcoins really move from transaction to transaction. Each | ||
| +transaction spends the bitcoins previously received in one or more earlier |
harding
Contributor
|
saivann
commented on the diff
Oct 1, 2014
| @@ -20,56 +20,56 @@ A [block][]{:#term-block}{:.term} of one or more new transactions | ||
| is collected into the transaction data part of a block. | ||
| Copies of each transaction are hashed, and the hashes are then paired, | ||
| hashed, paired again, and hashed again until a single hash remains, the | ||
| -[Merkle root][]{:#term-merkle-root}{:.term} of a Merkle tree. | ||
| +[merkle root][]{:#term-merkle-root}{:.term} of a merkle tree. |
saivann
Contributor
|
harding
and 1 other
commented on an outdated diff
Oct 1, 2014
| -Outputs are not the same as Bitcoin addresses. You can use the same | ||
| -address in multiple transactions, but you can only use each output once. | ||
| +Outputs are not the same as Bitcoin addresses. | ||
| +Once bitcoins are sent, they remain associated with the output until later spent, while the association with a given address ends the moment it is received. |
harding
Contributor
|
harding
and 1 other
commented on an outdated diff
Oct 1, 2014
| transaction's inputs and outputs is given as a [transaction fee][]{:#term-transaction-fee}{:.term} to | ||
| the Bitcoin [miner][]{:#term-miner}{:.term} who creates the block containing that transaction. | ||
| -For example, in the illustration above, each transaction spends 10,000 satoshis | ||
| -fewer than it receives from its combined inputs, effectively paying a 10,000 | ||
| -satoshi transaction fee. | ||
| +For example, in the illustration above, each transaction spends a value of 10,000 (0.0001 BTC) |
harding
Contributor
|
harding
and 2 others
commented on an outdated diff
Oct 1, 2014
| {% endautocrossref %} | ||
| -### Proof Of Work | ||
| +### Proof of Work |
harding
Contributor
|
harding
and 1 other
commented on an outdated diff
Oct 1, 2014
| that a given hash attempt will generate a number below the [target][]{:#term-target}{:.term} | ||
| -threshold. Bitcoin itself does not track probabilities but instead | ||
| -simply assumes that the lower it makes the target threshold, the more | ||
| -hash attempts, on average, will need to be tried. | ||
| +threshold. | ||
| +Bitcoin assumes a linear probability that the lower it makes the target threshold, the more hash attempts, on average, will need to be tried. |
harding
Contributor
|
harding
and 1 other
commented on an outdated diff
Oct 1, 2014
| New blocks will only be added to the block chain if their hash is at | ||
| -least as challenging as a [difficulty][]{:#term-difficulty}{:.term} value expected by the peer-to-peer | ||
| -network. Every 2,016 blocks, the network uses timestamps stored in each | ||
| +least as challenging as a [difficulty][]{:#term-difficulty}{:.term} value expected by the current best block chain. |
harding
Contributor
|
harding
commented on an outdated diff
Oct 1, 2014
| block header to calculate the number of seconds elapsed between generation | ||
| of the first and last of those last 2,016 blocks. The ideal value is | ||
| -1,209,600 seconds (two weeks). | ||
| +1,209,600 seconds (two weeks), and the difficulty will be adjusted to compensate for any difference in reality. |
harding
Contributor
|
harding
and 1 other
commented on an outdated diff
Oct 1, 2014
| @@ -125,7 +124,7 @@ propagate a modified block as the entire Bitcoin network expended | ||
| between the time the original block was created and the present time. | ||
| Only if you acquired a majority of the network's hashing power | ||
| could you reliably execute such a [51 percent attack][]{:#term-51-attack}{:.term} against | ||
| -transaction history. | ||
| +transaction history (although it should be noted that even less than 50% of the hashing power still has a good chance of performing such attacks). |
harding
Contributor
|
harding
and 2 others
commented on an outdated diff
Oct 1, 2014
| Eventually a miner produces another block which attaches to only one of | ||
| the competing simultaneously-mined blocks. This makes that side of | ||
| -the fork longer than the other side. Assuming a fork only contains valid | ||
| -blocks, normal peers always follow the longest fork (the most difficult chain | ||
| -to recreate) and throw away ([orphan][]{:#term-orphan}{:.term}) blocks belonging to shorter forks. | ||
| +the fork stronger than the other side. | ||
| +Assuming a fork only contains valid | ||
| +blocks, normal peers always follow the the most difficult chain | ||
| +to recreate and throw away ([stale blocks][]{:#term-stale-block}{:.term}) belonging to shorter forks. |
harding
Contributor
|
harding
and 2 others
commented on an outdated diff
Oct 1, 2014
| @@ -180,34 +181,34 @@ are usually referenced by the SHA256(SHA256()) hash of their header. | ||
| {% autocrossref %} | ||
| Every block must include one or more transactions. The first one of these | ||
| -transactions must be a coinbase transaction which should collect and | ||
| -spend the block reward and any transaction fees paid by transactions included in this block. | ||
| +transactions must be a generation transaction which should collect and |
harding
Contributor
|
harding
and 1 other
commented on an outdated diff
Oct 1, 2014
| txid with one other txid and then hashing them together. If there are | ||
| an odd number of txids, the txid without a partner is hashed with a | ||
| copy of itself. | ||
| The resulting hashes themselves are each paired with one other hash and | ||
| hashed together. Any hash without a partner is hashed with itself. The | ||
| -process repeats until only one hash remains, the Merkle root. | ||
| +process repeats until only one hash remains, the merkle root. | ||
| +Since it is impractical for multiple transactions to have the same txid, a merkle link comprised of two identical hashes is always a single-child link. |
harding
Contributor
|
harding
commented on the diff
Oct 1, 2014
| @@ -5,8 +5,8 @@ Bitcoin and start building Bitcoin-based applications. To make the best use of | ||
| this documentation, you may want to install the current version of Bitcoin | ||
| Core, either from [source][core git] or from a [pre-compiled executable][core executable]. | ||
| -Questions about Bitcoin development are best sent to the Bitcoin [Forum][forum | ||
| -tech support] and [IRC channels][]. Errors or suggestions related to | ||
| +Questions about Bitcoin development are best asked in the Bitcoin [IRC channels][]. |
harding
Contributor
|
|
@luke-jr I just finished a first-pass review, and in general I like the changes. Thanks! I think the autocrossref links need to be updated and there are a few minor grammar changes I'd like to make, so I'll try to send a pull request to your branch later tonight. Thanks again! |
|
The public key in commit |
harding
commented on the diff
Oct 2, 2014
| -In the example given above, you will almost certainly produce a | ||
| -successful hash on your first try. You can even estimate the probability | ||
| +In the example given above, you will produce a successful hash on average every other try. |
harding
Contributor
|
luke-jr
added some commits
Oct 2, 2014
|
Conclusions thus far are applied to the branch. |
harding
and 1 other
commented on an outdated diff
Oct 2, 2014
| txid with one other txid and then hashing them together. If there are | ||
| an odd number of txids, the txid without a partner is hashed with a | ||
| copy of itself. | ||
| The resulting hashes themselves are each paired with one other hash and | ||
| hashed together. Any hash without a partner is hashed with itself. The | ||
| -process repeats until only one hash remains, the Merkle root. | ||
| +process repeats until only one hash remains, the merkle root. | ||
| + | ||
| +Since it is impractical for multiple transactions to have the same txid, a merkle link comprised of two identical hashes is always a single-child link. | ||
| +When a block has failed validation, however, one ought to check if it is because of a duplicate transaction that may trigger a merkle root collision (and therefore block hash collision) before caching that failure. | ||
| +Failure to do so may result in security bugs such as CVE-2012-2459. |
harding
Contributor
|
|
How's this? |
|
@luke-jr I just sent you a pull req to fix a broken reference link. I'll take a look at everything else tomorrow, thanks again! |
|
@saivann Merged |
harding
commented on an outdated diff
Oct 2, 2014
| Eventually a miner produces another block which attaches to only one of | ||
| the competing simultaneously-mined blocks. This makes that side of | ||
| -the fork longer than the other side. Assuming a fork only contains valid | ||
| -blocks, normal peers always follow the longest fork (the most difficult chain | ||
| -to recreate) and throw away ([orphan][]{:#term-orphan}{:.term}) blocks belonging to shorter forks. | ||
| +the fork stronger than the other side. | ||
| +Assuming a fork only contains valid | ||
| +blocks, normal peers always follow the the most difficult chain | ||
| +to recreate and throw away ([stale blocks][stale block]{:#term-stale-block}{:.term}) belonging to shorter forks. |
harding
Contributor
|
harding
commented on the diff
Oct 2, 2014
| other transactions. If the five transactions in this block were all at | ||
| the maximum size, downloading the entire block would require over | ||
| 500,000 bytes---but downloading three hashes plus the block header | ||
| requires only 140 bytes. | ||
| +Note: If identical txids are found within the same block, there is a possibility that the merkle tree may collide with a block with some or all duplicates removed due to how unbalanced merkle trees are implemented (duplicating the lone hash). | ||
| +Since it is impractical to have separate transactions with identical txids, this does not impose a burden on honest software, but must be checked if the invalid status of a block is to be cached; | ||
| +otherwise, a valid block with the duplicates eliminated could have the same merkle root and block hash, but be rejected by the cached invalid outcome, resulting in security bugs such as CVE-2012-2459. | ||
| + |
|
|
|
I just re-reviewed everything and added just three content-change suggestions, so I think we're close to mergability. @luke-jr you seem to be revising all sentences inside parenthesis, but when I do a web search for are sentences allowed in parenthesis, I don't see anyone arguing against them. (Almost all of the articles are about period location relative to the close-parens.) I suggest we address this issue before you continue editing to avoid future debate. |
|
Except for the last comments from me and @harding, this LGTM. |
harding
added a commit
to harding/bitcoin.org
that referenced
this pull request
Oct 3, 2014
harding
referenced this pull request
in luke-jr/bitcoin.org
Oct 3, 2014
Merged
Small Changes To Prepare Pull #589 For Merge #2
luke-jr
added a commit
to luke-jr/bitcoin.org
that referenced
this pull request
Oct 3, 2014
luke-jr
added some commits
Oct 1, 2014
|
Merged in changes |
luke-jr commentedOct 1, 2014
Started reviewing the developer docs, finding lots of things to correct. I'll do more later, but please review this batch first so I know what, if anything, needs to be fixed moving forward - I'm not entirely sure on the markdownish format used.