Altszn.com
  • Home
  • Crypto
    • Altcoins
    • Bitcoin
    • Ethereum
    • Monero
    • XRP
    • Zcash
  • Web3
  • DeFi
  • NFTs
No Result
View All Result
Altszn.com
  • Home
  • Crypto
    • Altcoins
    • Bitcoin
    • Ethereum
    • Monero
    • XRP
    • Zcash
  • Web3
  • DeFi
  • NFTs
No Result
View All Result
Altszn.com
No Result
View All Result

Ethereum Execution Layer Specification | Ethereum Foundation Blog

Altszn.com by Altszn.com
August 29, 2023
in Ethereum
0
Ethereum Execution Layer Specification | Ethereum Foundation Blog
399
SHARES
2.3k
VIEWS
Share on FacebookShare on Twitter


tl;dr

  • EELS is an execution layer reference implementation in Python.
  • It’s up to date with mainnet.
  • It fills tests, and passes existing ones.
  • There’s an example of an EIP implemented in EELS below.

Introduction

After more than a year in development, we’re pleased to publicly introduce the Ethereum Execution Layer Specification (affectionately known as EELS.) EELS is a Python reference implementation of the core components of an Ethereum execution client focused on readability and clarity. Intended as a spiritual successor to the Yellow Paper that’s more programmer friendly and up-to-date with post-merge forks, EELS can fill and execute state tests, follow mainnet1, and is a great place to prototype new EIPs.

EELS provides complete snapshots of the protocol at each fork—including upcoming ones—making it much easier to follow than EIPs (which only propose changes) and production clients (which often mix multiple forks in the same codepath.)

History

Beginning in 2021, as a project of ConsenSys’ Quilt team and the Ethereum Foundation, the eth1.0-spec (as it was known then) was inspired by the sheer frustration of having to decipher the cryptic notation of the Yellow Paper (Figure 1) to understand the specific behavior of an EVM instruction.

Screenshot of formulas 2, 3, and 4 from the Yellow Paper
Figure 1. arcane runes describing the basis of the blockchain paradigm

Drawing on the successful Consensus Layer Specification, we set out to create a similar executable specification for the execution layer.

Present

Today, EELS is consumable as a traditional Python repository and as rendered documentation. It’s still a bit rough around the edges, and doesn’t provide much in the way of annotations or English explanations for what various pieces do, but those will come with time.

It’s just Python

Hopefully a side-by-side comparison of the Yellow Paper and the equivalent code from EELS can show why EELS is a valuable complement to it:

Less-than (LT) opcode

Figure 2. Less-than (LT) EVM instruction from Yellow Paper

def less_than(evm: Evm) -> None:     # STACK     left = pop(evm.stack)     right = pop(evm.stack)      # GAS     charge_gas(evm, GAS_VERY_LOW)      # OPERATION     result = U256(left < right)      push(evm.stack, result)      # PROGRAM COUNTER     evm.pc += 1 

Figure 3. Less-than (LT) EVM instruction from EELS

While Figure 2 might be digestible to academics, Figure 3 is indisputably more natural to programmers.

Here’s a video walk-through of adding a simple EVM instruction if that’s your kind of thing.

Writing Tests

It bears repeating: EELS is just regular Python. It can be tested like any other Python library! In addition to the entire ethereum/tests suite, we also have a selection of pytest tests.

With a little help from execution-spec-tests, any tests written for EELS can also be applied to production clients!2

Showing Differences

Having snapshots at each fork is great for a smart contract developer popping in to see the specifics of how an EVM instruction works, but isn’t very helpful for client developers themselves. For them, EELS can display the differences between forks:

Screenshot of the differences in the apply_fork function between homestead and the DAO fork

Figure 4. one difference between homestead and the DAO fork

An Example EIP

EIP-6780 is the first EIP to get an EELS implementation provided by the author, Guillaume Ballet! Let’s take a look.

Screenshot of EIP-6780's specification section

Figure 5. EIP-6768’s specification section

First, we introduce a created_contracts variable to the EVM with transaction-level scope:

 @dataclass  class Environment:      caller: Address      block_hashes: List[Hash32]      origin: Address      coinbase: Address      number: Uint      base_fee_per_gas: Uint      gas_limit: Uint      gas_price: Uint      time: U256      prev_randao: Bytes32      state: State      chain_id: U64 +    created_contracts: Set[Address] 

Second, we note which contracts were created in each transaction:

+    evm.env.created_contracts.add(contract_address) 

Finally, we modify selfdestruct so it only works for contracts noted in created_contracts:

-    # register account for deletion -    evm.accounts_to_delete.add(originator) - +    # Only continue if the contract has been created in the same tx +    if originator in evm.env.created_contracts: + +        # register account for deletion +        evm.accounts_to_delete.add(originator) + 

Future

We want EELS to become the default way to specify Core EIPs, the first place EIP authors go to prototype their proposals, and the best possible reference for how Ethereum works.

If you’re interested in contributing or prototyping your EIP, join us on the #specifications channel or grab an issue from our repository.



Read More: blog.ethereum.org

Tags: blogETHEthereumexecutionFoundationLayerSpecification
ADVERTISEMENT

Recent

Sui vote on $162M Cetus funds ignites decentralization debate in DeFi

Sui vote on $162M Cetus funds ignites decentralization debate in DeFi

May 30, 2025
Xend Finance, Risevest Launch Tokenization Platform in Africa

Xend Finance, Risevest Launch Tokenization Platform in Africa

May 30, 2025
Bitcoin Slips Below $104K, Cryptos Slide as U.S.-China Tariff Tensions Flare Up

Bitcoin Slips Below $104K, Cryptos Slide as U.S.-China Tariff Tensions Flare Up

May 30, 2025

Categories

  • Bitcoin (4,542)
  • Blockchain (10,826)
  • Crypto (8,770)
  • Dark Web (447)
  • DeFi (8,125)
  • Ethereum (4,573)
  • Metaverse (6,847)
  • Monero (251)
  • NFT (1,117)
  • Solana (4,921)
  • Web3 (19,898)
  • Zcash (467)

Category

Select Category

    Advertise

    Advertise your site, company or product to millions of web3, NFT and cryptocurrency enthusiasts. Learn more

    Useful Links

    Advertise
    DMCA
    Contact Us
    Privacy Policy
    Shipping & Returns
    Terms of Use

    Resources

    Exchanges
    Changelly
    Web3 Jobs

    Recent News

    Sui vote on $162M Cetus funds ignites decentralization debate in DeFi

    Sui vote on $162M Cetus funds ignites decentralization debate in DeFi

    May 30, 2025
    Xend Finance, Risevest Launch Tokenization Platform in Africa

    Xend Finance, Risevest Launch Tokenization Platform in Africa

    May 30, 2025

    © 2022 Altszn.com. All Rights Reserved.

    No Result
    View All Result
    • Home
      • Home – Layout 1
      • Home – Layout 2
      • Home – Layout 3

    © Altszn.com. All Rights Reserved.

    • bitcoinBitcoin (BTC) $ 104,701.00
    • ethereumEthereum (ETH) $ 2,538.29
    • tetherTether (USDT) $ 1.00
    • xrpXRP (XRP) $ 2.19
    • bnbBNB (BNB) $ 659.82
    • solanaSolana (SOL) $ 157.44
    • usd-coinUSDC (USDC) $ 0.999768
    • dogecoinDogecoin (DOGE) $ 0.194265
    • tronTRON (TRX) $ 0.266342
    • cardanoCardano (ADA) $ 0.689608
    • staked-etherLido Staked Ether (STETH) $ 2,533.55
    • wrapped-bitcoinWrapped Bitcoin (WBTC) $ 104,640.00
    • hyperliquidHyperliquid (HYPE) $ 32.95
    • suiSui (SUI) $ 3.25
    • wrapped-stethWrapped stETH (WSTETH) $ 3,049.57
    • chainlinkChainlink (LINK) $ 14.11
    • avalanche-2Avalanche (AVAX) $ 20.90
    • bitcoin-cashBitcoin Cash (BCH) $ 417.14
    • stellarStellar (XLM) $ 0.266218
    • leo-tokenLEO Token (LEO) $ 8.62
    • the-open-networkToncoin (TON) $ 3.14
    • shiba-inuShiba Inu (SHIB) $ 0.000013
    • usdsUSDS (USDS) $ 0.999714
    • hedera-hashgraphHedera (HBAR) $ 0.168006
    • wethWETH (WETH) $ 2,537.50
    • litecoinLitecoin (LTC) $ 87.60
    • wrapped-eethWrapped eETH (WEETH) $ 2,711.93
    • polkadotPolkadot (DOT) $ 4.10
    • binance-bridged-usdt-bnb-smart-chainBinance Bridged USDT (BNB Smart Chain) (BSC-USD) $ 1.00
    • moneroMonero (XMR) $ 319.95
    • bitget-tokenBitget Token (BGB) $ 4.74
    • ethena-usdeEthena USDe (USDE) $ 1.00
    • pepePepe (PEPE) $ 0.000012
    • pi-networkPi Network (PI) $ 0.654183
    • coinbase-wrapped-btcCoinbase Wrapped BTC (CBBTC) $ 104,694.00
    • whitebitWhiteBIT Coin (WBT) $ 31.31
    • daiDai (DAI) $ 0.999669
    • aaveAave (AAVE) $ 252.82
    • bittensorBittensor (TAO) $ 429.09
    • uniswapUniswap (UNI) $ 6.14
    • crypto-com-chainCronos (CRO) $ 0.107063
    • ethena-staked-usdeEthena Staked USDe (SUSDE) $ 1.18
    • okbOKB (OKB) $ 50.45
    • aptosAptos (APT) $ 4.78
    • jito-staked-solJito Staked SOL (JITOSOL) $ 189.87
    • nearNEAR Protocol (NEAR) $ 2.42
    • blackrock-usd-institutional-digital-liquidity-fundBlackRock USD Institutional Digital Liquidity Fund (BUIDL) $ 1.00
    • tokenize-xchangeTokenize Xchange (TKX) $ 33.36
    • ondo-financeOndo (ONDO) $ 0.837930
    • internet-computerInternet Computer (ICP) $ 4.89
    • bitcoinBitcoin (BTC) $ 104,701.00
    • ethereumEthereum (ETH) $ 2,538.29
    • tetherTether (USDT) $ 1.00
    • xrpXRP (XRP) $ 2.19
    • bnbBNB (BNB) $ 659.82
    • solanaSolana (SOL) $ 157.44
    • usd-coinUSDC (USDC) $ 0.999768
    • dogecoinDogecoin (DOGE) $ 0.194265
    • tronTRON (TRX) $ 0.266342
    • cardanoCardano (ADA) $ 0.689608
    • staked-etherLido Staked Ether (STETH) $ 2,533.55
    • wrapped-bitcoinWrapped Bitcoin (WBTC) $ 104,640.00
    • hyperliquidHyperliquid (HYPE) $ 32.95
    • suiSui (SUI) $ 3.25
    • wrapped-stethWrapped stETH (WSTETH) $ 3,049.57
    • chainlinkChainlink (LINK) $ 14.11
    • avalanche-2Avalanche (AVAX) $ 20.90
    • bitcoin-cashBitcoin Cash (BCH) $ 417.14
    • stellarStellar (XLM) $ 0.266218
    • leo-tokenLEO Token (LEO) $ 8.62
    • the-open-networkToncoin (TON) $ 3.14
    • shiba-inuShiba Inu (SHIB) $ 0.000013
    • usdsUSDS (USDS) $ 0.999714
    • hedera-hashgraphHedera (HBAR) $ 0.168006
    • wethWETH (WETH) $ 2,537.50
    • litecoinLitecoin (LTC) $ 87.60
    • wrapped-eethWrapped eETH (WEETH) $ 2,711.93
    • polkadotPolkadot (DOT) $ 4.10
    • binance-bridged-usdt-bnb-smart-chainBinance Bridged USDT (BNB Smart Chain) (BSC-USD) $ 1.00
    • moneroMonero (XMR) $ 319.95
    • bitget-tokenBitget Token (BGB) $ 4.74
    • ethena-usdeEthena USDe (USDE) $ 1.00
    • pepePepe (PEPE) $ 0.000012
    • pi-networkPi Network (PI) $ 0.654183
    • coinbase-wrapped-btcCoinbase Wrapped BTC (CBBTC) $ 104,694.00
    • whitebitWhiteBIT Coin (WBT) $ 31.31
    • daiDai (DAI) $ 0.999669
    • aaveAave (AAVE) $ 252.82
    • bittensorBittensor (TAO) $ 429.09
    • uniswapUniswap (UNI) $ 6.14
    • crypto-com-chainCronos (CRO) $ 0.107063
    • ethena-staked-usdeEthena Staked USDe (SUSDE) $ 1.18
    • okbOKB (OKB) $ 50.45
    • aptosAptos (APT) $ 4.78
    • jito-staked-solJito Staked SOL (JITOSOL) $ 189.87
    • nearNEAR Protocol (NEAR) $ 2.42
    • blackrock-usd-institutional-digital-liquidity-fundBlackRock USD Institutional Digital Liquidity Fund (BUIDL) $ 1.00
    • tokenize-xchangeTokenize Xchange (TKX) $ 33.36
    • ondo-financeOndo (ONDO) $ 0.837930
    • internet-computerInternet Computer (ICP) $ 4.89