-
Notifications
You must be signed in to change notification settings - Fork 40
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
Improve data destruction in EVM #1347
Comments
Assigning to myself since I am already working on making data cleanup more effective |
Check after levelDB update |
STR: TC-1288 |
3.17.0-beta.1 |
Verified on Regression network 20 MB = 7 seconds |
In this version we have switched on back the algorithm of destruction of the contracts' state, that is called by SELFDESTRUCT opcode. The algorithm is enabled from the For the future investigation: #1644 |
Self destruct function clears only contract's address, but not contract data.
Also, eth_getStorageAt show empty values after invoking self-destruct
3.17.0-beta.8
After self-destruct
State_db still have key-value pairs 3.17.0-beta.8 after self-destruct
|
Actual for 3.17.0-develop.60 |
What we find out today that keys are deleted from LevelDB - the calls to delete are executed. When you delete keys in LevelDB, it does not immediately descrease the size on disk. LevelDB does compaction from time to time, at that point space is freed There is a way in LevelDB to manually ask to compact a range of keys. It includes lots of code changes, so I am moving this to 2.3. I |
Verified on 3.17.0-develop.62
will be fixed in a separate issue #1682 |
Verified on 3.17.0-beta.12 contract
state DB:
After seldFesdtruct function
|
There was an ineffective algorithm for data destruction in EVM that got fixed.
We iterate over LevelDB keys belonging to the account that has been destroyed and remove them
See also
Tasks
The text was updated successfully, but these errors were encountered: