Skip to content

Commit afdd3b7

Browse files
tomaswoj-ethSamWilsn
authored andcommitted
Enhance account creation handling to respect EIP-6780 constraints in state management and interpreter. Updated comments for clarity on the implications of SELFDESTRUCT.
1 parent f947ab1 commit afdd3b7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/ethereum/cancun/state.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ def mark_account_created(state: State, address: Address) -> None:
246246
"""
247247
Mark an account as having been created in the current transaction.
248248
This information is used by `get_storage_original()` to handle an obscure
249-
edgecase.
249+
edgecase, and to respect the constraints added to SELFDESTRUCT by
250+
EIP-6780.
250251
251252
The marker is not removed even if the account creation reverts. Since the
252253
account cannot have had code prior to its creation and can't call

src/ethereum/cancun/vm/interpreter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def process_create_message(message: Message) -> Evm:
167167

168168
# In the previously mentioned edge case the preexisting storage is ignored
169169
# for gas refund purposes. In order to do this we must track created
170-
# accounts.
170+
# accounts. This tracking is also needed to respect the constraints
171+
# added to SELFDESTRUCT by EIP-6780.
171172
mark_account_created(state, message.current_target)
172173

173174
increment_nonce(state, message.current_target)

0 commit comments

Comments
 (0)