Skip to content

Commit

Permalink
fix(levm): create address should remain touched even in fails (#1538)
Browse files Browse the repository at this point in the history
**Motivation**

The new address should remain in the touched adresses even in fails

**Description**
- Remove the line that removed the address from the touched addresses.

**Resources**
"Clarification: If a CREATE/CREATE2 operation fails later on, e.g during
the execution of initcode or has insufficient gas to store the code in
the state, the address of the contract itself remains in
access_addresses (but any additions made within the inner scope are
reverted)."

From https://eips.ethereum.org/EIPS/eip-2929
  • Loading branch information
LeanSerra authored Dec 19, 2024
1 parent bb7251d commit 342e266
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion crates/vm/levm/src/opcode_handlers/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ impl VM {
// Deployment failed so account shouldn't exist
cache::remove_account(&mut self.cache, &new_address);
self.accrued_substate.created_accounts.remove(&new_address);
self.accrued_substate.touched_accounts.remove(&new_address);

current_call_frame.stack.push(CREATE_DEPLOYMENT_FAIL)?;
}
Expand Down

0 comments on commit 342e266

Please sign in to comment.