Add EIP: Persist Warm Access Sets Across Reverts - #12128
Conversation
File
|
|
The commit 25bc0e5 (as a parent of 51845b4) contains errors. |
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
jochem-brouwer
left a comment
There was a problem hiding this comment.
Two minor clarifications requested 😄 👍
|
|
||
| ## Test Cases | ||
|
|
||
| * Frame A calls frame B; B does a cold `SLOAD` of slot `s` and reverts. A then loads `s`: charged `WARM_STORAGE_READ_COST` (previously `COLD_SLOAD_COST`). |
There was a problem hiding this comment.
CONTRIBUTING.md asks to avoid sections consisting only of bulleted lists: please add a short introductory sentence. That sentence is also a good place to anchor where WARM_STORAGE_READ_COST / COLD_SLOAD_COST / COLD_ACCOUNT_ACCESS_COST are defined, e.g. "The following cases use the gas constants of EIP-2929." Right now these constants appear here without a pointer, so readers have to search outside the document or have to know that these implied constants are in EIP-2929.
|
|
||
| As of the fork block: | ||
|
|
||
| * When a call frame ends in any outcome other than successful completion, `accessed_addresses` and `accessed_storage_keys` MUST NOT be rolled back. All entries added during the frame's execution, including those added by its subcalls, MUST remain in the sets. |
There was a problem hiding this comment.
I believe this could use a clarification, because this depends on when an address/storage slot becomes warm (depends on the order of the checks). If I do not have enough gas to make the slot/address warm, does it become warm or not? If I can pay for the gas to make it warm, but not for other costs (e.g. changing the slot) it thus stays warm. This is important to define to make clients agree on the warm/cold set 😄 👍
Adds a new Core EIP that removes the rollback of
accessed_addressesandaccessed_storage_keyson call-frame revert or exceptional halt (amending EIP-2929 behavior): once warmed, addresses and storage keys stay warm for the rest of the transaction.discussions-tois TBD pending an ethereum-magicians thread; will rename the file to the assigned EIP number.