architectureethereumblockchainshardingbeacon

in depth explanation on how beacon chain handles finality of 64 shards?


I am new to Ethereum blockchain. I want to understand how beacon chain handles finality of 64 shards?

Regarding the above question, I have few understanding, doubts on the same which I explained as below:

Let me start it like a noob. So in ethereum PoS and sharding, we have 1 beacon chain and 64 shard chains at every epoch (32 slots -> 1 slot = 12 seconds) At every epoch, in every shard, in best case scenario there will be 32 blocks proposed and attested by the validators in respective time slot's committee. (1 block per 1 time slot/committee). So at this point, if I look now, we have 64 shards, each shard produces 32 blocks. Total of 64*32 = 2048 blocks. And in each shard, the respective 32 blocks may have created forks in the shard copy of the blockchain. (due to network latency, etc. As blocks are produced quickly - every 12 seconds). Also these forks in each shard have different state trie (1 state trie for 1 fork).

At the same time, I read somewhere, in beacon chain also there will be 32 blocks produces at that epoch. So,

  1. who produced these blocks? because the all validators who staked 32 eth are split into 64 shards and they are busy there. Then who else produced beacon chain blocks? Are there separate validators for beacon chain also?
  2. what these beacon blocks contain? what is cross link and how its related to beacon chain block and shard chains blocks?
  3. Each shard has its own forks now and each forks have its own state trie. So many local state tries across shards at this time. Then where is the global (source of truth) state trie is stored?
  4. I read that finality happens for every 2.5 epoch. What does it actually mean? in my above explanation, 64 shards produced 2048 blocks in total for a given epoch. Then which block gets finalized?
  5. In simple terms, when we say blockchain, the thing comes to our mind is one single linkedlist type of chained blocks. So how finality achieves this single canonical blockchain ledger across all shards? Or does beacon chain maintain separate blockchain ledger for each shards after finality?
  6. uff! finally as an end user, when I request for the global blockchain ledger and also global state trie of the entire blockchain network (of all shards), what is the flow to fetch the same? does it get it in one place like beacon chain nodes or it will be fetched by multiple requests like first it goes to beacon chain node, then shard validator node, then specific block, etc? what are steps it takes?

An in detail step by step thorough explanation for how beacon chain handles finality of 64 shards? which covers all my sub questions mentioned above. really helps a lot.

This will be useful for the all the people who are struggling to understand ethereum internal working. Thank you so much in advance.


Solution

  • I am new to Ethereum blockchain. I want to understand how beacon chain handles finality of 64 shards?

    Because it doesn't. There does not exist even a proof of concept for sharded Ethereum yet. StackOverflow is to discuss about programming questions, not about theoretical sharding on Ethereum blockchain.

    If you want to study existing sharding implementations please see