1
I am reading the book "Mastering Bitcoin" and have finished reading Chapter 2 and 10, but I still don't find the answer.
Suppose the current main chain has 5 blocks:
B0 <- B1 <- B2 <- B3 <- B4
As new transactions flowing in, the honest miners are mining B5, the 6th block.
If I publish a modified B2, say B2', to the Bitcoin network, what happens to this modified block when it is received by the other peers? Suppose B2' contains all the transactions that B2 has except that the amount of transferred bitcoin of one transaction is slightly modified but still a valid amount.
- Would
B2'be rejected immediately? It doesn't look like so because the modified transaction seems to be still valid. As far as I have learned, the recipient node uses the earlier blocks,B0andB1, to validateB2', and I think the validation would succeed. Am I right? - If
B2'is not rejected immediately, would the peer nodes link it toB1as a secondary chain? I actually thinkB2'should be rejected but after reading Chapter 10 of Mastering Bitcoin I don't seem to find a reason to justify why it should be rejected. - Furthermore, if
B2'is linked toB1anyway, what would happen when the 6th block,B5, is now mined and published? According to the Chapter 10, "the transactions ... are re-inserted in the mempool for inclusion in the next block, because the block they were in is no longer in the main chain." so I think nowB2'would be removed and its transactions would be re-inserted into the mempool. Then all the unmodified transactions inB2'will be removed again because they have been included inB2in the main chain, and the modified transaction inB2'would be rejected because it conflicts with the counterpart inB2.
Thanks for any help!
Thanks for the answer! For anyone's information: I happened to come across the article "Blockchain: how a 51% attack works (double spend attack)" which does say that the malicious user must grow a long enough chain in order to make the reorganization happen (see the "Stealth mining" section).
– yaobin – 2018-10-20T18:25:36.513