Mega EOF Scoping
These are just the opinon of @shemnon and not binding on any other contributors.
Tier list
Tier 1: Removing items from Legacy EVM
Opcodes Removed
Stuff we need to get rid of (no replacement or replacements already exist)
Code Introspection:
CODSIZE
CODECOPY
EXTCODESIZE
EXTCODECOPY
EXTCODEHASH
CREATE
CREATE2
Gas Introspection:
GAS
CALL
DELEGATECALL
STATICCALL
Remove Dynamic Jumps:
Tier 2: Essential Additions
These cannot be added without a breaking version change
- Container format
- Static code validation
- Static stack analysis and code section type data
- Code sections for subroutines
Without the following, EOF is unsuitable for any use
Opcodes enabling essential additions
Static jumps: JUMP series replacements
Calling other contracts: CALL series replacement
EXTCALL
EXTDELEGATECALL
EXTSTATICCALL
Tier 3: Replacements for features lost by bans
B
Factory Contract: CREATE2 replacement
- Subcontainer section
EOFCREATE
RETURNCONTRACT
Data in contract, CODECOPY replacement
- data section
DATALOAD
DATALOADN
DATASIZE
DATACOPY
Tier 4: Important quality of life
Operations and behaviors not replacing removed fatures, but explicitly asked for by compielr teams.
Has to ship in 1.0, otherwise completely missed
Opcode changes
- Prepare for Address Space Expansion (don't trim addresses in operations) EIP-7676
Can Slip out to 1.1
Jumps:
Stack (EIP-663)
DUPN
SWAPN
EXCHANGE
(swap, but doesn't require stack item 1)
EXTCALL usability
Tier 5: Enabling Future Features
Account abstraction
Creating contracts from bundled code
- Initcode Transaction
TXCREATE
Shaghai vs Mega
What was already in Shanghai
Bans -
SELFDESTRUCT
CALLCODE
JUMP
JUMPI
PC
Container -
- Container format
- static code validation
- static stack analysis and code section type data
- code sections for subroutines
Opcodes
CALLF
RETF
RJUMP
RJUMPI
RJUMPV
New in Mega-EOF
Bans -
CODESIZE
CODECOPY
EXTCODESIZE
EXTCODECOPY
EXTCODEHASH
CREATE
CREATE2
GAS
CALL
DELEGATECALL
STATICCALL
Container -
Behavior -
- Relaxed stack validation (stack ranges)
- Remove Address Space Trimming (prepare for Address Space Expansion)
Opcodes
JUMPF
EXTCALL
EXTDELEGATECALL
EXTSTATICCALL
DATALOAD
DATALOADN
DATASIZE
DATACOPY
EOFCREATE
RETURNCONTRACT
DUPN
SWAPN
EXCHANGE
RETURNDATALOAD
New by tier
Tier 1
Bans -
CODSIZE
CODECOPY
EXTCODESIZE
EXTCODECOPY
EXTCODEHASH
CREATE
CREATE2
GAS
CALL
DELEGATECALL
STATICCALL
Tier 2
Behavior
- Relax Stack Validaiton (ranges and forward references)
Opcodes
JUMPF
EXTCALL
EXTDELEGATECALL
EXTSTATICCALL
Tier 3
EOF sections
Opocodes
EOFCREATE
RETURNCONTRACT
DATALOAD
DATALOADN
DATASIZE
DATACOPY
Tier 4
Behavior
- Prepare for ASE (change to BALANCE, plus testing)
Opcodes
DUPN
SWAPN
EXCHANGE
RETURNDATALOAD
Tier 5
Transaction types
- Initcode Transaction
- Initcode Transaction receipt
Opcodes