Skip to content

core/state: no need to delete storage slots in CreateContract since we now have EIP-7610 implemented #15443

@taratorio

Description

@taratorio

work to remove w.tx.DomainDelPrefix(kv.StorageDomain, address[:], w.txNum) in StateWriter.CreateContract (state.Writer implementation is the main one but also check others)

after EIP-7610 (applied retrospectively for all blocks from block 0) we no longer need to do this since if any transaction at any block tries to create a contract which has storage then execution will return a collision error (as per spec) and that happens before we reach the call to StateWriter.CreateContract - so we are guarded and calling DomainDelPrefix(kv.StorageDomain, address[:], w.txNum) is pointless

when I tried removing it 1 month ago 2 tests failed:

  • TestDeleteRecreateSlots
  • TestDeleteRecreateSlotsAcrossManyBlocks

they are legit test cases that should pass without DomainDelPrefix(kv.StorageDomain, address[:], w.txNum) but I think we have some bug in how we instantiate these tests - something weird happening when initiating the initial state - will debug further

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions