Coin Brief ENDE

EIP-8298 adds mempool rules so SETCODEFROM cannot invalidate unbounded pending transactions

The draft EIP-8298, which introduces a SETCODEFROM instruction that lets an account adopt the code hash of a live source account, gained a "Public Mempool" section in a change merged into the EIPs repository on 6 October.

Why. The amendment's rationale says mempool rules that assume deployed code is immutable "must account for SETCODEFROM".

EIP-8298 adds mempool rules so SETCODEFROM cannot invalidate unbounded pending transactions
EIP-8298 adds mempool rules so SETCODEFROM cannot invalidate unbounded pending transactions — Coin Brief

The new rules, which apply only to public mempool validation of EIP-8141 frame transactions and "do not affect consensus":

  • SETCODEFROM should be banned during validation-prefix execution.
  • A contract reached through CALL* or EXTCODE* during the validation prefix whose code contains a SETCODEFROM instruction (ignoring PUSH data) should be treated like an account with an EIP-7702 delegation indicator, that is, as having mutable code.
  • If such a contract's code contains DELEGATECALL or CALLCODE instead, it can still reach SETCODEFROM through delegated code. Nodes should track its code hash as a validation dependency and limit how many pending transactions may depend on it, "so that one code update cannot invalidate an unbounded number of transactions". The text says this keeps proxy-based accounts usable.

Where it stands. EIP-8298 is a draft. The change adds ten lines and touches no consensus rules.