ً Profile picture
Nov 17 17 tweets 5 min read
Ethereum has recently seen substantial changes, such as the move to PoS & EIP-1559. However, the EVM looks mostly the same.

This may finally change with the Ethereum Object Format (EOF), which is likely going into Shanghai. It will be the EVM's biggest change since genesis. Image
EOF is comprised of several EIPs. Although they aren't "all or nothing", we're considering them as an entire set. The EIPs are:

EIP-3540: EOF v1
EIP-3670: Code validation
EIP-4200: Static relative jumps
EIP-4750: Functions
EIP-5450: Stack validation
EIP-3540: EOF v1

This EIP introduces the EOF container. This includes an EOF header and several EOF sections (code, data, types). This sets up the scene to allow for EVM interpreters to interpret EOF contracts differently than legacy contracts.
EIP-3670: Code validation

This is the first EIP that uses the EOF container. It constricts code by validating certain properties such as (some come from later EOF EIPs):

* no deprecated/undefined op
* code ends in "terminating" op
* jumps are valid
* function calls are valid
EIP-4200: Static relative jumps

New control flow operations are added, RJUMP + RJUMPI. These ops take an operand (like PUSH) which points to a code location relative to the op to jump to. It costs less than its JUMP counterpart, because validation only needs to happen once.
EIP-4750: Functions

More control flow operations are added, CALLF and RETF. This introduces the concept of EVM functions aka subroutines. With this + 4200, we can fully remove dynamic jumps (JUMP/JUMPI).
It also introduces type sections which essentially define the function signature. Since there is only 1 type in the EVM (uint256), the signature is just a tuple of inputs and outputs.

A big win from this EIP is better static analysis + no more JUMPDEST analysis (expensive).
EIP-5450: Stack validation

The last EIP of EOF introduces a static validation requirement for the stack. Currently, each loop of the interpreter must determine if the op it is about to execute will underflow/overflow.
With 5450, the code will be analyzed at deployment to determine the "maximum stack size" (MSS) for each code section and determine if any underflows occur. The contract deployment would fail if an underflow is encountered.
The MSS for each function is later used to extricate the interpreter of checking overflows at each op. Instead, the potential for overflow is only checked when changing code sections with CALLF. This will marginally improve the speed of the interpreter loop.
Generally speaking- the stricter requirements of validation are expected to improve the performance of interpreter-based EVMs and make the EVM more amenable to JIT compilation of bytecode.
The EOF suite of EIPs is result of many years of work by @teamipsilon (e.g. @alexberegszaszi, @gumb00, @chfast, etc).

Not only will it bring substantial improvements to the EVM on introduction; it also finally adds versioning to EVM code.
Although it is just the beginning of EOF, I am excited to see what an "upgradable" EVM will allow us to do. I can already imagine that it can improve the experience of working with L2s that aren't perfectly EVM-compatible.
There could be some reserved "L2 versions" of EOF where L2s can experiment - but at the same time provide an L1 EVM version with identical semantics.
If you are able to, please review the EOF EIPs and share any feedback on their respective eth magicians threads. The exact set of EIPs in Shanghai is still being determined, but community support of EOF can go a long way.
There is an EOF breakout room with core developers tomorrow where we'll discuss a few open questions: github.com/ethereum/pm/is…
In the next few weeks, we'll have a devnet with EOF. I'll share more details when the time comes. In the meantime, here are some other relevant links:
* github.com/ipsilon/eof
* notes.ethereum.org/@ipsilon/eof1-…
* github.com/ethereum/go-et…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with ً

ً Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @lightclients

Jun 6
After the merge, there will be a much larger faction of "at home" block producers than we've seen under proof-of-work. In order for these independent stakers to extract MEV, we need to think differently about our approach to block production (thread).
First, let's recap how MEV is extracted today.

There are many actors in this game, but we can roughly distill the interaction down to three: searchers, builders, and miners.
The searcher's goal is to extract MEV from txs. When they find a vulnerable tx, they package it with their own tx that does the extraction. This bundle is often referred to as a "fragment". The searcher sends their fragments to the builder to be aggregated.
Read 26 tweets
Dec 5, 2021
The design space for protocol upgrades that improve the user experience on Ethereum is large, however, there are two categories that I believe deserve most of our attention (thread).
These categories can be deduced by working backwards from the types of accounts available today, and the functionality each of them provide.
It's also important to note _why_ UX in Ethereum tends to be so poor:

Authentication is a critical building block for smart contracts. There needs to be a secure way to know "account X is okay with Y happening". Developers have turned to `msg.sender` for this functionality.
Read 25 tweets
Nov 22, 2021
Ethereum clients currently store 275 GB of historical data that is unnecessary to validate the chain. That number is growing at a rate of around 140 GB per year. EIP-4444 proposes clients prune data older than 1 y/o.

So why don't we just prune the data already?
To understand why the data has yet to be pruned and why this is even a discussion, it's important to understand how historical data is used today. There are two main categories of usage: syncing and user requests over JSON-RPC.
In the world of syncing, there are two main approaches:
- Full sync - from genesis, download every block & execute it until tip of chain is reached.
- State sync - many schemes here, but essentially header sync using PoW checks and then download the state for the latest block.
Read 23 tweets
Apr 26, 2021
Smart contract developers:

How much does the storage refund need to decrease before you start using a different value to represent 0?
The London hard fork in July will almost certainly modify the behavior of refunds. There have been several iterations, but the latest is EIP-3529: Reduction in refunds.
I recommend reading the EIP as it is very thorough and explains the past proposals, however the main case we care about for this thread is setting a nonzero storage element to zero and the refund that incurs.

eips.ethereum.org/EIPS/eip-3529
Read 16 tweets
Apr 23, 2021
In the last month, users spent $23,830,482 on ERC-20 approvals. EIP-3074 would reduce that number by at least 30%, saving users millions while freeing up block space (thread). Image
Anyone whose nonce is greater than ten has likely experienced the approve+transfer flow that defi applications use to interact with ERC-20 tokens. The approve method is a relic of the original ERC-20 design.

@DuneAnalytics dashboard for above tweet: duneanalytics.com/lightclient/US…
There have been many attempts to alleviate the burden of token approvals, but none have succeeded. We believe EIP-3074 will resolve the issue because it addresses the two problems that have beleaguered other approaches.
Read 15 tweets
Mar 16, 2021
Ethereum wallets may be getting a significant upgrade soon. With the proposed change, EOAs will immediately be able to send batch txs, expiring txs, unordered txs, and more. (thread)
My colleagues, @_SamWilsn_ and @adietrichs, and I have been working on improving the UX of interacting with Ethereum. After many iterations, we've come up with EIP-3074: AUTH and AUTHCALL opcodes.
To use these opcodes, an EOA signs a message off-chain, provides the message to a relayer, the relayer passes the signature and calldata to a contract on-chain (called an invoker), the contract verifies the signature using AUTH, and then relays the EOA's call with AUTHCALL.
Read 26 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(