You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As from the discussion in #202, if we ever have a branch where:
It has exactly two children
One child is a hash node
One child is a leaf node
The leaf node gets deleted
Then this is a bit of a problem as we can not collapse the remaining E --> H node if needed (because a branch with a single child collapses into an extension node). If the hash node was a leaf, then the leaf should "absorb" the extension node's key. However, we can not do this with a hashed leaf node.
It was discussed in Slack that if mpt_trie ever encounters an E --> H after a delete, then it should return an error. I don't think we should extend this to raise an error whenever we encounter one of these during traversal (eg. the pre-image that we were given contains a E --> H), as it's not a problem unless it's involved in a collapse. If we only return an error whenever we attempt to collapse an E --> H, then I think this should be sufficient. Does this sound right @Nashtare@frisitano?
The text was updated successfully, but these errors were encountered:
As from the discussion in #202, if we ever have a branch where:
Then this is a bit of a problem as we can not collapse the remaining
E --> H
node if needed (because a branch with a single child collapses into an extension node). If the hash node was a leaf, then the leaf should "absorb" the extension node's key. However, we can not do this with a hashed leaf node.It was discussed in Slack that if
mpt_trie
ever encounters anE --> H
after a delete, then it should return an error. I don't think we should extend this to raise an error whenever we encounter one of these during traversal (eg. the pre-image that we were given contains aE --> H
), as it's not a problem unless it's involved in a collapse. If we only return an error whenever we attempt to collapse anE --> H
, then I think this should be sufficient. Does this sound right @Nashtare @frisitano?The text was updated successfully, but these errors were encountered: