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

[Flow EVM] update StateDB to store codes by code hash #5235

Merged
merged 12 commits into from
Jan 22, 2024

Conversation

ramtinms
Copy link
Member

closes: #5198

@ramtinms ramtinms marked this pull request as ready for review January 15, 2024 20:38
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7909b62) 58.56% compared to head (6629002) 53.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5235      +/-   ##
==========================================
- Coverage   58.56%   53.86%   -4.71%     
==========================================
  Files         899      885      -14     
  Lines       85536    82825    -2711     
==========================================
- Hits        50097    44612    -5485     
- Misses      31743    34726    +2983     
+ Partials     3696     3487     -209     
Flag Coverage Δ
unittests 53.86% <ø> (-4.71%) ⬇️

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.

Comment on lines -138 to +139
codeHash := gethTypes.EmptyCodeHash
codeHash := gethCommon.Hash{}
Copy link
Member Author

@ramtinms ramtinms Jan 16, 2024

Choose a reason for hiding this comment

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

This was a bug that I fixed it in this PR, we should return empty code hash for non-existing accounts

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 mostly focused on non-test code and left some minor comments.

fvm/evm/emulator/state/code.go Outdated Show resolved Hide resolved
fvm/evm/emulator/state/code.go Show resolved Hide resolved
fvm/evm/emulator/state/code.go Outdated Show resolved Hide resolved
fvm/evm/emulator/state/code.go Outdated Show resolved Hide resolved
fvm/evm/emulator/state/code.go Outdated Show resolved Hide resolved
@ramtinms ramtinms added this pull request to the merge queue Jan 22, 2024
Merged via the queue into master with commit 5573867 Jan 22, 2024
51 checks passed
@ramtinms ramtinms deleted the ramtin/5198-update-evm-code-storage branch January 22, 2024 20:28
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.

[Flow EVM] Update stateDB code storage to store by hash
4 participants