3

What is the maximum known Ethereum fork length?

What is the maximum Ethereum fork length in theory?

Edit: please read fork length as maximum number of uncle blocks.

  • 1
    I've been looking at this and can't see a simple way to find out. There's no data as far as I can see on any of the chain explorers, as once an uncle is incorporated into a block it loses all knowledge of the fork it came from. Then I had a play around with the new Google BigQuery stuff, but again, the explicit data isn't retained. I think the information would need to be inferred somehow, but I don't know how. (I think this is the sort of thing that Bokky is good at... ) – Richard Horrocks Oct 3 '18 at 8:17
  • 1
    For example, wading through this answer might give some insights: ethereum.stackexchange.com/a/2880/52 – Richard Horrocks Oct 3 '18 at 8:19
  • Thank you @RichardHorrocks for the link. The information there gives a really good insight how to reproduce fork on the test/private chain. – Roman Frolov Oct 3 '18 at 8:37
  • No problem - sorry I couldn't give you an actual answer. Interesting question :-) – Richard Horrocks Oct 3 '18 at 8:39
4

Note that this question isn't about the number of uncle/orphan blocks that can be incorporated into a canonical block. That number is 2, as defined in the code.

This question is about the length of the side-chain created by an ephemeral fork, which happens when two miners find the PoW solution to a given block at the same time. It's then possible for these single-block forks to be built on, leading to longer chain forks...


What is the maximum Ethereum fork length in theory?

Probably infinite.

For example, if the main network was for some reason split in two - e.g. if the Great Firewall of China started to block Ethereum traffic - then the miners inside and outside of the wall would continue to create their own chains. If nothing was done to address this split, such as introducing a new chain ID for one side of the fork (not to be confused with network ID), then those forks would remain compatible.

If the Firewall was one day taken down, then the forks could recombine and the chains reorganise into a single canonical chain. After any significant length of time, this would probably be a bad thing.


What is the maximum known Ethereum fork length?

Not sure. Good question :-)

An old blog post from the early days of the network - Chain Reorganisation Depth Expectations - has some pretty high figures for fork lengths, but these likely don't apply now the network is more mature and better connected.

There used to be a visual, live representation of forks as they happened on the following page, but it's no longer active: http://fork.ethstats.net/

There's a "secret" EtherScan page that lists all the blocks that have been excluded due to chain reorgs, but again that doesn't really help show any chain lengths: https://etherscan.io/blocks_forked

(Note that this page is slightly confusing because it doesn't contain all the same entries as EtherScan's list of uncle blocks... : https://etherscan.io/uncles. All entries from the blocks_forked page are on the uncles page, but not vice versa.)


I'll defer the proper answer to someone who can do the clever analysis required to work out a maximum past fork length from historical data :-)

0

Maximum number of uncles is 2.

Source: consensus/ethash/consensus.go, line 41

maxUncles                       = 2                 // Maximum number of uncles allowed in a single block
  • Thank you for your answer, can you provide any source of this information? – Roman Frolov Oct 3 '18 at 5:32
  • The number of uncles that can be incorporated into a given block is 2, but those 2 uncles can come from anywhere. They can come from two 1-block forks, a single 2-block fork, or be 2 members of a much longer fork. They don't provide any information on the length of the fork they came from. – Richard Horrocks Oct 3 '18 at 8:13
  • @RomanFrolov, it is contained in the source code. – Nulik Oct 3 '18 at 14:32
0

If you are asking what the length of the blockchain is now, it is currently 6440717 blocks high at the time of writing.

If you are asking what the longest possible length of a forked chain can be, the answer is infinite. Forked chains will continue for as long as there is at least one miner mining on that chain.

Take ETC for example. The block height of ETC (a fork of ETH) is 6,667,943 at the time of writing. ETC forked from ETH on block 1,920,001, meaning the current height of this fork (further than the ETH height at time of fork) is 4,747,942. This can go on for as long as miners will mine ETC.

  • No, the question is about a longest amount of blocks in the fork (when on the same height there are n blocks with different hashes). – Roman Frolov Oct 2 '18 at 17:25
  • Question is not about hard forks. – Roman Frolov Oct 2 '18 at 17:26
  • For the case of ETH and ETC, they're no longer the same chain - they have the same network ID but different chain IDs, so could never reconnect/reorg to a single chain. – Richard Horrocks Oct 2 '18 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.