I asked myself recently: if there was any one last thing I’d bring up before the spec shipped, what would that be?
What I landed on was: changing EXTCODE*
back to prefix || delegate
.
The proposal to change EXTCODE*
behavior from acting on the delegate contract’s bytecode to the EOA’s “delegation designator” was to stop EOAs from “temporarily masquerad[ing] as having a particular codehash, which would break contracts that rely on codehashes as an indicator of possible account behavior” (ref), however having EXTCODE*
only act on the delegation prefix 0xef01
seems like an over-correction.
If the purpose of this behavior is to stop EOAs from masquerading as regular contracts, then this would still be solved if EXTCODE*
opcodes acted on the full “delegation designator” since no deployed contracts start with the banned opcode 0xef
. In other words, legacy protocols that rely on codehashes couldn’t be broken by a delegated EOA if EXTCODE*
opcodes act on the entire “delegation designator” because these opcodes would never return normal contract values when called on a delegated EOA.
Meanwhile, it would be incredibly useful to be able to query what delegate contract an EOA is using on-chain to infer account behavior.
Anyways, just my 2 cents!