About block size: GAS upper limit and scalability

Author: Toni Wahrstätter

Recently, there are many discussions on improving the upper limit of the Ethereum block GAS.Some people advocate the size of the block based on Moore’s Law, some people are based on personal intuition, some people are just spreading news at will, and some people worry that other chains such as Solana will surpass Ethereum in terms of wide use of users.

Next, I want to show some charts and data, which may help us make a decision to maximize the GAS limit on the premise that the Ethereum is decentralized.

From the beginning

Unlike Bitcoin, Ethereum does not have a fixed block size limit, but depends on a flexible block size mechanism. This mechanism is measured by a unit “GAS”.In Ethereum, GAS is a unit that measures the calculation required for execution operations (such as transactions or smart contracts).Each operation in Ethereum requires a certain amount of GAS to complete. Each block has a GAS limit, which determines how much operation of a block can include.

At the beginning, in 2015, Ethereum had a limit of 5000 GAS in Ethereum.This upper limit was quickly raised to about 3 million, and then increased to about 4.7 million later in 2016.With the implementation of TANGERINE Whistle hard fork (EIP-150) in 2016, as a response to DOS attacks, by re-pricing various IO-intensive operating codes, the GAS limit was raised to 5.5 million.After these attacks, the miners continued to increase the upper limit of the GAS, from July 2017 to about 6.7 million, from December 2017 to about 8 million, from September 2019 to about 10 million, August 2020 to 12.5 million, and finally in 2021 in 2021From April 3rd to about 15 million.

>

GAS usage that changes over time

Since then, with the activation of Spurious Dragon, Byzantium, Constantinople, Isstanbul, and Berlin, the pricing of certain operating codes has been further detailed.These refined examples include EIP-145, EIP-160, EIP-1052, EIP-108, EIP-1884, EIP-2028, EIP-2200, EIP-2565 and EIP-2929.

The most significant changes in the Ethereum cost market occurred in the introduction of the London hard fork (EIP-1559) in August 2021.The EIP-1559 introduces Base Fee, which will be dynamically adjusted according to the demand for block space over time/block.At the same time, “Target Size” was introduced to set it to 15 million GAS per block.This target is used to guide the dynamic adjustment of Base Fee.If the total number of GAS used in a block exceeds this target, then the Base Fee of the next block will increase.Instead, if the total number of GAS used is lower than Target, the base feel is reduced.This mechanism aims to create a more predictable cost market and improve the user experience through stable transaction expenses.In addition, the EIP-1559 also introduced Base Fee’s destruction mechanism, which permanently removed the part of the Ether from the flow volume.This enhances the sustainability of the protocol and creates the so -called ultra -stable currency fan.

Under the EIP-1559, there is also a maximum (or “hard upper limit”) GAS upper limit, which is twice that of Target, that is, 30 million GAS.This means that a block can pack a transaction with a total usage of up to 30 million GAS.

>

GAS usage after a fork in London

Since then, the upper limit of the Block GAS of Ethereum has remained unchanged. As of 2024, 30 million GAS per block is still.

Are we ready to increase the size of the block?

Recently, some people expressed concerns about the GAS of Ethereum and asked to increase it.In the latest Ethereum Foundation AMA on Reddit, Vitalik said that the idea of ​​increasing the GAS limit by 33% to 40 million.His reasoning is based on the law of Moore. The law pointed out that the number of transistors on the micro -chip doubled by about every two years, which increases the computing power accordingly.This principle shows that network performance, including the ability to deal with and execute transactions, can also increase over time.

Researchers from the Ethereum Foundation Dankrad and ANSGAR also supported the idea of ​​increasing the GAS limit after evaluating the upgrade of Dencun.In addition, Pari of the Ethereum Foundation published a post to explore the potential GAS upper limit.Others like Geth’s Peter and MariS are concerned about increasing the GAS limit, especially when there is no appropriate tool/monitoring in place.These concerns are mainly related to these issues: accelerated status growth, synchronization time and reorganization block rate.

What is the size of the block?

The size of the block can be measured by two ways:

GAS usage

Block size (in byte -by -line)

Although these two measures are associated, they must be considered independently.

For example, a block containing many non -zero CALLDATA bytes may be large in byte size, and the actual GAS usage (16 GAS per non -zero byte) may still be relatively small.

Do not consider the situation after compression first, under the premise of complying with the limitation of 128 KB per transaction of Geth,The largest block size that can be achieved is about 6.88 mbEssenceSuch a block will maximize the number of 128 KB transactions.The actual calculation result is that 55 trading contains about 130,900 bytes of the byte CALLDATA (4 GAS per byte), and a transaction that fills the remaining space.However, after Snappy’s compression, such a block is about 0.32 MB in the end, which can be ignored.

In another case, considering the size of the maximum possibility, it contains 15 transactions carrying non -number byte CALLDATA, and the size can reach about 1.77 MB after compression.

Therefore, as of today, 1.77 MB represents the upper limit of the real block size of the execution layer block.

Translator’s Note:

In the above paragraphs, the author wants to make Block Size the maximum in the case of a fixed GAS limit of 30 m. Try to calculate up to how much the block can be stuffed.

If the upper limit of the GAS is fixed and the block size is bigger, then you can only call CALLDATA (because the byte code such as calculation/store will not consume block storage space).

Therefore, to make the block bigger, it is nothing more than trying to be traded as CALLDATA.Then, there are two methods: “plug 0 callData” and “plug non -0 callData”. You need to calculate to know which one can make the block size larger.The end result is that the block size of “Safei 0 CallData” is larger.

Based on the Geth client to limit the premise of up to 128 KB each transaction, two examples began below.

Case 1:56 transactions with a size of 130,900 b (& lt; 128 kb) (all of which are zero callData, 4 gas/b): GAS = 56 * (130,900 * 4+21000) = 30497600 & gt; (30 m), soOnly 55 above transactions can be plugged in 55 transactions that are less than the above transactions.The corresponding block size is about 55*128 = 7040 kb = 6.875 MB.However, because the callData is all 0, the size of the block after compression is about 0.32 MB.

Case 2:15 transactions with a size of 130,900 b (& lt; 128 kb) (all of which are non -zero callData, 16 gas/b): GAS = 15 *(130900 *16+21000) = 31731000 & gt; 30 m.The corresponding block size is about 14 * 128 = 1792 kb = 1.75 mb ~ 15 * 128 = 1.875 m.However, because CallData is non -zero, it is not easy to compress, so the size of the block after compression is about 1.77 MB.Cure

As far as this largest block size is concerned, we can identify several factors that affect it:

GAS upper limit: The GAS upper limit will affect the maximum block size, which is beyond doubt.The higher the upper limit, the more data that can be plugged in the block.

Operation and data pricing: The cheaper the operation of the operation, the more operations can be performed in the block.AlthoughCalldataloadorCalldatacopyIn this operation, their expenses are 3 GAS, which is relatively cheap; but other operation codes such asCreateIt is more expensive.The more expensive the operation code used in the block, the more expensive it is.CALLDATA(Or other operations) less space.

Client limit: Although the impact of client limits is not so obvious, the 128 KB limit of each transaction such as Geth client can also affect the final block size.Since the fixed cost of each transaction is 21K GAS, the lower the size of each transaction of the client, the more frequently pays the fixed fee, so that “waste” can be used for use for use “waste” that can be used for use for “waste”.CALLDATAGas.So in the end, this limit can lead to a maximum block size of about 0.07 MB.It should be noted that the client restriction only affects the broadcast of the transaction and does not affect the confirmed block.

First, let’s take a look at the upper limit of each block:

>

The impact of the upper limit of the block GAS on the maximum block size

Blockchain like Ethereum, improving the upper limit of the block GAS is the most direct and obvious expansion method.A higher limit means more data space.However, this also means that people who run the whole node to spread and download larger blocks.As shown in the figure above, the block size under the “worst situation (the largest block size obtained by calculations before)” is roughly linearly related to the increase in the upper limit of the block GAS.By creating a block that is as many as possible, as possible, it can achieve such maximum block size.

Next, let’s take a look at another influencing factor -the pricing mechanism of Ethereum.In the current example, it is specifically that the non -number bytes currently set as 16 GASCALLDATAExchange:

>

The impact of the expenses of each non -number CallData on the maximum block size

As shown in the figure above, increase non -zeroCALLDATAThe expenses will reduce the size of the block.In other words, reducing the expenses to such as 8 GAS per byte will double the size of the worst case.This is very intuitive, because the reduction of the price allows double -amount data into the block.

So what about the EIP-4844 (Proto-DANKSHARDING)?

I will not introduce 4844 here in detail, because there are good documents on EIP4844.com, but simply speaking, the EIP-4844 introduces the data type similar to the “Sidecar” structure, called BLOB, each BLOB can be availablePut in about 125 kb data.The BLOB data cost mechanism is similar to the EIP-1559, and there is also a “target” for anchoring the number of BLOB.In Dencun hard fork, Target is set to 3 blocks of each block, and the maximum restrictions are set to 6 BLOB each block.It is worth noting that BLOB has its own cost market and creates the so -called multidimensional cost market.This means that BLOB does not need to compete with standard transactions, but decoupled with the cost under the EIP-1559 mechanism.

So far, everything goes well.Let’s see how this upgrade affects the average block size of Ethereum.

>

The impact of the compressed the average block size of the label chain after the new BLOB

As of today, the average block size of the signal chain block with Snappy is about 125 kb.With 4844, each of our blocks increased by 375 kb, which increased the current average block size by 4 times.If the maximum number of BLOB is reached, we actually increase the current block size by seven times.

In the worst case, the size of the block increases from about 1.77 MB to about 2.5 MB.This estimation does not consider the CL (consensus layer) part of the block.But in any case, in the case of DOS attack, we must be prepared to deal with this largest block size.

Summarize

In the end, if we want to increase the current block GAS limit, we need to conduct thorough research and analysis before implementation.Although mature entities such as Coinbase, Binance, Kraken, or Lido node operators can cope with the upper limit of more than 40 million block GAS, independent pledges may be more difficult.

Therefore, such decisions must be thoughtful to ensure that we will not sacrifice decentralization.

Finally, it is relatively easy to build a large capacity and strong performance like Facebook, but it is important that it is not possible to lose things that most of us are pursuing: decentralization.

  • Related Posts

    The potential of Ethereum is not only passed in the spot ETF

    Jessy, Bitchain Vision Realm Regarding Ethereum’s unanimous sings and decline, a transformation occurred after the Ethereum spot ETF passed. It is reported that the probability of Ethereum’s spot ETF passed…

    Ethereum governance reflection: Why are you dissatisfied with the EIP-3074 incident?

    Source: Buyu said This article explains my thinking on the recent EIP-3047 incident, thanks to Vitalik and YOAV for review of content. If you don’t know this incident,Let’s review it…

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You Missed

    Historic Trend: Bitcoin is Being a Safe-Habiting Asset

    • By jakiro
    • April 19, 2025
    • 12 views
    Historic Trend: Bitcoin is Being a Safe-Habiting Asset

    What makes cryptocurrency rug pull events happen frequently?

    • By jakiro
    • April 18, 2025
    • 14 views
    What makes cryptocurrency rug pull events happen frequently?

    Wintermute Ventures: Why do we invest in Euler?

    • By jakiro
    • April 18, 2025
    • 13 views
    Wintermute Ventures: Why do we invest in Euler?

    Can Trump fire Powell?What economic risks will it bring?

    • By jakiro
    • April 18, 2025
    • 11 views
    Can Trump fire Powell?What economic risks will it bring?

    Glassnode: Are we experiencing a bull-bear transition?

    • By jakiro
    • April 18, 2025
    • 15 views
    Glassnode: Are we experiencing a bull-bear transition?

    The Post Web Accelerator’s first batch of 8 selected projects

    • By jakiro
    • April 17, 2025
    • 27 views
    The Post Web Accelerator’s first batch of 8 selected projects
    Home
    News
    School
    Search