Hello!
Could someone verify if the following is true (my understanding of distributed ledger concept as applied to Bitcoin).
Each node of the network (miners and all other nodes that run Bitcoin client) has a copy of the ledger. Thus, the ledger is stored by the nodes (it is distributed in exactly this sense!). The ledger is periodically updated with new blocks of transactions being sent to the nodes. Hypothetically: If I am a miner and want to create a fork I can easily do it by creating a block and sending it to the network and the network will add it to the ledger. For example, for the chain A-B-C-D, I can add a block B2 to B, thereby creating a fork at node B. Of course, this block will most likely be orphaned because it is not the longest branch and the miner did it, say, for fun. Is my understanding right? If not, please point out what is not right.
Thank you in advance!
The ledger is added to every 10 minutes of so. When you broadcast to the network that you have found a block your transaction is tested. At any point along the way if you have errors then the block is dropped. You need to have the hash of the previous block plus have met the diff goal on your block. This will be checked. If you have not met the diff then the block is rejected out of hand by the network.
Now, if you did meet the diff requirements then you have, indeed found a block and added it to the blockchain.
You're scenario is one where the attacker wants to reverse a transaction of a previous block (often times called a 51% attack). At the point that he puts out B2 no one on the network will acknowledge B2 as the authentic chain. Why? Because the longest chain is the correct chain - by definition. The attacker will have to do C2, D2 and now has to race with the network to become the longest. This is theoretically possible but today, 2017, is virtual impossible except for the rarest of use cases.