Position: Home page » Blockchain » Proof of blockchain equity and proof of workload

Proof of blockchain equity and proof of workload

Publish: 2021-05-13 05:26:01
1. There are six hierarchical structures in the blockchain, which are from bottom to top: data layer, network layer, consensus layer, incentive layer, contract layer and application layer
1. Data layer
the data layer is the lowest layer in the six hierarchies of the blockchain. We can understand the data layer as a database, but for the blockchain, this database is a tamperable and distributed database, which is what we call "distributed ledger"
in the data layer, that is, the "distributed ledger", the data information on the blockchain is stored, and the blockchain structure, asymmetric encryption technology, hash algorithm and other technical means of the block are encapsulated to ensure the security of the data in the case of the whole network being open. The specific method is:
in the blockchain network, nodes use consensus algorithm to maintain the consistency of data layer (that is, the distributed database), and use asymmetric encryption and hash algorithm in cryptography to ensure the non usurpation and traceability of the distributed database
This constitutes the bottom data structure of blockchain technology. However, it is not enough to have a distributed database. We also need to let the data information in the database be shared and exchanged. Next, we will introce the upper layer of the data layer - the network layer
Second, network layer
the network system of blockchain is essentially a P2P (point-to-point) network. Point to point means that there is no need for an intermediate link or centralized server to control the system. All resources and services in the network are distributed in the hands of each node, and the transmission of information is also a direct communication between the two nodes. However, it should be noted that P2P
(peer-to-peer) was not invented by Nakamoto, and the blockchain only integrates this technology
therefore, the network layer of blockchain is actually a particularly powerful point-to-point network system. In this system, each node can not only proce information, but also receive information, just like sending e-mail. You can write your own e-mail, and you can also receive the e-mail sent to you by others
in the blockchain network, nodes need to jointly maintain the blockchain system. Every time a node creates a new block, it needs to notify other nodes in the form of broadcast. After receiving the information, other nodes verify the block, and then create a new block on the basis of the block. In this way, the whole network can jointly maintain and update the general ledger of the blockchain system
however, what rules should the whole network follow to maintain and update the general ledger of the blockchain system? This involves the so-called "laws and regulations" (rules), which we will introce next: the consensus layer
Third, consensus layer
in the world of blockchain, consensus simply means that the whole network should maintain and update the general ledger of blockchain system according to a unified and agreed rule, which is similar to the rule of updating data. It is one of the core technologies of blockchain and the governance mechanism of blockchain community to let highly dispersed nodes reach consensus efficiently in the decentralized blockchain network
at present, the mainstream consensus mechanism algorithms include: proof of work of bitcoin (POW), proof of rights and interests of Ethereum (POS), proof of rights and interests of EOS (dpos), etc
we now introce the data layer, network layer and consensus layer. These three layers ensure that there are data, networks and rules for updating data on the network. However, there is no free lunch in the world. How can nodes actively participate in the maintenance of the blockchain system? Here is the incentive layer, which we will introce next: incentive layer< 4. Incentive layer
incentive layer is the so-called mining mechanism, which can be understood as incentive mechanism: you can get as much reward as you contribute to the blockchain system. With this incentive mechanism, the whole network nodes can be encouraged to participate in the data recording and maintenance on the blockchain
mining mechanism and consensus mechanism are actually the same truth. Consensus mechanism can be understood as the company's general rules and regulations, while mining mechanism can be understood as the reward rules for what you do well in the general rules and regulations
just like the consensus mechanism POW of bitcoin, it stipulates that more work pays more. Whoever can find the correct hash value first can get a certain amount of bitcoin reward
and Ethereum's POS stipulates that the older the holder is, the more likely he or she will be rewarded
it should be noted that the incentive layer is generally only available for the public chain, because the public chain must rely on the nodes of the whole network to jointly maintain data, so there must be a set of incentive mechanism to encourage the nodes of the whole network to participate in the construction and maintenance of the blockchain system, so as to ensure the security and reliability of the blockchain system
the blockchain is safe and reliable, and it is not intelligent enough, right? The contract layer we will introce next can make the blockchain system more intelligent
v. contract layer
Contract layer mainly includes various scripts, codes, algorithm mechanisms and smart contracts, which is the basis of block chain programming. What we call "smart contract" is at the contract level
if the bitcoin system is not intelligent enough, the "smart contract" proposed by Ethereum can meet many application scenarios. The principle of the contract layer is to embed the code into the blockchain system, in this way to realize the smart contract that can be customized. In this way, on the blockchain system, once the terms of the smart contract are triggered, the system can automatically execute commands< Finally, the application layer. The application layer is very simple. As the name suggests, it is a variety of application scenarios and cases of blockchain. What we now call "blockchain +" is the so-called application layer. At present, the blockchain applications that have been implemented are mainly various blockchain applications built on
eth, EOS and other public chains. There are more applications of gambling and games, and the real practical applications have not yet appeared.
2. The hierarchical structure of blockchain
1, data layer / data layer
the data layer mainly describes the physical form of blockchain, which is a chain structure starting from Genesis block on blockchain, including block data, chain structure, random number, time stamp, public and private key data on blockchain, and is the lowest level data structure in the whole blockchain technology
2. Network layer / network layer
the network layer mainly realizes the mechanism of distributed network through P2P technology, and the network layer includes P2P networking mechanism, data dissemination mechanism and data verification mechanism. Therefore, blockchain is essentially a P2P network with automatic networking mechanism, and the communication between nodes is maintained by maintaining a common blockchain structure
3. Consensus layer / consensus layer
consensus layer mainly includes consensus algorithm and consensus mechanism, which enables highly dispersed nodes to reach consensus on the effectiveness of block data efficiently in the decentralized blockchain network. It is one of the core technologies of blockchain and also the governance mechanism of blockchain community. At present, there are at least dozens of consensus mechanism algorithms, including workload proof, rights and interests proof, rights and interests authorization proof, burning proof, importance proof and so on
data layer, network layer and consensus layer are the necessary elements of building blockchain technology. Without any layer, it can not be called a real blockchain technology
4. Incentive layer / activator layer
the incentive layer mainly includes the issuing system and distribution system of economic incentive. Its function is to provide certain incentive measures, encourage nodes to participate in the security verification work in the blockchain, incorporate economic factors into the blockchain technology system, encourage nodes that comply with rules to participate in bookkeeping, and punish nodes that do not comply with rules
5. Contract layer / contract layer
the contract layer mainly includes various scripts, codes, algorithm mechanisms and smart contracts, which is the basis of block chain programming. Embedding the code into the blockchain or token, realizing the smart contract that can be customized, and automatically executing without a third party when certain constraints are met, is the foundation of the blockchain's distrust
6. Application layer / application layer
the application layer of blockchain encapsulates various application scenarios and cases, which are similar to applications on computer operating system, portals on Internet browsers, search engines, e-malls or apps on mobile phones. The blockchain technology applications are deployed on Ethereum, EOS and qtum, and are implemented in real life scenarios. The future programmable finance and programmable society will also be built on the application layer
incentive layer, contract layer and application layer are not necessary factors for each blockchain application, and some blockchain applications do not completely include the three-tier structure.
3.

The way in which people keep accounts together is also known as "distributed" or "decentralized", because everyone keeps accounts, and the accuracy of the account book is determined by the program algorithm, not by an authoritative organization

this is the blockchain, the core is finished, blockchain is so simple, a common account book

six core algorithms of blockchain Technology:

blockchain core algorithm 1: Byzantine agreement

the story of Byzantine is like this: the Byzantine Empire has great wealth, and the surrounding 10 neighbors have been around for a long time, but the Byzantine walls stand tall and firm, No single neighbor has been able to successfully invade. Any single neighbor's invasion will fail, and at the same time, it may be invaded by other nine neighbors. Byzantine Empire's defense ability is so strong that at least more than half of its ten neighbors attack at the same time before it can be broken. However, if one or several of the neighbors agree to attack together, but betray in the actual process, then the invaders may be annihilated. So each side was careful and could not easily trust its neighbors. This is the question of Byzantine Generals

blockchain core algorithm 2: asymmetric encryption technology

in the above Byzantine agreement, if several of the 10 generals send messages at the same time, it is bound to cause confusion in the system, resulting in different attack time schemes and inconsistent actions. Anyone can send the message of attack, but who will send it? In fact, it only needs to add a cost, that is, only one node can spread information in a period of time. When a node sends a unified attack message, each node must sign and seal to confirm its identity when receiving the message from the initiator

blockchain core algorithm 3: fault tolerance problem

we assume that in this network, messages may be lost, damaged, delayed and sent repeatedly, and the order of receiving is inconsistent with the order of sending. In addition, the behavior of nodes can be arbitrary: they can join or exit the network at any time, they can discard messages, forge messages, stop working and so on, and they may also have all kinds of human or non-human failures. Our algorithm provides fault tolerance for consensus system composed of consensus nodes, which includes both security and availability, and is suitable for any network environment

blockchain core algorithm 4: Paxos algorithm (consistency algorithm)

the problem solved by Paxos algorithm is how a distributed system can reach an agreement on a certain value (decision). A typical scenario is that in a distributed database system, if the initial state of each node is consistent, and each node performs the same operation sequence, then they can finally get a consistent state. In order to ensure that each node executes the same command sequence, it is necessary to execute a "consistency algorithm" on each instruction to ensure that the instructions seen by each node are consistent. A general consistency algorithm can be applied in many scenarios, which is an important problem in distributed computing. There are two models of node communication: shared memory and message passing. Paxos algorithm is a consistency algorithm based on message passing model

blockchain core algorithm 5: consensus mechanism

blockchain consensus algorithm is mainly workload proof and equity proof. Take bitcoin as an example. In fact, from a technical point of view, POW can be regarded as a reusable hashcash, and the generation workload proves to be a random process in probability. When mining a new secret currency and generating a block, the consent of all participants must be obtained, and the miner must obtain the pow work proof of all data in the block. At the same time, miners have to constantly observe and adjust the difficulty of this work, because the requirement for the network is to generate a block every 10 minutes on average

blockchain core algorithm 6: distributed storage is a kind of data storage technology, which uses the disk space of each machine through the network, and forms a virtual storage device with these scattered storage resources, and the data is stored in every corner of the network. Therefore, distributed storage technology does not store complete data in each computer, but stores the data in different computers after cutting. It's like storing 100 eggs, not in the same basket, but separately in different places. The total number is 100. Want to learn more, you can make more use of network search, network search results - small knowledge

4. Ether clown is based on Ethereum blockchain to develop a digital phone, blockchain game with collection value! Now I'll introce it
1. The proction of clowns

the proction mechanism of clowns can be divided into two kinds, one is the official output, the other is the breeding output between two clowns
one official clown is proced every 15 minutes, and the total number is only 50000. At certain times, the official will also release some strange clowns with special shapes. The price of the original clown is the average of the prices of the last five clowns in the market
two clowns of different genders can reproce in the breeding center of the market. In each breeding pair, one clown who plays the role of father can receive the breeding fee paid by the other party (maternal Master). After breeding, there is a certain recovery period, which is related to the clown's genes. The clown in the role of mother will have a period of pregnancy, and she will not be able to breed with other clowns until she gives birth to her baby. There is no limit to the number of breeding times of each etheric clown, but the recovery period and pregnancy period will increase with the number of breeding times< Each clown's appearance is determined by the tamperable genes stored in the smart contract, and each gene is unique, so each clown is unique
the appearance of a clown is composed of eight parts, each part of which can be divided into ordinary and rare attributes. The number of rare attributes is less than that of ordinary attributes, which makes the clown with rare attributes more precious
the appearance of a clown born in breeding is closely related to his parents and the genetic genes carried by his parents. The offspring have a high probability of inheriting the shape of some parts of his parents, so that their parents' good genes can be inherited, and it is possible to mutate and become a completely different clown from his parents

3. Clown trading

etheric clown can be directly used for trading
sell: users can choose clowns to be auctioned in the market, and they can sell their own clowns. When selling, users need to set the highest starting price, the lowest acceptance price and the auction time. The Dutch auction is adopted in the auction. During the auction time, the highest price set by the seller is graally transferred to the lowest price. If the owner is not willing to sell at a low price, a longer auction time can be set or the clown can be sold off the shelves
buy: the buyer selects the clown on sale in the market and pays ether to buy the clown he likes. When the buyer purchases, the transaction will be concluded at the auction price at the current time point. If you have a favorite clown, but feel that the price is not suitable for the time being, and want to pay more attention, you can collect the clown after you like it. Later, we can understand the dynamic of the clown through "my attention"< There are four kinds of clown attribute values: growth value, strength value, agility value and wisdom value. Generation 0 clowns get the value of each attribute randomly, and the non generation 0 clowns are mainly inherited
attribute values can be changed by eating food
after the clown's growth value reaches the requirement (100 points), he can go to the factory to earn money (ETH). Different kinds of factories need different clowns. Dream college needs the wisdom of every working clown. Clowns with more than 800 points of wisdom go to Dream Academy of Sciences to work, and their income can get bonus. If a clown with less than 300 wisdom goes to work, his income will be reced to
a part-time job will consume physical strength. The total physical strength is 120 points. It consumes 1 point every 12 minutes and can work up to 24 hours. During the period of not working, physical strength can be recovered, a little every 8 minutes
when the time reaches 0 o'clock or the clown's physical exertion is completed, the clown's work income will be settled according to the actual working hours at 0 o'clock every day. When every 12 minutes is a work, less than 12 minutes will not be counted

5. Clown food and feeding

owners can buy spinach, beef, carrots, walnuts and other food through the mall to feed clown pets
the price of food is related to the selling price of original clowns on the platform the day before. So the owners can hoard some food when the price of food is low
feeding spinach is helpful to growth value, beef corresponds to clown pet's strength value, carrot corresponds to agility, walnut corresponds to wisdom
the clown can only eat one food a day. We suggest that spinach should be fed in the early stage to meet the working conditions as soon as possible, and then according to the natural properties of clown in the later stage. When working, choose the type of factory with the highest attributes to work.
5. Proof of work (POW) is a proof to confirm that you have done a certain amount of work. The whole process of monitoring work is usually extremely inefficient, and it is a very efficient way to prove that the corresponding workload has been completed through the certification of the work results. For example, in real life, graation certificate, driver's license and so on, are also obtained through the way of test results (through the relevant examination)
proof of equity mechanism
POW is a way to reach a consensus, but it is not the only way. There are other ways for each node to reach a consensus, such as POS
POS is different from POW in that mining on POS system is based on the amount of money held. In other words, in the case of POS, the effect of a person owning 5% of the virtual currency is the same as that of a person owning 5% of the computing power on bitcoin system
the basic principle of workload proof the main feature of workload proof system is that the client needs to do some difficult work to get a result, but the verifier can easily check whether the client has done the corresponding work through the result. A key feature of this scheme is asymmetry: the work is moderate for the requester and easy for the verifier. Different from captcha, captcha is designed to be easily solved by human but not by computer. The following figure shows the process of workload proof:
for example, given a basic string & quot; Hello, world!& quot;, Our workload requirement is that an integer value called nonce can be added after the string to perform sha256 hash operation on the changed (nonce added) string. If the hash result (expressed in hexadecimal) is & quot; 0000" At the beginning, the verification is passed. In order to achieve this goal. We need to continuously increase the nonce value to perform sha256 hash operation on the new string. According to this rule, we need to go through 4251 calculations to find the hash with exactly the first four bits of 0

. In the process of workload proof, we can roughly summarize the steps of bitcoin miners to solve this puzzle of workload proof as follows: generate coinbase transaction, and form a transaction list with all other transactions that are ready to be packaged into blocks, generate Merkle root hash through Merkle tree algorithm, and assemble Merkle root hash and other related fields into blocks, The 80 byte block header of the block header is used as the input of workload proof, and the random number in the block header, that is, the value of nonce, is constantly changed, and the block header after each change is double sha256 operation (that is sha256 (sha256 (block)_ If it is less than the target value, the problem is solved successfully and the workload is proved to be completed. The process can be shown in the following figure:
the workload proof of bitcoin is the main work we commonly call "mining". Understanding the workload proof mechanism will lay a foundation for us to further understand the consensus mechanism of bitcoin blockchain.
6. Proof of work (POW) is a proof to confirm that you have done a certain amount of work. The whole process of monitoring work is usually extremely inefficient, and it is a very efficient way to prove that the corresponding workload has been completed through the certification of the work results. For example, in real life, graation certificate, driver's license and so on, are also obtained through the way of test results (through the relevant examination).
7. Unknown_Error
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750