-
Notifications
You must be signed in to change notification settings - Fork 175
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
[Beyond EVM] performant StateDB implementation - part 2 #5167
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5167 +/- ##
==========================================
+ Coverage 56.50% 56.61% +0.10%
==========================================
Files 983 984 +1
Lines 93757 94052 +295
==========================================
+ Hits 52979 53247 +268
- Misses 36828 36844 +16
- Partials 3950 3961 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I left some comments and suggestions.
Some account related questions:
- Can account be present in both
created
andsuicided
list in the same view? - If so, what is the status of that account?
- Do we need to reset account cache, such as
codes
,balances
, etc after account is flagged for deletion? - Do we want to return error in setters after account is flagged for deletion?
@fxamacker @sideninja I spent some time going over the Geth code and updated the logics for creation and suicide at 036c370 |
To answer your questions @fxamacker :
Yes, it could be in the state of suicided then created (then we flag it with recreate), clean up the old data and delete the account at the end of the transaction and create a new one with changes.
when an account is set for deletion, everything except the balance has to be still accessible throughout the transaction, except for when recreation is called then we clean all the account values (in this case we also have to carry over the balance of the old account before flagging for deletion.
we don't do anything even if an account is flagged for deletion, we accept them and ignore them at the end and delete the account. Yeah I know it feels odd but that's how Geth behaves. |
going to merge this PR but feel free to provide feedback so I can address it in the next PR |
see #5129