Thanks for sharing. Ethereum for Web Developers Book & Devcon challenge
I have a basic question: What is “chain reorganization”? Is it fork or something?
Hi @swkim109,
The best description of a chain reorganization I could find is from an Ethereum blog post by Gavin Wood:
https://blog.ethereum.org/2015/08/08/chain-reorganisation-depth-expectations/
Chain reorganisations happen when a node on the Ethereum network (one which could belong to you, me, an exchange, a miner, whoever) realises that what it thought was the canonical chain turned out not to be. When this happens, the transactions in the latter part of its chain (i.e. the most recent transactions) are reverted and rather the transactions in the newer replacement are executed.With Ethereum having a short target block time of 15s, this actually happens naturally rather often. Because it takes time for the blocks to percolate through the network, it’s easy for different parts of the network to have a different final block (or two, or perhaps even three) in normal operation since the miners often come up with them at roughly the same time. This is what we might call ephemeral forking. Indeed, many of the ommers (né uncles) that you see in stats.ethdev.com were once assumed by some nodes to be the final block in canonical chain.
If anyone in the community has a better description, then feel free to add it.
I found this one short and to the point:
https://en.bitcoin.it/wiki/Chain_Reorganization
In particular, that “Chain reorganization is a client-local phenomenon”. It’s an individual client finding out that they are in the wrong chain, reverting and jumping to the correct one.
I liked that post by Gavin Wood. Thanks for sharing @abcoathup.
I was re-reading the Bitcoin white paper, and found this paragraph relevant for us here here:
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 proof-
of-work is found and one branch becomes longer; the nodes that were working on the other
branch will then switch to the longer one.
Thanks for sharing @elopio
Halloween is the eleven year anniversary of the Bitcoin white paper.