Skip to content

Add leaf group "erasure" function - #449

Draft
gballet wants to merge 1 commit into
masterfrom
erase-not-delete
Draft

Add leaf group "erasure" function#449
gballet wants to merge 1 commit into
masterfrom
erase-not-delete

Conversation

@gballet

@gballet gballet commented Aug 21, 2024

Copy link
Copy Markdown
Contributor

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

gballet commented Aug 21, 2024

Copy link
Copy Markdown
Contributor Author

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