Summary
Implement the EVM Object Format (EOF) — a structured bytecode container with typed sections, static jump validation, and no runtime JUMPDEST analysis. EOF is a major EVM upgrade expected post-Prague.
Specification
EOF bytecode starts with 0xEF00 magic bytes followed by:
- Version byte (currently
0x01)
- Section headers: type, code, container, data sections
- Each code section has input/output stack heights validated at deploy time
Key Changes
- No
JUMPDEST scanning at runtime — jumps validated at deploy time
- New opcodes:
RJUMP, RJUMPI, RJUMPV (relative jumps), CALLF/RETF (function calls), JUMPF, DUPN, SWAPN, EXCHANGE, EOFCREATE, RETURNCONTRACT, TXCREATE, RETURNDATALOAD, EXTCALL, EXTDELEGATECALL, EXTSTATICCALL, DATALOAD, DATALOADN, DATASIZE, DATACOPY
- Stack validation at deploy time — no runtime underflow possible
- Separate code and data sections
Implementation Guide
This is a large feature. Suggested breakdown:
- EOF container parser — parse header, validate magic/version, extract sections
- Stack validation — validate stack heights at deploy time for each code section
- New opcodes — implement RJUMP, RJUMPI, CALLF, RETF, etc.
- Deploy-time validation — reject invalid EOF containers in CREATE/CREATE2
- Runtime execution — modified executor for EOF bytecode (no JUMPDEST scanning)
Acceptance Criteria
Reference
Note
EOF is NOT yet active on mainnet. This is a forward-looking implementation.
Summary
Implement the EVM Object Format (EOF) — a structured bytecode container with typed sections, static jump validation, and no runtime JUMPDEST analysis. EOF is a major EVM upgrade expected post-Prague.
Specification
EOF bytecode starts with
0xEF00magic bytes followed by:0x01)Key Changes
JUMPDESTscanning at runtime — jumps validated at deploy timeRJUMP,RJUMPI,RJUMPV(relative jumps),CALLF/RETF(function calls),JUMPF,DUPN,SWAPN,EXCHANGE,EOFCREATE,RETURNCONTRACT,TXCREATE,RETURNDATALOAD,EXTCALL,EXTDELEGATECALL,EXTSTATICCALL,DATALOAD,DATALOADN,DATASIZE,DATACOPYImplementation Guide
This is a large feature. Suggested breakdown:
Acceptance Criteria
Reference
Note
EOF is NOT yet active on mainnet. This is a forward-looking implementation.