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

Remove contract bytecode on reverts and account self-destruct #1428

Open
KolbyML opened this issue Sep 7, 2024 · 0 comments
Open

Remove contract bytecode on reverts and account self-destruct #1428

KolbyML opened this issue Sep 7, 2024 · 0 comments
Assignees
Labels
low priority shelf-stable Will not be closed by stale-bot trin execution

Comments

@KolbyML
Copy link
Member

KolbyML commented Sep 7, 2024

#1337 (comment)

Problem

Delete contract code if no accounts point to it

This can happen in 1 of 2 cases

  • the account is deleted and the contract code is not used by any other accounts
  • we do a revert and the contract code is not used by any other accounts

Solution

The solution would require keeping a count of how many accounts point to a contract code and deleting the contract code if the count is 0. This is very low priority due to this issue being very rare and it not taking up much storage

After thoughts

I think this is super low priority almost non-existent, but there is value in documenting it so other's know to look at other things first if they are hunting for things to improve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority shelf-stable Will not be closed by stale-bot trin execution
Projects
None yet
Development

No branches or pull requests

1 participant