-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge side-effect: duplicate execution state-root concern #2389
Comments
We have been discussing this side-effect recently during one of the merge calls. It's been said that Clique also tends to have Related edge case we get is two beacon blocks point to identical execution blocks (the same block from execution engine perspective) as a result of forking. But as long as this case is processed correctly, i.e. execution block stays valid if imported the second time and stays in the canonical chain even if the second beacon block is orphaned, I think we're OK with that. EDT |
I think we should also take the fact that state trie node is immutable and is either removed entirely or persisted by the canonical chain. IMO, it makes it easier to reason about this edge. The case when a block is dereferenced and removed from the storage should be analysed, in particular, client must not remove the state or a part of it if there is another reference to it from the other block. From what I know, state pruning algorithms must not remove state nodes that persisted in the canonical chain, because block execution from a fork might insert the same trie nodes as the canonical blocks did. So, when orphaned trie nodes are removed their persistence in the canonical chain is taken in account. These algorithms must either support a ref counting or some alternative technique to handle these cases. |
It worth mentioning that #2479 ( |
As far as I'm aware, the state-root in the eth1 block structure is of a MPT of the world-state, a tree of accounts, no data that changes regardless of block contents, with the exception of the block-reward. @djrtwo was asking about a repeat of the state root in PR #2380 and pointed out EIP 210 (block hash history) as something that could touch the state unconditionally (but this EIP isn't actually deployed on mainnet)
With the Merge transition to Eth2, we get a fun new edge-case, due to the move of block-rewards from execution layer (block coinbase) to consensus layer (proposer reward), the tree can stay completely untouched if there are no transactions in the block.
Questions:
Tracking:
The text was updated successfully, but these errors were encountered: