freecoding.school100% FREE · NO SIGNUP
The EVM CoreISSUE #23 of 48

eof · evm object format

SoliaVSThe Reentrancy Reaper
Solia saysEVM Object Format restructures bytecode into a versioned container with explicit code, data, and type sections — enabling static jumps, banning dynamic JUMP, and modernizing the runtime.

Legacy EVM bytecode is one monolithic blob with implicit code/data mixing and dynamic JUMP destinations checked at runtime. EOF (EVM Object Format) wraps bytecode in a versioned container with explicit sections: a header (magic 0xEF00 + section table), a type section, code sections per function, and a data section. Static relative jumps replace dynamic JUMP, so JUMPDEST analysis vanishes from the runtime.

The payoff is a cleaner runtime, faster validation, and the ability to evolve the bytecode format without breaking old contracts. EOF ships alongside related EIPs (3540, 3670, 4200, …) and forms the basis for future opcodes. The demo contrasts the two formats.

Power-ups you unlock

The Reentrancy Reaper attacks — common mistakes

Boss battleLay out the legacy bytecode model vs the EOF container model and identify three improvements.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre id="o"></pre>
<script>
const legacy = {
  header: 'none',
  layout: 'monolithic blob: opcodes + data interleaved',
  jumps:  'dynamic JUMP / JUMPI, JUMPDEST analysis at runtime',
  validation: 'minimal at deploy; risk at runtime'
};
const eof = {
  header: '0xEF00 (magic) + version + section table',
  layout: 'sections: [type] [code₀ code₁ …] [data]',
  jumps:  'static relative jumps (RJUMP, RJUMPI), no JUMPDEST analysis',
  validation: 'strict at deploy: malformed code is rejected'
};
const improvements = [
  '1. faster runtime (no JUMPDEST analysis)',
  '2. structured functions for future opcodes',
  '3. clean separation of code and data',
  '4. versioned format → can evolve without breaking old contracts'
];
document.getElementById('o').textContent = [
  'LEGACY EVM bytecode:',
  ...Object.entries(legacy).map(([k,v]) => '  ' + k.padEnd(11) + v),
  '',
  'EOF container:',
  ...Object.entries(eof).map(([k,v]) => '  ' + k.padEnd(11) + v),
  '',
  'improvements:',
  ...improvements
].join('\n');
</script></body></html>
▶ Open the interactive comic issue
‹ The Yellow Paper · Formal Evm SemanticsAlt-Vms · Movevm · Svm · Cairovm ›