I'm a newbie to cryto and wanted understand this. what happens to the chain when the isolated block is formed (in case of a double spend) ? Since chains only add blocks that come from the longest running chain. it could be easily possible that initially 2 nodes proposed 2 blocks at the same time of the double spend attack. so
Node A -Block A(Double Spend)
Node B- Block B (Genuine)
Both have same length at this time but Node A decides to go rouge.
Lets consider Node C is close to Node A and hears block A. it adds it to it's block Chain. now another Node D hears about both Block B and A and decides to add A since it's coming from the longest blockchain. Now, It's a successful double spend if the customer didn't wait for any validations. (But the money is only spend once as we can see Block B is not accepted by any other blocks)
In this case Block B is orphaned.. How does not Node B redeem itself?? How does the Node B add new chain to it's orphaned Block. I guess the orphaned one is just left there and the new Node is added from the previous block.
For easier understanding:I was considering one transaction per block. ;)
Edit: Anyone Coming to this page may find this Flow helpful:
1) New transactions are broadcast to all nodes.
2) Each node collects new transactions to form block.
3) Each node competes with one another to solve the mining puzzle (Proof of Work)for its block.
4) When a node cracks the puzzle, it broadcasts the block to all nodes.
5) Nodes accept the block only if all transactions in it are valid and not already spent.
6) Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash.
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next block is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one branch. Also to prevent double spend it creates a DB of Unspent Bitcoin and validates every transaction based on that.How is a transaction verified