One of the important indicators of the Ethereum blockchain load can manage in complete safety is the way in which the uncle’s rate reacts to the use of the gas of a transaction. In all block chains in the variety of proof of Satoshian work, any published block has the risk of how to co-adop a “expired”, that is to say. Not being part of the main channel, because another minor published a competitor block before the recently published block reaches them, leading to a situation where there is a “race” between two blocks and one of the two will necessarily be left behind.
An important fact is that the more the transactions of a block contains (or the more a gas block uses), the longer it will take to spread via the network. In the Bitcoin network, a fundamental study on this subject was Decker and Wattenhofer (2013)This noted that the average propagation time of a block was approximately 2 seconds plus 0.08 second per kilobyte in the block (that is to say that a block of 1 MB would take approximately 82 seconds). A More recent study Bitcoin Unlimited have shown that this has since been reduced to around 0.008 seconds per kilobyte due to improvements in transactions propagation technologies. We can also see that if a block takes more time to spread, the luck it becomes a dryer is higher; At a block time of 600 seconds, an increase in the propagation time of 1 second should correspond to a 1/600 increase in chances of being left.
In Ethereum, we can do a similar analysis, except that thanks to the “uncle” mechanic from Ethereum, we have very solid data to analyze. The expired blocks of Ethereum can be given into account in the chain as “uncles”, where they receive up to 75% of their original block reward. This mechanic was initially introduced to reduce centralization pressures, by reducing the advantage that well -connected minors have on poorly connected minors, but it also has several secondary advantages, one of which is that expired blocks are followed for all times in a very easily available database – the blockchain itself. We can take a data emptying of blocks 1 to 2283415 (before attacks of SE 2016) as data source for analysis.
Here is a script to generate source data:
Here are the source data:
The columns, in order, represent the number of blocks, the number of uncles in the block, the total reward of the uncle, the total gas consumed by the uncles, the number of transactions in the block, the gas consumed by the block, the length of the block in bytes and the length of the block in bytes excluding zero bytes.
We can then use this script to analyze it:
The results are as follows. In general, the uncle’s rate is systematically between 0.06 and 0.08, and the average gas consumed per block is approximately 100,000 to 300,000. Because we have the gas consumed blocks and uncles, we execute linear regression to estimate the quantity of 1 unit of gas adds to the probability that a given block will be an uncle. The coefficients prove to be as follows:
Block 0 to 200k: 3.81984698029e-08 Block 200k at 400k: 5.35265798406e-08 Block 400K at 600k: 2.33638832951e-08 Block 600K at 800k: 2.1244524216e-08 Block 800K to 1000K: 2.7023102773E-08 Block 1000k at 1200k: 2.864090500222E-08 Block 1200k at 1400k: 3.2448993833E-08 Block 1400K 2000K: 2.411073484445E-08 Block 2000K to 2200K: 1.99205804032 2285K: 1.86635688756e-08
Consequently, each 1 million transactions gases which are included in a block now adds approximately 1.86% to the probability that this block becomes an uncle, but during the border, this was closer to 3-5%. The “base” (i.e. the uncle rate of a 0-Gaz block) is systematically ~ 6.7%. For the moment, we will leave this result as is and will not hold other conclusions; There is another complication that I will discuss later at least with regard to the effect that this conclusion has on the gas limit policy.
Gas price
Another problem that affects uncle’s prices and the propagation of transactions is gas pricing. In discussions on the development of Bitcoin, a common argument is that the limits of the blocks of the blocks are not necessary because minors already have a natural incentive to limit their block size, it is that every kilobyte that they add increases the outdated rate and therefore threatens their block reward. Given the Impedance of 8 seconds by megaoctet found by the Bitcoin Unlimited study, and the fact that each second of impedance corresponds to a 1/600 chance of losing a block reward of 12.5 BTC, this does not suggest a balance of equilibrium transaction of 0.000167 BTC per kilobbyte assuming no block size limit.
In the Bitcoin environment, there are reasons to be skeptical in the long term as to the economy of such a limitless incentive model, because there will ultimately be no block reward, and when the only thing that minors must lose the inclusion of too many transactions are costs of their other transactions, then there is an economic argument that the equilibrium rate will be up to 50%. However, there are changes that can be made to the protocol to limit this coefficient.
In the current environment of Ethereum, block rewards are 5 ETH and will remain until the algorithm is modified. Accepting 1 million gases means 1.86% chance that the block becomes an uncle. Fortunately, Ethereum’s uncle’s mechanism has a happy side effect here: uncle’s average reward is recently about 3.2 ETH, so 1 million gases only mean 1.86% of 1.8 ETH in danger, that is to say. An expected loss of 0.033 ETH and not 0.093 as would be the case without uncle mechanism. Consequently, the current gas prices of ~ 21 Shannon are in fact quite close to the price of “economically rational” gas of 33 Shannon (it is before the back attacks and the optimizations that result from it; now, it is probably even lower).
The easiest way to push the balance further is to improve the uncle’s inclusion mechanisms and try to include uncles in the blocks as quickly as possible (perhaps by spreading each block separately as a “potential uncle header”); Ultimately, if each uncle is included as quickly as possible, the price of balance gas would fall to around 11 Shannon.
Are data undervalued?
A second linear regression analysis can be carried out with the source code here:
The goal here is to see if, After taking into account the coefficients calculated above for gasThere is a correlation with the number of transactions or with the size of a block in remaining bytes. Unfortunately, we do not have a figures of block or transactions for uncles, so we must use a more indirect tip that examines the blocks and uncles in groups of 50. The gas coefficients that this analysis finds are higher than the previous analysis: approximately 0.04 uncle per million gases. One possible explanation is that if a single block has a high propagation time and leads to an uncle, there is a 50% chance that the uncle is the block of propagation time, but there are also 50% chance that uncle is the other block against which it competes. This theory corresponds well to 0.04 per million “social uncle” and to ~ 0.02 per million “private uncle rate”; Therefore, we will consider it as the most likely explanation.
The regression reveals that after having taken this social uncle rate into account, an byte represents an additional uncle rate of ~ 0.000002. The bytes of a transaction take 68 gases, including 61 Gas represents Its contribution to the bandwidth (the other 7 concerns the swelling of the historic database). If we want the bandwidth coefficient and the calculation coefficient in the gas table to both reflect the propagation time, this implies that if we wanted Really Optimizing gas costs, we would need to increase the cost of gas per byte per 50 (that is to say to 138). This would also involve increasing the basic gas cost of a transaction of 5,500 (note: such a rebalancing would not mean that everything becomes more expensive; the gas limit would be increased by ~ 10% for the average case The transaction flow would remain unchanged). On the other hand, the risk of attacks by the most worse service of service is worse for execution than for data, and therefore execution requires greater security factors. Consequently, there is undoubtedly no evidence solid enough to make re-prications here at least for the moment.
A change in possible long -term protocol would be to introduce separate gas pricing mechanisms for EVM execution and transaction data; The argument here is that the two are much easier to separate because the transaction data can be calculated separately from everything else, and therefore the optimal strategy can in a way allow the market to balance them; However, specific mechanisms to do such a thing must still be developed.
Gas limit policy
For an individual minor determining its gas price, the “private uncle rate” of 0.02 per million gases is the relevant statistics. From the point of view of the whole system, the “social uncle rate” of 0.04 per million gases is what matters. If we do not care about the security factors and we agree with an uncle rate of 0.5 uncle per block (which means that a “51% attack” would only need 40% of hash to succeed, in fact not as bad as there have been), at least this analysis suggests that the gas limit could theoretically be increased to ~ 11 million (20 tx / dry given an average of 39K Case in the current case, or 37 TX / SCY WORTH. with the latest optimizations. able to adapt quickly and automatically in response to attacks and risks.
Note that the concern about the risk of centralization and the need for safety factors are not hidden on each other. The reason is that during an active attack on the denial of service, the blockchain must survive and not be resistant to economically long -term centralization; The argument is that if the attacker’s objective was to economically encourage centralization, the attacker could simply give money to the largest swimming pool in order to bring other minors to join him.
In the future, we can expect that virtual machines improvement reduces uncle’s rates more, although networking also ends up. There is a limit to the quantity of scalability possible on a single chain, the primary of strangulation being readings and record entries, therefore after a certain point (probably 10 to 40 million gases) will be the only way to treat more transactions. If we just want to reduce the prices of balance gases, Casper will help considerably, making the “slope” of the uncle rate for gas consumption near zero at least to a certain point.