Close Menu
    Trending
    • Ethereum Set To Hit $10,000, Elliott Wave Analysis Predicts
    • Finland Joins The Bitcoin Conference Map With BTCHel
    • Binance Launches BNB Cryptoback Program with $150K Prize Pool
    • Proponent Suggests the XRP Price Can 6x From Here, But is it Realistic?
    • House Passes Major Bills During ‘Crypto Week,’ But Significant Changes May Take Time
    • US House Passes Bitcoin, Crypto Market Structure Bill The CLARITY Act
    • Block Inc. Joins S&P 500, Marking Bitcoin Fintech Milestone
    • Bitcoin Price Record Highlights US Dollar Weakness
    Simon Crypto
    • Home
    • Crypto Market Trends
    • Bitcoin News
    • Crypto Mining
    • Cryptocurrency
    • Blockchain
    • More
      • Altcoins
      • Ethereum
    Simon Crypto
    Home»Ethereum»Verkle tree structure | Ethereum Foundation Blog
    Ethereum

    Verkle tree structure | Ethereum Foundation Blog

    Team_SimonCryptoBy Team_SimonCryptoDecember 29, 2024No Comments7 Mins Read
    Share
    Facebook Twitter LinkedIn Pinterest Email


    A Verkle tree is a dedication scheme that works much like a Merkle tree, however has a lot smaller witnesses. It really works by changing the hashes in a Merkle tree with a vector dedication, which makes wider branching components extra environment friendly.

    Due to Kevaundray Wedderburn for suggestions on the submit.

    Overview

    For particulars on how verkle bushes work, see:


    The purpose of this submit is to clarify the concrete structure of the draft verkle tree EIP. It’s geared toward shopper builders who need to implement verkle bushes and are on the lookout for an introduction earlier than delving deeper into the EIP.

    Verkle bushes introduce plenty of adjustments to the tree construction. Probably the most vital adjustments are:

    • a change from 20 byte keys to 32 byte keys (to not be confused with 32 byte addresses, which is a separate change);
    • the merge of the account and storage tries; and at last
    • The introduction of the verkle trie itself, which makes use of vector commitments as a substitute of hashes.

    Because the vector dedication scheme for the verkle tree, we use Pedersen commitments. Pedersen commitments are based mostly on elliptic curves. For an introduction to Pedersen commitments and the best way to use them as polynomial or vector commitments utilizing Interior Product Argumentss, see here.

    The curve we’re utilizing is Bandersnatch. This curve was chosen as a result of it’s performant, and in addition as a result of it can enable environment friendly SNARKs in BLS12_381 to purpose concerning the verkle tree sooner or later. This may be helpful for rollups in addition to permitting an improve the place all witnesses will be compressed into one SNARK as soon as that turns into sensible, without having an extra dedication replace.

    The curve order/scalar subject dimension of bandersnatch is p = 13108968793781547619861935127046491459309155893440570251786403306729687672801, which is a 253 bit prime. On account of this, we are able to solely safely decide to bit strings of at most 252 bits, in any other case the sphere overflows. We selected a branching issue (width) of 256 for the verkle tree, which implies every dedication can decide to as much as 256 values of 252 bits every (or to be exact, integers as much as p – 1). We write this as Commit(v₀, v₁, …, v₂₅₅) to decide to the record v of size 256.

    Structure of the verkle tree

    One of many design targets with the verkle tree EIP is to make accesses to neighbouring positions (e.g. storage with virtually the identical deal with or neighbouring code chunks) low-cost to entry. In an effort to do that, a key consists of a stem of 31 bytes and a suffix of 1 byte for a complete of 32 bytes. The important thing scheme is designed in order that “shut” storage places are mapped to the identical stem and a special suffix. For particulars please take a look at the EIP draft.

    The verkle tree itself is then composed of two varieties of nodes:

    • Extension nodes, that symbolize 256 values with the identical stem however completely different suffixes
    • Interior nodes, which have as much as 256 kids, which will be both different inside nodes or extension nodes.

    The dedication to an extension node is a dedication to a 4 component vector; the remaining positions can be 0. It’s:

    C₁ and C₂ are two additional commitments that decide to all of the values with stem equal to stem. The explanation we want two commitments is that values have 32 bytes, however we are able to solely retailer 252 bits per subject component. A single dedication would thus not be sufficient to retailer 256 values. So as a substitute C₁ shops the values for suffix 0 to 127, and C₂ shops 128 to 255, the place the values are break up in two with a view to match into the sphere dimension (we’ll come to that later.)

    The extension along with the commitments C₁ and C₂ are known as “extension-and-suffix tree” (EaS for brief).


    Determine 1 Illustration of a stroll by a verkle tree for the important thing 0xfe0002abcd..ff04: the trail goes by 3 inside nodes with 256 kids every (254, 0, 2), one extension node representing abcd..ff and the 2 suffix tree commitments, together with the worth for 04, v₄. Observe that stem is definitely the primary 31 bytes of the important thing, together with the trail by the interior nodes.

    Dedication to the values leaf nodes

    Every extension and suffix tree node accommodates 256 values. As a result of a worth is 256 bits extensive, and we are able to solely retailer 252 bits safely in a single subject component, 4 bits could be misplaced if we merely tried so retailer one worth in a single subject component.

    To bypass this drawback, we selected to partition the group of 256 values into two teams of 128 values every. Every 32-byte worth in a bunch is break up into two 16-byte values. So a worth vᵢ∈ 𝔹₃₂ is changed into v⁽ˡᵒʷᵉʳ⁾ᵢ ∈ 𝔹₁₆ and v⁽ᵘᵖᵖᵉʳ⁾ᵢ∈ 𝔹₁₆ such that v⁽ˡᵒʷᵉʳ⁾ᵢ ++ v⁽ᵘᵖᵖᵉʳ⁾ᵢ= vᵢ.

    A “leaf marker” is added to the v⁽ˡᵒʷᵉʳ⁾ᵢ, to distinguish between a leaf that has by no means been accessed and a leaf that has been overwritten with 0s. No worth ever will get deleted from a verkle tree. That is wanted for upcoming state expiry schemes. That marker is ready on the 129th bit, i.e. v⁽ˡᵒʷᵉʳ ᵐᵒᵈⁱᶠⁱᵉᵈ⁾ᵢ = v⁽ˡᵒʷᵉʳ⁾ᵢ + 2¹²⁸ if vᵢ has been accessed earlier than, and v⁽ˡᵒʷᵉʳ ᵐᵒᵈⁱᶠⁱᵉᵈ⁾ᵢ = 0 if vᵢ has by no means been accessed.

    The 2 commitments C₁ and C₂ are then outlined as

    Dedication of extension nodes

    The dedication to an extension node consists of an “extension marker”, which is simply the number one, the 2 subtree commitments C₁ and C₂, and the stem of the important thing resulting in this extension node.

    In contrast to extension nodes within the Merkle-Patricia tree, which solely comprise the part of the important thing that bridges the dad or mum inside node to the kid inside node, the stem covers the entire key as much as that time. It is because verkle bushes are designed with stateless proofs in thoughts: if a brand new secret’s inserted that “splits” the extension in two, the older sibling needn’t be up to date, which permits for a smaller proof.

    Dedication of Inner nodes

    Inner nodes have the easier calculation methodology for his or her commitments: the node is seen as a vector of 256 values, which can be the (subject illustration of the) root dedication of every of their 256 subtrees. The dedication for an empty subtree is 0. If the subtree is just not empty, then the dedication for the interior node is

    the place the Cᵢ are the kids of the interior node, and 0 if a toddler is empty.

    Insertion into the tree

    Determine 2 is an illustration of the method of inserting a brand new worth into the tree, which will get attention-grabbing when the stems collide on a number of preliminary bytes.

    Determine 2 Worth v₁₉₂ is inserted at location 0000010000…0000 in a verkle tree containing solely worth v₁₂₇ at location 0000000000…0000. As a result of the stems differ on the third byte, two inside nodes are added till the differing byte. Then one other “extension-and-suffix” tree is inserted, with a full 31-byte stem. The preliminary node is untouched, and C²₀ has the identical worth as C⁰₀ earlier than the insertion.

    Shallower bushes, smaller proofs

    The verkle tree construction makes for shallower bushes, which reduces the quantity of saved knowledge. Its actual energy, nonetheless, comes from the flexibility to supply smaller proofs, i.e. witnesses. This can be defined within the subsequent article.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    Traders are bullish on ETH as price begins to catch up with the tech

    July 19, 2025

    Volume 50% Higher Than BTC’s

    July 19, 2025

    Massive Ethereum Accumulation: Bit Digital Crosses 120,000 ETH With Latest Buy

    July 19, 2025

    SharpLink Gaming To Buy $5 Billion In Ethereum: Supply Shock Incoming?

    July 19, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Categories
    • Altcoins
    • Bitcoin News
    • Blockchain
    • Crypto Market Trends
    • Crypto Mining
    • Cryptocurrency
    • Ethereum
    Archives
    • July 2025
    • June 2025
    • May 2025
    • April 2025
    • March 2025
    • February 2025
    • January 2025
    • December 2024
    • November 2024
    Archives
    • July 2025
    • June 2025
    • May 2025
    • April 2025
    • March 2025
    • February 2025
    • January 2025
    • December 2024
    • November 2024
    Top Posts

    How Bitcoin Empowers Women

    January 30, 2025

    ad

    About us

    Welcome to SimonCrypto.in, your ultimate destination for everything crypto! Whether you’re a seasoned investor, a blockchain enthusiast, or just beginning your journey into the fascinating world of cryptocurrencies, we’re here to guide you every step of the way.

    At SimonCrypto.in, we are passionate about demystifying the complex world of digital currencies and blockchain technology. Our mission is to provide insightful, accurate, and up-to-date information to empower our readers to make informed decisions in the ever-evolving crypto space.

    Top Insights

    Phishing losses drop 48% to $5.32 million in February as crypto users grow more vigilant

    March 5, 2025

    How might Iran’s potential blockade of the Strait of Hormuz affect crypto?

    June 22, 2025

    Background on the mechanics of the ether pre-sale

    March 8, 2025
    Categories
    • Altcoins
    • Bitcoin News
    • Blockchain
    • Crypto Market Trends
    • Crypto Mining
    • Cryptocurrency
    • Ethereum
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 SimonCrypto All Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.