Die | pow upon consensus algorithm is presented

Read with the following code: github.com/blockchainG…

Write text is not easy, give a small concern, what problem can point out, facilitate everybody exchange study.

An overview of the

Proof Of Work (POW), simply understood as Proof that you have done a certain amount Of Work. Monitoring the entire process of work is often extremely inefficient, and certification of the results of work to demonstrate that the work has been done is a very efficient way. For example, the graduation certificate, driving license and so on in real life are also obtained by means of inspection results (through relevant examinations).

Proof-of-work systems (or protocols, or functions) are an economic response to denial-of-service attacks and other service abuses. It requires the initiator to perform a certain amount of computation, which means that it takes the computer a certain amount of time. This concept was first proposed by Cynthia Dwork and Moni Naor in an academic paper in 1993. The term “proof of work” (POW) was actually introduced in a 1999 paper by Markus Jakobsson and Ari Juels.

The mainstream POW consensus uses a hash algorithm

In fact, the core of different POW consensus is different Hash algorithms. Many Hash functions have been designed and widely used. However, Hash functions generally have a short security life. And every algorithm that is recognized as safe and reliable has an extremely rigorous auditing process. In the coin circle, we often say that so-and-so coin invented some algorithm, in fact, it is mainly using the security algorithm that has been authenticated, or used alone, or used in combination.

SHA256

Sha-2, short for Secure Hash Algorithm 2 (In English: Secure Hash Algorithm 2), is a cryptographic Hash function Algorithm standard developed by the NATIONAL Security Agency of the United States. It is one of the SHA algorithms and a successor to SHA-1. Sha-2 can be divided into six different algorithm standards. Sha-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256 are included.

For a detailed explanation of the algorithm, please see this article: A Panoramic Analysis of the Blockchain Technology Stack

SCRYPT

Scrypt is a memory-dependent POW algorithm that litecoin uses. The first digital currency to use the Scrypt algorithm was Tenebrix, which has since been used by Litecoin. The founder of Litecoin introduced the consensus mechanism, mining algorithm, total amount of issuance, mining difficulty and other relevant important information in the creation post of Litecoin. Li explains that Litecoin’s mining algorithm, Scrypt, the same algorithm used in digital currency Tenebrix, conforms to the CONSENSUS mechanism of PoW. The Scrypt algorithm also needs to calculate the hash value, but the calculation process of Scrypt requires more memory resources.

Other digital currencies that use Scrypt algorithms include DigitalCoin, DogeCoin, LuckyCoin, WorldCoin, etc.

Algorithm: www.imooc.com/article/503…

Serial algorithm

Rearrangement and combination is the most common method of innovation that human beings have always used. Soon, some people were not satisfied with using a single Hash function. In July 2013, Quark was released, and it was the first time to use the multi-round Hash algorithm. It seems to be very elegant, but in fact, it is very simple, which is to calculate the Hash function on the input data for 9 times, and the result of the previous round is the input of the next round. These nine rounds of Hash use six encryption algorithms, namely BLAKE, BMW, GROESTL, JH, KECCAK and SKEIN, which are all recognized secure Hash algorithms and have already been implemented in ready-made code.

The appearance of this multi-round Hash creates an intuitive sense of security and power, with numerous followers. Today, the price of the darskycoin is still strong, and the first to use 11 cryptoalgorithms (BLAKE, BMW, GROESTL, JH, KECCAK, SKEIN, LUFFA, CUBEHASH, SHAVITE, SIMD, ECHO), called X11, followed by X13, The X15 series was developed.

S series algorithm is actually a series of ideas, as long as one of the algorithms is cracked, the whole algorithm is cracked, just like a chain, linked to each other, as long as one of the link is broken, the whole chain will be in two.

Parallel algorithm

Heavycoin (HVC) is the first parallel algorithm to be tried, and here’s how it works:

  1. Run the input data firstHEFTY1(aHashAlgorithm) to get the result D1
  2. In order tod1Is input, in turnSHA256,KECCAK512,GROESTL512,BLAKE512Operation to obtain the output respectivelyd2.d3.d4andd5
  3. Extract respectivelyd2-d5The first 64 bits are confused to form the final256Bit-hash result as the block ID.

The first round of HEFTY1 hashing is because HEFTY1 is extremely difficult to compute, and it is far more resistant to mining machines than SCRYPT. But as with SCRYPT, the security has not been demonstrated by an official agency, so the next four algorithms that have been recognized for security have been added to enhance security.

Compared with the series and parallel methods, Quark, X11, X13 and others use a variety of HASH functions, but these algorithms simply series various HASH functions together. After careful consideration, they do not improve the overall anti-collision performance, and their security is supported by the weakest algorithm among them due to the barrel effect. Collision attacks on any of the Hash functions will endanger the security of the monetary system.

HVC extracts 64 bits from each of the above algorithms and fuses them into the final result. In fact, four algorithms are connected in parallel. If one algorithm is cracked, only 64 bits of the algorithms will be compromised, and only if the four algorithms are cracked at the same time will the security of the monetary system be compromised.

ETHASH

Ethash is ethereum above the use of POW algorithm, the specific introduction can be viewed in this article (suggested to pay attention to this public number) : Death bang Ethereum source code analysis of Ethash algorithm

Problems with POW algorithm

  1. The design of competitive computing resulted in centralized pools: although the purpose of PoW was to ensure decentralized operation of the system, the system has in fact formed five highly centralized pools so far. Five mining pools dominate more than 90% of the world’s computing power, which can lead to large pools disrupting entire networks
  2. The design of competitive computing leads to massive energy consumption: In addition, PoW systems require massive energy consumption: Bitcoin mining consumes more energy than 159 countries; 77.7% of the global Bitcoin network’s computing power is still in China; Thanks to abundant power resources in Inner Mongolia and Sichuan, China has the world’s largest bitcoin mines; By July 2019, the bitcoin network will need more electricity than the U.S. currently uses; By February 2020, it will use as much electricity as the world does today
  3. Low business processing performance: Although a large amount of energy is used to support the operation of the system, most of this energy is used for hashing in proof-of-work. Transaction performance is very low. For example, bitcoin can only handle about 7 transactions per second. Ethereum is 10-20 strokes per second.

reference

Web.xidian.edu.cn/qqpei/files…