-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add storage limit check exception for EVM address #5106
Add storage limit check exception for EVM address #5106
Conversation
fvm/transactionStorageLimiter.go
Outdated
ctx Context, | ||
address flow.Address, | ||
) bool { | ||
sc := systemcontracts.SystemContractsForChain(ctx.Chain.ChainID()) |
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.
I wonder if we should use the evm.RootAccountAddress()
to get the address, since now if the implementation there changes this might not work.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5106 +/- ##
==========================================
+ Coverage 56.49% 56.66% +0.17%
==========================================
Files 980 984 +4
Lines 93192 93998 +806
==========================================
+ Hits 52649 53265 +616
- Misses 36640 36777 +137
- Partials 3903 3956 +53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
for id := range snapshot.WriteSet { | ||
address, ok := addressFromRegisterId(id) | ||
if !ok { | ||
continue | ||
} | ||
|
||
if limiter.shouldSkipSpecialAddress(ctx, address, sc) { |
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.
what about setting a very high limit instead of skipping it?
Since the returned list is supposed to be updated registers, skipping it would look like as if the EVM address is not updated. I'm not sure if it would break any assumptions elsewhere
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.
This logic is only to control which accounts get their storage capacity checked.
Having a special price/limit for storage capacity of this account might be a good solution for the future, but we have not decided what to do with the storage pricing of this account yet. Implementing that also takes more effort.
This is a temporary solution so that testing is easier in the meantime.
closes: #5105
Add an exception to storage limiting for the account that holds the EVM state.
This is a temporary solution until we decide how we are going to properly handle it.