In -depth analysis of Ethereum transaction costs: What factors affect Ethereum transaction speed?

The problems that affect ETH’s TPS can be roughly divided into the following aspects: ETH’s gas mechanism, transaction cost, network, merge process and shard chain.

Original title: “ETH transaction cost composition”

Written by: Xiang

As we all know, Ethereum has its own virtual machine.

What does that mean?

It is the transaction in Bitcoin that looks like this:

“If Xiao Ming’s signature is verified, Xiao Ming will transfer 10 yuan to Xiaohong’s address.”

A transaction in Ethereum might look like this:

“When Xiao Ming’s signature is verified and the blablablabla conditions are met, transfer the 10 yuan in Xiaoming’s account to Xiaohong’s account.”

The blablablabla condition can actually be any logic or any program, in which there can be conditional judgments and loops, all of which are supported by Ethereum. But here comes the problem – if an unkind miner packs an infinite loop and puts it in the block, wouldn’t it make all the Ethereum nodes crash?

In order to prevent this from happening, Ethereum sets the upper limit of gas per block and the amount of gas that needs to be consumed in each calculation step.

We can simply and rudely understand Gas as gasoline. For example, a conditional judgment requires 10 gas, a signature verification requires 100 gas, a state read and write requires 10 gas, etc… Then, each transaction needs to indicate the gas that the transaction needs to use (of course, you also need to pay ). For example, after a transaction, you indicate “running 1000 gas”, so the Ethereum node will execute the transaction, but when the calculation needs to consume more than 1000 gas, regardless of whether the transaction steps are executed or not Will stop when finished.

Therefore, an infinite loop will not appear. For example, if you write an infinite loop, but each loop will burn 10 gas, and the upper limit of the gas block is 10,000, so you can buy a maximum of 10,000 gas for this program, then all nodes will execute 1000 loops, stop until the gas you give is burnt, instead of looping indefinitely.

And this time leads to another difference between Ethereum and Bitcoin:

In Bitcoin, the most precious resource on the chain is space – since a block size is 1 M, it takes an average of 10 minutes to produce a block.

In Ethereum, the most valuable resource on the chain is gas, because the gas of each block has an upper limit, and the average block time is fixed, and the calculation steps that can be done per unit time are actually limited, so ETH’s TPS is also limited.

Therefore, when a large number of people need to do transactions, especially many complex transactions, Ethereum will be congested.

TPS for ETH

The problems that affect the TPS of ETH are roughly divided into the following aspects:

  1. ETH’s gas mechanism
  2. ETH transaction costs
  3. ETH’s network
  4. merge process
  5. Shard chain

1. The gas mechanism of ETH

We know that the miner’s fee consumed in the Bitcoin blockchain is BTC. In order to stimulate the calculation in the Ethereum network, the concept of gas was created in Ethereum. To perform write operations on the Ethereum blockchain, you need to pay for gas. Fees, Ethereum defines the currency as 1 ETH, and 1 ETH = 1e18 Wei. Wei is the smallest of them. In the whole work, gas is paid for sending tokens and calling contracts, and it is calculated in Wei.

Origin of Wei: Wei Dai is a Chinese computer engineer, known for his contributions to cryptography and cryptocurrencies, he developed the Crypto++ cryptographic library, created the B-Money cryptocurrency system, and co-proposed the VMAC message Authentication code algorithm. In 2013, Wei, the smallest unit of Ethereum (Ethereum), was named after him. The No. 1 reference resource for the Bitcoin white paper is also David’s B-money. Satoshi Nakamoto also wanted to contact David many times in the early days of establishing Bitcoin.

At present, the unit of gas consumption of ETH is Gwei, corresponding to 1 Gwei=1e9 Wei

Simply put, gas price is the unit price of gasoline, and gas limit is equivalent to the maximum amount of gasoline required to start a car once.

A more specific expression is:

  • Gas Price is the standard amount of Gwei corresponding to the consumption of 1 gas in Ethereum, and the unit is Gwei.
  • Gas Limit is the upper limit unit of gas consumption. The maximum amount of gas to use in completing each transaction (the gas limit of the transaction).

The Gas Limit of a block is the upper limit of the total gas used by transactions that can “fit” a certain amount of transactions in the block. When a node selects a transaction to be packaged, the node must ensure that after adding this transaction, the total gas used by the transaction in the block does not exceed the block gas limit. For a transaction to be packaged, its Gas Limit plus the sum of the Gas Limits of other transactions must be less than or equal to the block Gas Limit. Of course, if there is a transaction that cannot be packaged into the current block, it still has a chance to be packaged by subsequent blocks. The block Gas Limit size is dynamically adjusted, and the London upgrade introduced a variable size block Gas Limit for Ethereum. The target size of each block is 1500 0000 gas, but the block size will increase or decrease based on network demand, up to the block limit of 3000 0000 gas (2 times the target block size).

Why should the block gas limit be changed?

  1. The block size can be adjusted freely according to the number of network transactions. When the network transaction volume is large, the expansion can be realized automatically.
  2. Prevent malicious for-loop attacks from malicious users from taking down the network.

Because malicious users constantly transfer accounts with very small amount, the entire network is paralyzed. When the transaction fee is very low, it can be ignored. Therefore, Ethereum has introduced the concept of gas, and any transfer and execution of smart contracts will consume A certain fee is gas. If the gas is exhausted, the code will not continue to execute, which prevents the for loop of malicious code from continuously executing, so that the entire network cannot continue to migrate to the next state. Therefore, we know that any computing and storage costs are required to prevent malicious attack codes.

The impact of transaction costs on TPS

When the transaction is large, the gas limit of the block will be automatically expanded to increase the tps of Ethereum itself. The gas limit of the block is up to 30,000,000 (the default configuration of the node).

2. ETH transaction costs

The underlying technology of Ethereum and the design of gas are completed by Gavin Wood. For details, please refer to the yellow paper written by Gavin Wood.

Below is the gas cost for the ETH Yellow Book design.

In -depth analysis of Ethereum transaction costs: What factors affect Ethereum transaction speed?

Screenshot from: https://ethereum.github.io/yellowpaper/paper.pdf

There is a fee to use ETH, and the concept of gas. In general, every transaction has gas associated with it – the cost of sending a transaction consists of two parts: the inherent cost and the execution cost.

The execution cost depends on how much ETH virtual machine (EVM) resources the transaction needs to operate, and the more operations required to execute a transaction, the higher its execution cost.

The inherent cost is determined by the payload of the transaction, which is divided into the following three payloads:

  • If the transaction is to create a smart contract, the payload is the EVM code that created the smart contract
  • If the transaction is to call a function of the smart contract, the payload is the input data for the execution message
  • If the transaction is simply a transfer between two accounts, the payload is empty

Inherent cost gas

In -depth analysis of Ethereum transaction costs: What factors affect Ethereum transaction speed?

Assume that Nzeros represents the total number of bytes in the transaction payload, and the byte is 0; Nnonzeros represents the total number of bytes in the transaction payload, and the byte is not 0. The inherent cost of this transaction can be calculated by the following formula, refer to chapter 6.2 of the Yellow Book:

Inherent cost = Gtxdatazero × Nzeros + Gtxdatanonzero × Nnonzeros + Gtxcreate + Gtransaction + Gasscesslist cost

In Appendix G of the Yellow Book, a fee schedule for the costs associated with creating and executing transactions can be found. Among them, the contents related to inherent costs are as follows:

  • Gtransaction = 21,000 Wei
  • Gtxcreate = 32,000 Wei
  • Gtxdatazero = 4 Wei
  • Gtxdatanonzero = 16 Wei (68 wei before Istanbul upgrade)
  • Gasscesslistaddress = 2400 Wei
  • Gasscessliststorage = 1900 Wei

Because ETH is a native token, there is no smart contract, and there is no need to interact with the contract, so the transfer of ETH is the cheapest, and only requires a configuration of 21,000 gasl imit. When ETH transfer needs to attach some data, you can refer to the above formula.

As shown in the figure below, the tp wallet is operated, and two 0 bytes and two non-0 bytes are added during the transfer. Calculated according to the above formula:

Inherent cost = 21000 + 4 × 2 + 16 × 2 = 21040, which corresponds to the gas limit above.

In -depth analysis of Ethereum transaction costs: What factors affect Ethereum transaction speed?

The inherent cost of a transaction must be less than the gas cap set by the transaction

Once we know the inherent cost, we can understand why a transaction is considered illegal once its inherent cost is above the gas limit. Gas Limit specifies the upper limit of Gas that can be consumed when a transaction is executed; if we know that its inherent cost is higher than the upper limit of Gas before executing the transaction, then we have no reason to execute this transaction. trade. (This is because the error will be reported before the transaction)

The transfer of other tokens will be much higher than the 21000 gas limit of ETH, because other tokens execute transactions through smart contracts, which require more complex calculations and writing than ordinary transfers.

Although the Gas Limit range can be adjusted, if you fill in too little, it may cause the transaction to fail, just like the high oil price, but you take a Coke bottle as a fuel tank, and you have to run a road of 100 kilometers, but the fact is that you have not yet hit the highway The car runs out of gas, so if the gas limit is not enough for miners to consume, the code execution will be interrupted. Despite this, miners will still take away the labor fee gas~

What is the current tps range of ETH?

The gas limit of the block on the afternoon of February 28, 2022 is about 30,000,000, the block time of Ethereum is about 13 seconds, the minimum transaction cost is 21,000, and the upper limit of tps corresponding to ETH is about 110. Because there are still a large number of non-ordinary transfers It is a transaction that interacts with the contract, so the actual tps of ETH is only more than 10 transactions.

execution cost gas

In Ethereum, executing a transaction changes state—several transactions are packaged into a block, and each block is equivalent to a list of transactions; when transactions are executed in order, a new legal state is output.

The transaction is carried out according to the following steps:

  1. Increment the sender account nonce value by 1 Every time a transaction is sent, the sender account nonce is incremented. This operation will be completed at the beginning of the transaction execution. If the transaction execution fails, the account nonce value will be rolled back.
  2. Deducting the transaction prepayment (gas limit × gas price) from the sender’s account We deduct the transaction prepayment from the sender’s account balance. The mechanism is simple – the sender pays for the voluntary cost of executing the transaction (gasLimit × gasPrice) .
  3. Determine the gas value (gas limit – intrinsic cost) that the transaction can use to execute the transaction. After deducting the inherent cost from the total gas (gas limit) of the transaction, what remains is the gas that can be used to execute the transaction.
  4. Executing the operations included in the transaction (transferring, invoking, or creating a smart contract) Executing the transaction also involves a list of EVM operations, and the only transaction that does not require EVM operations at all is a normal transfer. Each EVM operation has a corresponding gas cost; in the process of transaction execution, each time an EVM operation is performed, the corresponding gas cost will be deducted from the available gas. Do not stop until one of the following two conditions occurs:
  5. Available gas is exhausted, execution fails
  6. After the execution is over, the available gas is still left, or just zero
  7. Refunds to senders via the SELFDESTRUCT and SSTORE functions In Ethereum, the SELFDESTRUCT opcode is used to destroy smart contracts that are no longer needed. For each contract destroyed, the executor can receive 24,000 Wei. Likewise, when writing a 0 (effectively delete value) with the SSTORE opcode, the operator is charged 1500 Wei for each 0 written. One interesting thing about refunds is that there are also caps on refunds. This cap ensures that miners can figure out an upper bound on the computational time required to execute a transaction. (More details on gas fees and refunds can be found in the Ethereum Design Rationality article). Another important point is that the refund will not be made until the operations included in the exchange have been executed. So any gas that should be returned is not consumed by the transaction execution process, thus avoiding the possibility of _never running out of gas_ transactions_.
  8. Refund any unused gas to the sender of the transaction If the advance used for the transaction exceeds the gas used by the exchange, the sender has the right to reclaim the remaining gas after executing the transaction.
  9. All gas used to perform the transaction by transferring mining proceeds to the beneficiary account (usually belonging to the miner that mined the block containing the transaction) is considered transaction fee and is earned by the miner. This mechanism incentivizes miners to continue to produce blocks and cooperate in a sustainable manner in terms of network security.

Refer to the corresponding content of the yellow paper in the figure below for the operation cost involved in executing the transaction, such as MUL, DIV, ADD, SUB, etc.

In -depth analysis of Ethereum transaction costs: What factors affect Ethereum transaction speed?

EIP schemes related to gas and tps:

  1. EIP-5: Adjust Gas Amount of RETURN and CALL
  2. EIP-150: Gas cost change for a large number of IO operations
  3. EIP-158: Status Clear
  4. EIP-1108: Reduce alt_bn128 precompiled gas cost
  5. EIP-1283: Gas adjustment for SSTORE opcode
  6. EIP-2028: Reducing transaction data usage costs
  7. EIP-2200: Structured Definition of Net Gas Metering
  8. EIP-2565: Specify ModExpGas cost
  9. EIP-1559: Fee market changes for ETH 1.0 chains
  10. EIP-2929: Increased gas cost for state access opcodes
  11. EIP-1077: Gas relay for contract calls
  12. EIP-1087: Gas Metering for SSTORE Operation
  13. EIP-1285: Add GcallstipendGas to CALL opcode
  14. EIP-1380: Reduced gas cost of internal calls
  15. EIP-1613: Gas Station Network
  16. EIP-1930: CALL with strict Gas semantics
  17. EIP-2045: Granular Gas Cost of EVM Opcodes
  18. EIP-2046: Reduced gas cost of static calls to precompile
  19. EIP-2542: New opcodes TXGASLIMIT and CALLGASLIMIT
  20. EIP-3322: Account Gas Storage Opcode
  21. EIP-2780: Reduce Internal Transaction Gas
  22. EIP-4488: Reduce transaction calldata gas and total calldata limits
  23. EIP-4844: Shard Blob transactions

EIP-1559

Proposed by v God in 2019, it will be launched on August 5, 2021.

A transaction pricing mechanism that includes a fixed per-block transaction fee that is destroyed and dynamically expands/shrinks block size in response to momentary congestion.

Transaction senders specify their fees by providing two values: “gas premium” added to “base fee” to calculate gas price. The “gas premium” can be set to a low value (eg 1 gwei) to compensate miners for their uncle rate risk, or to a high value to compete in a sudden high transaction volume. “gas premium” will be given to miners. The “fee cap” represents the maximum amount the transaction sender is willing to pay (base fee + gas premium).

motivation

“The current Ethereum’s ‘top auction’ fee model is inefficient and costly to users. This EIP-1559 proposes an alternative to this mechanism by adjusting a base network fee based on network demand, thereby Create better fee-price efficiency and reduce the complexity of client software needed to avoid paying unnecessarily high fees.”

In the current Ethereum system, newly submitted transactions must wait to be packaged by a miner into the next block, but these transactions can be incentivized to package their own by increasing the Gas Price parameter above the network average trade. Miners will always want to include the transaction with the largest transaction fee in a new block, so the transaction expected to be included in the next block is always the transaction with the highest gas price.

The problem with this top-price auction model is that during times of high transaction demand, things can get out of hand quickly. When a block is close to being full, the cost (transaction fee) to get a transaction packed into the next block can skyrocket as users try to get their own transactions packed at a higher price than others.

Although miners currently have a certain ability (note: such as increasing the block gas limit) to increase the number of transactions packaged in a single block, this limit cannot be changed anytime soon, and in fact miners are more willing to use more Small full blocks instead of pushing the block gas limit higher and higher (for miners, larger blocks come with higher risk due to the uncle rate). Especially if your wallet uses a gas pricing algorithm so that your transactions are packed within a certain time frame, you may end up paying a pretty high transaction fee to get your transactions packed into the next (almost) full blocks.

EIP-1559 introduced the concept of a “base fee” for gas fees. This fee is set to adjust dynamically. When the network exceeds the target gas usage per block, the “base fee” will increase slightly , while the “base fee” will drop slightly when the amount falls below the target. This “base fee” will not go to the miner’s pocket, but will be destroyed.

In order to incentivize miners to package transactions, users will also set a “Tip” (tip) parameter and set a maximum amount they are willing to pay in order to have their transaction packaged into the block, and miners will receive this “Tip” ( tip).

Since the “base fee” does not fluctuate wildly according to the instantaneous changes in network demand, users are to a certain extent away from the inefficiency problems brought by the “top auction” model (the “Tip” fee is still the top price model), because The “base fee” is destroyed, not given to miners, so that miners have no incentive to try and manipulate transaction fees. Importantly, this mechanism also attempts to address a major problem wallet developers have had with automatically estimating network transaction fees, making transaction fee estimates more predictable.

simple summary

Improve user experience, avoid excessive growth of gas costs, better estimate the market, facilitate the evaluation of L2 operating costs, reduce miners’ profits, and burn more ETH, which is good for ETH and layer2, but has little impact on tps.

EIP-4488

Proposed by v God in November 2021, it is still in the draft stage (to be discussed and confirmed)

Reduced transaction calling calldata gas cost and increased the limit of total transactions calling calldata(Gtxdatazero) in a block.

motivation

Rollups are the only trustless scaling solution for Ethereum in the short and medium term, and possibly in the long term. L1 transaction fees have been very high for a long time, and there is an urgent need to take any necessary steps to help facilitate the migration of the entire ecosystem to rollup. Rollups significantly reduce fees for many Ethereum users: Optimism and Arbitrum often offer ~3-8x lower fees than the Ethereum L1 layer itself, while having better data compression and avoiding the fees of ZK rollups that include signatures ~ 40-100 times lower fees.

However, even then, the fee is too expensive for many users. A long-term solution to the chronic shortage of rollups themselves has been data sharding, which will add ~1-2 MB/sec of dedicated data space for rollups in the chain. However, data sharding still takes a considerable amount of time to implement and deploy. Therefore, a short-term solution is needed to further reduce rollup costs and incentivize the entire ecosystem to transition to a rollup-centric Ethereum.

This EIP provides a short-term solution for quick implementation, while also reducing security risks.

The gas limit of the current block is about 30000000, and the maximum block size of the block is 30000000 / 16 = 1875000 bytes. Simply reducing calldata from 16 to 3 would increase the maximum block size to 100,000,000 bytes, which would put Ethereum’s P2P network under unprecedented pressure, so this proposal limits the size of the total amount of calldata. The formula is as follows:

In -depth analysis of Ethereum transaction costs: What factors affect Ethereum transaction speed?

simple summary

A short-term solution may also be a long-term solution. It is beneficial to the rollup of layer2, which can greatly reduce the transaction cost of rollup. Non-0-byte data can be reduced to less than 1/5 of the current cost, and 0-byte data can also be slightly Reduced (ab, op, zk, etc. are expected to be reduced to 1/4-1/5 of the current handling fee), but it will have little effect on ETH L1 tps, or even decrease, and the block size will increase, so this proposal and EIP -4444 May execute concurrently.

The impact of transaction costs on TPS

The EIP of ETH gas in the draft stage is mainly EIP-4488, which has a great impact on TPS, which is beneficial to the rollup of layer2, which can greatly reduce the transaction cost of rollup, and the data of non-0 bytes can be reduced to 1 ⁄ of the current cost Less than 5 , 0 bytes can also be slightly reduced (ab, op, zk, etc. are expected to be reduced to the current 1 ⁄ 4 – 1 ⁄ 5 handling fee), but it has little impact on ETH L1 tps and may decrease slightly.

3. ETH network

The data between ETH nodes is transmitted through the P2P network. The P2P network of ETH will affect the synchronization speed of block data between nodes, so it will also limit the growth of TPS.

Devp2p is a set of network protocols that form the Ethereum P2P network. Serve the needs of any web application related to Ethereum.

The system provides discovery of, and secure communication with, other nodes throughout the Internet.

The libp2p project for IPFS aims to be a collection of modules for assembling P2P networks from modular components.

It is difficult to compare the two projects because they have different scopes and were designed with different goals in mind. devp2p is an ensemble system definition that hopes to serve the needs of Ethereum well (although it might also be a good fit for other applications), while libp2p is a collection of programming library components that don’t specifically serve a single application.

That said, the two projects are very similar in spirit, and devp2p is adopting parts of libp2p as libp2p matures.

EIPs associated with the ETH network:

  1. EIP-8: devp2p forward compatibility requirements
  2. EIP-627: Whisper Specification
  3. EIP-706: DEVp2p Fast Compression
  4. EIP-778: Ethereum Node Record (ENR)
  5. EIP-868: v4 ENR Extensions
  6. EIP-2124: Reduce transaction data usage costs
  7. EIP-2364: ETH/64: forkid extension protocol handshake
  8. EIP-2464: ETH/65: Transaction Announcement and Retrieval
  9. EIP-2481: ETH/66: Request Identifier
  10. EIP-2976: Gossip based typed transactions
  11. EIP-4444: Limit historical data for execution layer clients

EIP-4444

November 2021 Presented by George Kadianakis, lightclient, Alex Stokes Currently in draft stage

motivation

The client stopped providing historical receipts over a year old on the p2p layer. Customers can prune this historical data locally.

History blocks and receipts currently take up over 400GB of disk space (and growing!). Therefore, to verify the chain, the user must typically have a 1TB disk.

Validation of new blocks does not require historical data, so once a client has synced the end of the chain, historical data will only be retrieved when explicitly requested via JSON-RPC or when a peer attempts to sync the chain. By pruning history, this proposal reduces the hard disk requirements of nodes. Pruning history data also allows clients to remove code that handles history blocks. This means that the executing client does not need to maintain a code path that handles compound changes for each upgrade.

Finally, this change will lead to reduced bandwidth usage on the network as clients adopt a more lightweight synchronization strategy based on PoS.

simple summary

Crop historical data from a year ago to reduce network bandwidth usage.

The impact of the ETH network on TPS

The EIP, which is in the draft stage related to ETH’s network, has little impact on TPS.

4. Merge process

Merger means that the beacon chain of Ethereum is used as the consensus layer, and the POW chain of the main network currently used by most ETH users is used as the execution layer to merge. After the merger, the execution layer will abandon the existing POW consensus mechanism.

Beacon Chain

The Beacon Chain will manage or coordinate the expanded sharding and staking network. But it won’t be like the Ethereum mainnet today. Cannot handle accounts or smart contracts.

The role of the beacon chain will change over time, but it is a fundamental component of the secure, sustainable, and scalable Ethereum that is being worked on.

Beacon Chain will introduce POS to Ethereum. Here’s a new way to help you keep your Ethereum safe. Think of it as a public good that will make Ethereum healthier and earn you more ETH in the process.

Staking and becoming a validator is easier than mining (the way the network is currently). This will help make Ethereum more secure in the long run. The more people participating in the network, the more decentralized and secure it becomes.

Initially, the beacon chain will exist separately from the Ethereum mainnet we use today. But eventually, they will be connected. The plan is to “merge” the mainnet into a POS system controlled and coordinated by the beacon chain.

The Beacon Chain launch time is December 2020.

Deprecate ETH2

The Ethereum protocol is undergoing major changes. The client team is upgrading the protocol and expanding Ethereum to meet the needs of global users, while improving the security and decentralization of Ethereum. Aside from protocol development, an extremely important shift in Ethereum is the deprecation of the terms “Eth1” and “Eth2”. From the end of 2021, core developers will stop using “Eth1” and “Eth2”, and replace them with “execution layer” and “consensus layer” respectively. Today, ethereum.org is making the same change as we highlighted in our Q1 roadmap.

  • Eth1 → Execution Layer
  • Eth2 → Consensus Layer
  • Execution layer + consensus layer = Ethereum

Let’s find out why!

Overview

  • Phasing out of terms Eth1 vs Eth2 (Ethereum 2.0)
  • Execution layer ( Eth1 ) and consensus layer ( Eth2 ) as new terms
  • The roadmap for scaling Ethereum in a decentralized way remains the same
  • The user does not need to take any action

Where did Ethereum 2.0 come from?

As part of its roadmap, Ethereum has been planning to expand the network in a decentralized manner and transition to PoS (Proof of Stake). Earlier, researchers studied these plans separately, but around 2018, the above were all included in the “Ethereum 2.0” roadmap.

As part of the roadmap, the existing PoW chain (Eth1) will eventually be deprecated via a difficulty bomb. Users and applications will be migrated to the new Ethereum PoS chain (ie Eth2).

The Serenity Roadmap, published by ConsenSys in early 2019, explains the specifics.

What has changed?

As work on the beacon chain begins, it’s clear that the phased-in Ethereum 2.0 will take years to fully deliver. This has led to a resurgence of research initiatives on PoW chains, such as Stateless Ethereum, a paradigm that limits the rate of state inflation by removing states in the network that are no longer accessed.

The growing focus on the long-term sustainability of PoW chains, coupled with our realization that the Beacon Chain will be ready earlier than the rest of the Ethereum 2.0 roadmap, led to the “Early Merge” proposal. In this proposal, the existing EVM chain will serve as “shard 0” of Ethereum 2.0. Not only does this speed up the transition to PoS, but it also makes the transition of applications smoother, as there is no need for any migration of application endpoints to transition to PoS.

Shortly after this proposal was published, Danny Ryan explored how we could accomplish this by leveraging existing Eth1 clients in his article “The Eth1+Eth2 Client Relationship”. This will greatly reduce the development effort to deliver a merged system, and leverage clients already battle-hardened on mainnet. Around the same time, research into rollups as a viable and secure way to scale Ethereum proved promising. Rather than spend years waiting for a complex, uncertain scaling solution, we might as well focus on rollups-based scaling instead of sharding.

Want to read more? Click to view Danny Ryan’s speech “Eth1 + Eth2 = Ethereum” at ETHGlobal

Why can’t we use Eth2?

thinking mode

One of the main problems with the brand name Eth2 is that Eth2 creates an incomplete mental model for new Ethereum users. They will intuitively think: Eth1 is in the front, Eth2 is behind; or once Eth2 is created, Eth1 will cease to exist. Both concepts are wrong. By not experimenting with the term Eth2, future users will no longer develop this misunderstood mindset.

tolerance

With the upgrade of the Ethereum roadmap, Ethereum 2.0 has become inaccurate to express the meaning of the Ethereum roadmap. Rigorous and accurate vocabulary selection can allow the public to better understand the content of Ethereum.

prevent fraud

Unfortunately, some malicious actors have attempted to use the misnomer Eth2 to trick users into exchanging ETH for the token “ETH2” or have to migrate their ETH in some way before the Eth2 upgrade.

We hope that this updated terminology will clearly eliminate this fraudulent element and make the ecology safer.

Clarification of pledge

Some staking operators also label their ETH on the beacon chain as “ETH2”. This can be misleading, as users of these services do not actually receive “ETH2” tokens. There has never been a so-called “ETH2” token; that simply represents the user’s share of a particular operator’s deposit.

merge

Initially, the beacon chain operates separately from the mainnet. The Ethereum mainnet continues to be secured by POW, even though the beacon chain runs in parallel using POS consensus. A merger is when the two systems finally come together.

Imagine that the Ethereum mainnet is a train full of tourists and running at high speed. The same is true for the beacon chain. While they are running at high speed, they also need to connect with each other and merge into a new train with stronger performance. It is non-perceptual, and it can be imagined that the difficulty is very large.

The merger will mark the end of Ethereum’s proof-of-work and usher in a more sustainable, greener era of Ethereum. At this point, Ethereum will be closer to achieving the comprehensiveness, security, and sustainability outlined in its Ethereum vision, and users will be unaware throughout.

Once a merger occurs, stakers will be assigned to validate the Ethereum mainnet. POW mining will no longer be required, so miners may invest their earnings into the new proof-of-stake system.

Estimated time of merger: The merger time provided by the ETH official website is in the third quarter of 2022.

Consolidation Impact on TPS

After the merger, the mainnet will continue to run as the execution layer. The current average block generation time of POW is about 13 seconds. After switching to POS, it is about 12 seconds per block, and the block generation time will be much more stable. Traditional POW miners may also switch to POS. Mining will increase the demand for ETH and benefit ETH, but after switching to POS, the TPS of the Ethereum chain will only increase slightly, and there will be no major changes.

5. Fragmentation

Sharding is the process of splitting a database horizontally to spread the load, a common concept in computer science. In the Ethereum environment, sharding will reduce network congestion and increase transactions per second by creating new chains called “shards”.

The sharding process of Ethereum will be a multi-stage upgrade process, and finally the sharding chain will distribute the network load to 64 new chains.

Hardware requirements will be kept low to standardize running nodes locally. Sharding will provide Ethereum with more ability to store and access data, and is currently thought to have no impact on executing code.

Sharding Features

Staying decentralized, sharding is a great way to scale, with shard chains validators only need to store/run data for the shard they are validating instead of storing/running data for the entire network. This speeds things up and greatly reduces hardware requirements.

Sharding will eventually make it possible to run Ethereum on a personal laptop or phone. More people will be able to participate or run clients in sharded Ethereum. This will improve security, and the more dispersed the network, the smaller the attack surface.

With lower hardware requirements, sharding will make it easier for you to run clients on your own without relying on any intermediary services at all.

Detailed discussion of shard chains

Shardchain Version 1: Data Availability

When the first chain of shards runs, they only provide additional data to the network. They will not handle transactions or smart contracts. But when combined with rollup, they handle a lot of transactions.

Rollup is the “layer2” technology that exists today. They allow dapps to bundle or “rollup” transactions into a single transaction off-chain, generate cryptographic proofs, and then submit them to the chain. This reduces the data required for the transaction. Rollup combined with all the extra data availability provided by sharding yields 100,000 transactions per second.

Shardchain Version 2: Code Execution

Considering the processing power provided by version 1 sharding, is it necessary to apply sharding to the processing execution as well. There is debate in the community. Vitalik Buterin suggested 3 potential options worth discussing.

(1) No state execution is required

This means that we will not make shards capable of processing smart contracts only as data warehouses.

(2) Part of the execution fragmentation

Maybe there is a compromise, we don’t need all shards (64 planned for now) to be smarter. We could just add this feature to a few and leave the rest untouched. This can speed up delivery.

(3) Wait (ZK) snarks

When the ZK snarks technology matures and stabilizes, re-examine this issue. Maybe ZK snarks technology needs more shards.

Sharding estimated time

The sharding time provided by the ETH official website is sometime in 2023, depending on the speed of the post-merger work.

The impact of sharding on TPS

Although the sharding method has not been determined, it is certain that sharding will greatly improve TPS.

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/in-depth-analysis-of-ethereum-transaction-costs-what-factors-affect-ethereum-transaction-speed/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2022-07-27 11:05
Next 2022-07-27 11:08

Related articles