官术网_书友最值得收藏!

Performance considerations

Ethereum is inherently slow. The average waiting time for a validator building a block is 17 seconds. It usually requires 12 blocks in depth before a transaction (containing the first block) is confirmed. This is 12 × 17 = 204 seconds or 3.4 minutes of waiting time for a transaction to be confirmed. The 12-blocks-in-depth rule is necessary. When a block is newly added to the blockchain by a validator to its ledger copy, there could be a competing path worked on by other validators. The validator may lose the competition for building the longest blockchain. Per blockchain protocol, the validator has to drop its own block being worked on and add the winning block to its ledger copy. The 12-blocks-in-depth rule assures that a transaction does not end up in a block to be dropped later.

Throughput is a measure of how many units of information a system can process in a given time window. For measuring the performance of a transaction platform, the throughput is expressed in terms of throughput per second (TPS). To calculate Ethereum TPS, we take the approximate number of transactions in a block (using 2,000). Then, we divide it by the waiting time in seconds for a transaction to be confirmed, 204 seconds. So, Ethereum TPS is approximately 9.8, that is, almost 10 transactions per second. By applying the same approach, we can estimate the TPS for bitcoin, which is about 0.5 transaction per second. On the other hand, Visa has a TPS of 2,000 with a peak TPS of 40,000. A high performance database such as VoltDB can handle over a million insertions a second. A stock exchange can match thousands of trades a second. It clearly shows a gap that needs to be closed by the blockchain community.

Ethereum is working on multiple solutions to increase TPS. PoS is worked on as a replacement of the computationally inefficient PoW algorithm. PoS is not fully implemented and upgraded on mainnet due to concerns regarding the emergence of a set of supernodes (which receive an outsized role in building the new blocks). Casper is the Ethereum community's attempt to transiting out of PoW and into PoS. Per Casper protocol, validators set aside a portion of their ether as a stake. When a validator identifies a candidate block, ether is bet on that block by the validator. If the block is indeed added to the chain, the validator is rewarded based on the size of its bet. Validators acting maliciously will be penalized by having their stakes removed.

Led by Vitalik, the Ethereum Foundation is also working on the sharding approach, which is aiming at increasing TPS by 80 times. Sharding splits up the state of the network into multiple shards, where each shard has its transaction history and portion of the network's state.

Another idea to increase TPS is Plasma. Plasma is a technique for conducting off-the-chain transactions while relying on the underlying Ethereum blockchain to provide its security. Therefore, Plasma belongs to the group of off-chain technologies. Truebit is another example of this.

主站蜘蛛池模板: 虹口区| 巩留县| 加查县| 大同市| 凉城县| 长阳| 贺兰县| 囊谦县| 阳朔县| 灵宝市| 喀喇沁旗| 天津市| 揭阳市| 高青县| 盘锦市| 吐鲁番市| 舟曲县| 汕尾市| 南康市| 喀喇沁旗| 宁陵县| 敦煌市| 大新县| 吉林市| 湘乡市| 新晃| 浦城县| 开原市| 明溪县| 德阳市| 平罗县| 娱乐| 宁安市| 金溪县| 扶绥县| 拜城县| 民勤县| 吉木乃县| 吴堡县| 双柏县| 甘谷县|