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

feat: handle destroyed accounts in a sound way #1108

Open
enitrat opened this issue Mar 26, 2025 · 0 comments
Open

feat: handle destroyed accounts in a sound way #1108

enitrat opened this issue Mar 26, 2025 · 0 comments

Comments

@enitrat
Copy link
Collaborator

enitrat commented Mar 26, 2025

TODO: detail this issue

  • selfdestruct only destroys accounts if done in same tx
  • if an account is destroyed we need to clear its storage
  • to clear the storage currently we have an unsound way where the prover sends us all keys to delete
  • a better way would be to rely on the state object
  • when finishing a tx we have two cases
    • if no deleted account do nothing
    • if an account is deleted, squash the state, and in the resulting squashed state, remove any information about the deleted account (address -> Account and all storage keys)
    • this will probably require, upon iterating on each hashed(address, key), we verify the prev->new_value constraints, but we don't push to the new squashed_state segment the data of the account if address == destroyed address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant