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

[Beyond EVM] performant StateDB implementation - part 1 #5166

Merged
merged 15 commits into from
Jan 4, 2024

Conversation

ramtinms
Copy link
Member

@ramtinms ramtinms commented Dec 19, 2023

see #5129

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2023

Codecov Report

Attention: 233 lines in your changes are missing coverage. Please review.

Comparison is base (38484eb) 56.49% compared to head (46dc4ce) 56.50%.

Files Patch % Lines
fvm/evm/emulator/state/collection.go 48.86% 115 Missing and 20 partials ⚠️
fvm/evm/emulator/state/base.go 64.87% 71 Missing and 27 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5166      +/-   ##
==========================================
+ Coverage   56.49%   56.50%   +0.01%     
==========================================
  Files         980      983       +3     
  Lines       93192    93753     +561     
==========================================
+ Hits        52649    52978     +329     
- Misses      36640    36825     +185     
- Partials     3903     3950      +47     
Flag Coverage Δ
unittests 56.50% <58.46%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ramtinms ramtinms marked this pull request as ready for review December 19, 2023 21:29
fvm/evm/emulator/state/base.go Outdated Show resolved Hide resolved
fvm/evm/emulator/state/base.go Outdated Show resolved Hide resolved
fvm/evm/emulator/state/base.go Outdated Show resolved Hide resolved
fvm/evm/emulator/state/collection.go Outdated Show resolved Hide resolved
fvm/evm/emulator/state/collection.go Outdated Show resolved Hide resolved
Copy link
Member

@fxamacker fxamacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I focused on non-test code and left some comments and questions.

fvm/evm/emulator/state/collection.go Show resolved Hide resolved
fvm/evm/emulator/state/collection.go Outdated Show resolved Hide resolved
fvm/evm/emulator/state/collection.go Outdated Show resolved Hide resolved
fvm/evm/emulator/state/base.go Outdated Show resolved Hide resolved
fvm/evm/emulator/state/base.go Outdated Show resolved Hide resolved
fvm/evm/emulator/state/base.go Show resolved Hide resolved
fvm/evm/emulator/state/base.go Outdated Show resolved Hide resolved
fvm/evm/types/state.go Outdated Show resolved Hide resolved
fvm/evm/types/state.go Outdated Show resolved Hide resolved
@ramtinms
Copy link
Member Author

ramtinms commented Jan 3, 2024

@fxamacker any final look before I merge?

Copy link
Member

@fxamacker fxamacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramtinms Nice! Looks good!

I have just a couple more questions (copied here for convenience):

  • storeSlot():

    Since storeCode() removes empty code from v.cachedCodes, do we also want to remove empty slot from v.cachedSlots here for consistency?

  • UpdateAccount():

    Is it possible for UpdateAccount() to be called with empty code after account was created with non-empty code? If so, does UpdateAccount() need to remove the allocated slots collection?

fvm/evm/emulator/state/base.go Outdated Show resolved Hide resolved
@ramtinms ramtinms added this pull request to the merge queue Jan 4, 2024
Merged via the queue into master with commit eeff3f3 Jan 4, 2024
51 checks passed
@ramtinms ramtinms deleted the ramtin/5129-new-evm-stateDB-part1 branch January 4, 2024 04:56
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants