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

_accountDelta duplicates _computeSlot #752

Closed
wjmelements opened this issue Jun 26, 2024 · 2 comments · Fixed by #753
Closed

_accountDelta duplicates _computeSlot #752

wjmelements opened this issue Jun 26, 2024 · 2 comments · Fixed by #753
Labels

Comments

@wjmelements
Copy link
Contributor

Component

Delta accounting

Describe the suggested feature and problem it solves.

The only user of _computeSlot, _accountDelta, computes it twice from the same parameters. The first time is in currency.getDelta. The second time is in setDelta.

While SHA3 is fairly cheap now there are plans to make it 10x more expensive.

Describe the desired implementation.

reuse the _computeSlot calculation for both TLOAD and TSTORE.

Describe alternatives.

No response

Additional context.

https://eips.ethereum.org/EIPS/eip-7667

Copy link

linear bot commented Jun 26, 2024

@wjmelements
Copy link
Contributor Author

I am working on a fix.

wjmelements added a commit to wjmelements/v4-core that referenced this issue Jun 26, 2024
hensha256 added a commit that referenced this issue Jul 15, 2024
* fix #752

* forge snapshot --isolate

* forge fmt

* add the requested natspec

* caller -> target

* consistent capitalization

* rename updated to next

---------

Co-authored-by: Alice <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant