I've had talks with some colleagues of mine about Ethereum 2.0 shards, my problem is the following :
Given the definition of sharding :
sharding is a way of partitioning to spread out the computational and storage workload
And that Ethereum 2.0 shards are not meant to support code execution (at least in the short term, but I'm going to explain below why I have a lot of doubts about the long-term support…), implying that they don't compute and maintain a part of the global Ethereum 2.0 state (They must sync to the beacon chain, periodically providing roll-ups, and the beacon chain runs code execution).
It really feels more like L2 is now part of the core architecture than real sharding... What do you think ? Am I missing something ?
Now, this brings me to my second question:
Is efficient state / computational sharding actually possible with smart contracts ? (Without relying on a beacon / backbone chain as it would be rendered useless if shards were able to execute code and maintain state)
There are two main problems in my opinion :
1. Cross shard transactions
When smart contracts are involved, the "complexity" of transactions is multiplied. It is no longer a relatively simple relation between sender and receiver. The smart contract can internally call many other addresses... Deciding if the contract will issue cross shard transactions (and so if it should be executing in that specific shard) requires executing the contract, which is counterproductive to say the least…
To be profitable, a sharding design must reduce cross shard transactions as much as possible, as they require state synchronization between the concerned shards and the parallelization is lost. Right now, I don't see how it can be done with smart contract...
2. State inconsistency / merging
There is no proper way to decide how to resolve state inconsistency across "real" shards that I'm aware of. As they should be processing mostly independent sets of transactions and therefore holding different states... Plugging a consensus mechanism between shards also partially defeats the very purpose of shards.