1

I've seen this term used a lot in EIPs and client implementations. But I've never seen it defined properly. What does it mean, precisely, for an account to be "touched"?

For example, here's an excerpt from EIP-7523:

Despite empty accounts no longer existing, they still impose a legacy of technical debt. EIP-161 imposes complicated rules that require a client to delete an empty account when it is “touched”. As the Ethereum specification continues to evolve new edgecases of the “touch” rules arise which must be debated, implemented, tested and documented.

2 Answers 2

3

touched == accessed (per tx)

meaning read, write or executed (during the same tx only), including:

  • tx sender (tx.origin)
  • coinbase address (block.coinbase)
  • address accessed via balance opcode (address(x).balance)
  • address accessed via extcodehash, extcodesize, extcodecopy opcodes
  • address accessed via call opcodes (eg. contract.func(..), account.transfer(1e18))
  • address created via create, create2 opcodes (new Contract(..))
  • any address in the access list (eip-2930)

eip-161 refers to the case where selfdestruct was executed, leaving touched account empty.

4
2

I've never seen the term defined properly either but i would assume this refers to a non-empty account. To be a bit more specific, an account is defined by its address and four parameters : its nonce, balance, code hash, storage hash. I would assume an account is defined to be "touched" whenever one of those parameters isnt its default value, i.e. its state has been changed in any way by a transaction at any point in the chains lifetime. So, an account that received ETH would be considered touched, but an account could receive an ERC20 token and stay untouched, because this doesnt incur a modification of those values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.