-
Notifications
You must be signed in to change notification settings - Fork 102
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
AccountsCache not being cleared #2083
Comments
web3-developer
changed the title
AccountsCache never cleared
AccountsCache not being cleared
Mar 19, 2024
A new cache is created every time a ledger is created which happens every time a new vmstate is created which happens often enough:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See the discussion here for some context:
#2072 (comment)
The AccountsCache type holds a cache in memory of the accounts and storage slots which have recently been accessed. This data structure should periodically be cleared in order to avoid memory bloat. Currently the call to persist in the process block function will check if ClearCache is set in the VM flags:
db.persist(clearEmptyAccount, ClearCache in vmState.flags)
The VM flag is currently not set anywhere in the code base and therefore the AccountsCache is never cleared. Perhaps the flag should be set by the synchronizer(snap, full, or beacon sync).
The text was updated successfully, but these errors were encountered: