Skip to content

Conversation

gballet
Copy link
Member

@gballet gballet commented Aug 21, 2024

This is needed to fix tests in rjl493456442/go-ethereum#12 : Gary's stuff will call DeleteAccount if the account is non-existent. While this is quite unclean and should be fixed at the geth layer, I reckon that it is much more difficult to do than designing the verkle library to handle this.

As a result, I introduce an EraseStem method, which is used to replace InsertAtStem when deleting a function: it will go through the tree, find a group if it exsits, and overwrite all values present in that group. This is less invasive than the current method of calling InsertAtStem with 256 non-zero values.

It has the following drawbacks:

  • This behavior needs to be specified in the spec, since nil values are not overwritten
  • It also breaks the replay code, which uses the trick of checking that all values are 0 in order to simulate the "pre-verge" behavior of account deletion.

@gballet
Copy link
Member Author

gballet commented Aug 21, 2024

Fixes #448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant