feat(spec-specs, tests): refund EIP-8037 account creation for existing create targets#19
Open
spencer-tb wants to merge 8 commits into
Conversation
7ee353f to
640cec5
Compare
640cec5 to
1c62eda
Compare
…thereum#2995) Co-authored-by: raxhvl <10168946+raxhvl@users.noreply.github.com>
…ereum#2998) Add `test_max_code_size_jumpdest_in_immediate`, which places a `0x5B` as the last byte of a `MAX_CODE_SIZE` contract, right after an immediate-carrying opcode, and jumps to it: - `PUSH1`: The `0x5B` is push data, always skipped, so the jump is rejected. - `DUPN`/`SWAPN`/`EXCHANGE`: Per EIP-8024 the `0x5B` is an invalid immediate, kept at an instruction boundary, so it stays a valid `JUMPDEST` and the jump is accepted. Exercises the immediate-skipping branches of jumpdest analysis well past the old 24 KiB code and 48 KiB initcode limits.
150926b to
cd87062
Compare
…thereum#2999) Co-authored-by: kclowes <kclowes@users.noreply.github.com>
cd87062 to
aa06dcb
Compare
This file contains hidden or 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
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.
🗒️ Description
Charge the
CREATE/CREATE2account-creation state gas (NEW_ACCOUNT) unconditionally before the create frame, and refund it on frame exit when the destination already existed (an existing leaf, so no new account is created) — in addition to the existing refunds on failure (revert, halt, collision, pre-frame failure).Deciding whether the target pre-exists requires reading the computed address, which EIP-7928 (Block-Level Access Lists) defers until the EVM actually accesses it. Charging unconditionally and refunding after the frame avoids that early read while keeping the out-of-gas condition in the parent frame (unchanged behavior).
CALL*stays conditional. The same unconditional-charge-with-refill applies to top-level contract-creation transactions.Stacked on the source-based-refunds branch.
🔗 Related Issues or PRs
N/A.
✅ Checklist
just statictype(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_frommarker.Cute Animal Picture