ethereum / go-verkle

A go implementation of Verkle trees
The Unlicense
209 stars 63 forks source link

deletion of a non-existent account overwrites with 0s #448

Open gballet opened 3 weeks ago

gballet commented 3 weeks ago

In geth, there is an upcoming branch in which an account can be deleted if it doesn't exist. An actual call to deletion is made, which means that the account is ovewritten with 0s. Now, it never happened before since a non-existent account would not be "deleted", it would just be ignored. But it seems that in this new branch, an actual deletion command is sent.

This raises the question, independent of this geth branch: if an account is deleted, that doesn't exist in the tree, should it be "created" and then overwritten with 0s, or just ignored ?

gballet commented 3 weeks ago

Writing down here after a talk with @jsign : this stuff is only needed for:

1) this PR by Gary, which honestly sounds like something that should be handled at the client level and probably can be in trie/verkle.go. 2) replays, which is the more tricky thing. It should be considered whether pure deletion can be implemented during replays. Probably not, owing to the impossibility of deleting a contract storage in verkle, but a clever trick might simplify all that.