Skip to content
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

Add leaf group "erasure" function #449

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

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