tl;dr
- EELS (Execution Layer Reference Implementation in Python) is a Python implementation of the execution layer.
- You can update your mainnet.
- It passes all existing tests and fills in new ones.
- Below is an example of a EIP in EELS.
Introduce yourself
We’re proud to introduce the After more than one year of development, we are pleased to publically unveil the Ethereum Execution Layer Specification (Affectionately referred to as EELS. EELS is a Python implementation of the Ethereum core components with a focus on readability and simplicity. As a spiritual successor of the Yellow Paper The EELS is more user-friendly and can execute state tests and follow the mainnet.1It’s a great place for prototyping new EIPs.
EELS provides complete snapshots of the protocol at each fork—including upcoming ones—making it much easier to follow than EIPs Clients that are only interested in making changes and clients that produce code (which can mix up multiple forks of the same codepath).
History
As a joint project between ConsenSys and the Ethereum Foundation in 2021, the eth1.0-spec Yellow Paper, as it was called then, was inspired by frustration at having to decipher cryptic symbols.Figure 1() to understand the behavior of an EVM.
Using the best of what has been successful Consensus Layer SpecificationWe then set about creating a similar executable for the layer of execution.
Present
EELS can be purchased as a consumable today. traditional Python repository As well as rendered documentation. The translation is still rough and there aren’t many annotations, or English explanations, for the various pieces. But that will change with time.
Python, that’s all.
It is worth comparing the Yellow Paper with the EELS code.

Def less_than(evm: Evm) -> There are no other alternatives.: # STACK Left: = Popularity(evm.Stack) Right = Popularity(evm.Stack) # GAS charge_gas(evm, GAS_VERY_LOW) # OPERATION The result is: = U256(Right < Right) Push(evm.Stack, Results) # PROGRAMCOUNTER evm.pc += 1
You can also contact us by clicking here. Figure 2 Academics may find it digestible. Figure 3 It is indisputable that programmers are more comfortable with the language.
Here’s an example of a video walk-through of adding a simple EVM instruction If that’s what you like.
Writing tests
EELS is regular Python. The library can be tested just like any Python library. It is also possible to test the entire ethereum/tests We also offer a range of suites. pytest tests.
You can get a little assistance from execution-spec-testsAny tests written for EELS clients can be used by production clients as well!2
Differences are shown
For client developers, snapshots are not helpful. They can only see differences between forks. For these developers, EELS displays the differences between forks.

As an Example, EIP
EIP-6780 The first EIP to be approved an EELS implementation This information is provided by the author. Guillaume Ballet! Look at this.

We will begin by introducing a created_contracts Variable to the EVM that has transaction-level scope
@dataclass class Environment: Caller: Address List of block-hashes[Hash32] Origin: Address coinbase: Address Number: Uint Base_fee_per_gas in Uint Gas_limit Uint The gas price: Uint time: U256 prev_randao: Bytes32 State chain_id: U64 + Created_contracts: Set[Address]
We note down the contract numbers that each transaction created.
+ evm.env.created_contracts.add(contract_address)
Last but not least, we will modify Self-destruct It only works on contracts noted in created_contracts:
- # register account for deletion - evm.accounts_to_delete.add(originator) - + # Continue only if you have created the contract in the same tx + if originator in evm.env.created_contracts: + + # register account for deletion + evm.accounts_to_delete.add(originator) +
The Future
We want EELS as the standard way to specify Core EIPs. It should be the first place EIP writers go to prototype and reference how Ethereum works.
Join us if you want to contribute or prototype your EIP. #specifications Grab a copy of our magazine or channel repository.
“This article is not financial advice.”
“Always do your own research before making any type of investment.”
Source: blog.ethereum.org

