Open
Description
Before EIP-7702, contract code could not be reset and could only be deleted when the account was destructed. This behavior has changed with EIP-7702.
In a Merkle tree, contract code is not stored directly in the trie; instead, only the code hash is maintained in the account object. As a result, resetting contract code does not cause any issues.
In a Verkle tree, however, the contract code itself is stored directly within the trie, making the semantics less clear:
- If the contract code is unset, all leftover code chunks should be removed;
- If new contract code is added, the corresponding code chunk should be inserted;
- If contract code were to be updated with a different size (currently not possible),
- part of the code should be overwritten;
- part of the code should be removed;