-
Notifications
You must be signed in to change notification settings - Fork 667
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
EIP 2929 - dynamic state access costs, by cache warmth #1986
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fun, the new sstore costs make the benchmarking fail to fit in the block 👍 👍 |
@kclowes So I'm still pretty sure that the revert logic is not correct, but I think this is far enough along to start getting an early look. I'm happy to do a walkthrough tomorrow if you're around. |
@carver awesome! Happy to do a walkthrough any time! |
carver
commented
Mar 12, 2021
carver
commented
Mar 12, 2021
This was referenced Mar 16, 2021
- Test that Balance gas cost works when cold or warm - Test precompiles are already in access_list
See: https://gist.github.com/holiman/174548cad102096858583c6fbbb0649a - charges cheaper price when using account in transaction.to and .sender - refactor tests to avoid custom/mock setup and test more "real" code
Be sure to calculate 63/64ths *after* charging for account load Pass BlockchainTests/GeneralStateTests/VMTests/vmIOandFlowOperations/gas.json:gas_d0g0v0_Berlin
Pass fixtures/BlockchainTests/GeneralStateTests/VMTests/vmTests/suicide.json:suicide_d1g0v0_Berlin
For example, REVERT should *reset* any account that was marked as warm since the CALL, so that it is considered cold on the next access again.
Mark created accounts as accessed, at no change to cost. Pass fixtures/BlockchainTests/GeneralStateTests/stCallCodes/callcodeDynamicCode.json:callcodeDynamicCode_d0g0v0_Berlin
Pass fixtures/BlockchainTests/GeneralStateTests/stCodeSizeLimit/codesizeInit.json:codesizeInit_d0g0v0_Berlin
Also, rlp objects must be hashable. Pass fixtures/BlockchainTests/GeneralStateTests/stEIP2930/addressOpcodes.json:addressOpcodes_d0g0v0_Berlin
Verbal 👍 from @kclowes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was wrong?
Fix #1974
Fix #1975
How was it fixed?
Replace a bunch of opcodes that dynamically check the cache warmth and charge appropriately.
Bonus changes:
BerlinTransactionExecutor
implementation to be testable)To-Do
Cute Animal Picture