EIP-7819: Create delegate

Discussion topic for EIP-7819

Update Log

2024-11-18: initial draft Add EIP: Create delegate by Amxx · Pull Request #9042 · ethereum/EIPs · GitHub

External Reviews

None as of 2024-11-18.

Outstanding Issues

2024-11-19: Which magic value to use? (0xef0100 vs 0xef0101)
2024-11-20: Include opcode into legacy EVM (in addition to EOF)?

1 Like

This instruction is NOT added to legacy EVM.

Why not?

A better way to specify this than a CREATEDELEGATE opcode might be to allow CREATE, CREATE2, EOFCREATE/RETURNCONTRACT to return a delegate contract.

I don’t think every kind of special contract should have its own opcode.

This instruction is NOT added to legacy EVM.
Why not?

This is up to debate. I think I did not want to focus on pushing more stuff to the legacy EVM now that we are in a transition to EOF. IMO, there is no way this EIP makes it into a fork before EOF, so I though it would be simpler to only have that in EOF.

better way to specify this than a CREATEDELEGATE opcode might be to allow CREATE , CREATE2 , EOFCREATE /RETURNCONTRACT to return a delegate contract.

That is an interresting idea, but it would not provide a mechanism for upgradeability of the delegate:

  • CREATE uses a different nonce everytime
  • CREATE2 would target a different address if the bytecode (of the delegate) changes
  • in any cases, both CREATE and CREATE2 fail is the target as non empty code

IMO, this proposal loses a lot of its value if upgrades are not possible.

1 Like

Upgrades could still be possible via SETCODE/RECREATE or any of the other mutable code proposals. I think mutable code is important enough that it should be available to everyone, not only delegators.

That is a very different path that will take a very long time to get accepted (if it ever is).

Delegations already have this reconfiguration by design, which made me thing this proposal would be more easily accepted than a combo “CREATE/CREATE2/EOFCREATE can create delegations” + “SETCODE/RECREATE” that may takes multiple years to be available.

1 Like