1
2
How can we be sure that the entire chain is valid?
1- I read somewhere that one of the purposes of blockchain is that you can't change the blocks of the past without recomputing the entire thing. Is that assumption correct?
So if you could hypothetically recompute everything, you could generate a new chain. I also read somewhere about some problems that Proof of Work try to solve and there was this possibility of a concurrent plausible solid chain. How is that possible? Who can generate an entire chain?
I explain my doubt:
2- Miner will find a nonce, giving a block data, to generate a hash that matches a certain difficulty. Is that correct?
So the miner knows a new block. But not the entire chain. 3- Does it? So when it finds the nonce and hash it announces a new block to a different kind of node, let's say the full node (what is that exactly?).
4- Where in the flow and by whom in the network the entire chain will be exchanged so they need to decide which chain is better?
5- By the way, what is the best chain given two versions of them?
extra: 6- ok, the blocks are correct and the chain is valid everybody agrees with that. Who in the network checked if A that passed 1btc to B had 1btc to perform this action?
Please could you clarify 1, 2, 3, 4, 5 and 6?
thanks for the explanations.
when a miner finds a hash and will create a new valid block, what does it do with the new block? it will broadcast the block to the other nodes or it will broadcast his version of the entire chain to the other nodes? – Victor Ferreira – 2018-03-03T23:40:23.173
The miner broadcasts the new block to other nodes in the network. Other nodes know the blockchain history, so they can independently verify that the new block is valid. Broadcasting the entire blockchain with every block would be very resource intensive. – chytrik – 2018-03-04T00:16:14.280
they can verify if the block is valid, alright. But how could they decide between two blockchains if they only know their own blockchains plus a new block? – Victor Ferreira – 2018-03-07T03:16:34.500
That is up to the node, in the case of multiple valid blocks at the chaintip (same blockheight), most nodes will follow the block they hear about first. If a node follows on block, but the other block is built upon first, then the node will switch and follow that chain instead. This is why traditionally, it is recommended that a user wait 6 block confirmations to be sure the chain will not be rewritten. As I mentioned above, look up 'orphan blocks' for more info. – chytrik – 2018-03-07T03:22:52.610