MultiversX Tracker is Live!

A Simple Explanation of EOF: EVM Object Format

Etherum Reddit

More / Etherum Reddit 80 Views

EOF is the biggest upgrade in the EVM's history. Coming in the Shanghai fork in March, EOF will completely change how Ethereum works. Here's a summary.

EIP-3540
The first upgrade in EOF changes how instructions to the EVM are structured. Specifically, it establishes a structure where one didn’t really exist before. It splits bytecode into two strings of characters, one containing code and the other containing data.

This EIP also makes it easier to upgrade the EVM. It creates a system to distinguish new contracts and what features each is using. The EVM executes each program based on the “version” of the EVM it was released in, so new upgrades can be delivered more easily.

EIP-3670
This introduces the concept of code validation, specifically when a smart contract is deployed. Contracts today aren’t validated by the Ethereum network before they’re deployed, they get validated as they’re executed by people.

Validating contracts upon deployment saves significantly on execution costs. Programs are validated once upon deployment, and any necessary data for operation is made available in the data section of the bytecode.

EIP-4200
Quick tangent: Stack machines can be imagined as glass containers, tall and thin. They execute instructions and store data in these glass containers. The first piece of data is placed at the bottom, and everything afterwards gets placed on top, in a “stack.”

Stack machines have pointers that can move between pieces of data to read them. The way Ethereum shift its pointer today is with a “JUMP” which requires a destination, or a “JUMPDEST.”

EIP-4200's new opcodes enable the Ethereum stack machine to shift its pointer far more efficiently. This results in cheaper gas fees both for deploying a contract as well as for interacting with one. It also makes on-chain analysis easier.

EIP-4750
This introduces functions that the stack itself can perform. Functions are instructions that need to be performed more than once in a program. Writing such instructions once as a function makes programs more efficient, leading to cost savings on Ethereum.

Currently, functions don’t exist at the bytecode level (that the stack machine executes) on Ethereum. To repeat instructions, the “JUMP” and “JUMPDEST” opcodes are instead used to shift the pointer to where an instruction is when it needs to be executed.

EIP-5450
This EIP focuses on validating contracts upon deployment, but by looking for errors the stack machine might encounter, called stack overflows or underflows.

Stack Overflow = when a stack is out of space
Stack Underflow = retrieving data from an empty stack

Despite stack overflows and underflows being basic errors, they can occur on Ethereum today. The checks to prevent them are introduced with this EIP.

EOF is a suite of 5 EIPs, together making EVM execution more efficient, more consistent, and more easily upgradeable. EOF itself is the first upgrade in the EVM's history, and can be expected in the Shanghai Hard Fork in March, 2023.

If you'd like to learn more, read the full write-up on my free newsletter below!

https://ramiwrites.substack.com/p/eof-the-biggest-upgrade-in-the-evms

Edit: Formatting and grammar.

submitted by /u/phillistine
[link] [comments]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
💰 Install these recommended apps:
💲 SocialGood - 100% Crypto Back on Everyday Shopping
💲 xPortal - The DeFi For The Next Billion
💲 CryptoTab Browser - Lightweight, fast, and ready to mine!
💰 Register on these recommended exchanges:
🟡 Binance🟡 Bitfinex🟡 Bitmart🟡 Bittrex🟡 Bitget
🟡 CoinEx🟡 Crypto.com🟡 Gate.io🟡 Huobi🟡 Kucoin.



Comments