Position: Home page » Blockchain » Blockchain proofofflow

Blockchain proofofflow

Publish: 2021-04-19 23:21:07
1.

The strict definition of blockchain refers to the distributed database technology that multiple nodes in peer-to-peer network jointly maintain a continuously growing list ledger constructed by time stamp and orderly record data blocks through consensus mechanism based on cryptography technology. This technical solution allows any number of nodes in the participating system to calculate and record all the information exchange data in the system in a period of time to a data block through cryptography algorithm, and generate the fingerprint of the data block for linking the next data block and checking. All participating nodes in the system jointly determine whether the record is true

blockchain is a technical solution similar to NoSQL (non relational database). It is not a specific technology, and can be implemented through many programming languages and architectures. There are many ways to realize blockchain, including pow (proof of work), POS (proof of stake), dpos (delegate proof of stake), etc

the concept of blockchain was first proposed in the paper "bitcoin: a peer-to-peer electronic cash system" by indivials (or groups) who call themselves Satoshi Nakamoto. Therefore, bitcoin can be regarded as the first application of blockchain in the field of financial payment

< H2 > [popular explanation]

no matter how big the system or how small the website is, there is a database behind it. So who will maintain this database? In general, who is responsible for the operation of the network or system, then who is responsible for the maintenance. If it is wechat database, it must be maintained by Tencent team, and Taobao database is maintained by Alibaba team. We must think that this way is natural, but blockchain technology is not

if we think of the database as a book, for example, Alipay is a typical account book. Any change of data is bookkeeping. We can think of database maintenance as a very simple way of accounting. In the world of blockchain, everyone in the blockchain system has the opportunity to participate in bookkeeping. The system will select the fastest and best bookkeeper in a period of time, maybe within ten seconds or ten minutes. The bookkeeper will record the changes of the database and the account book in a block. We can think of this block as a page. After the system confirms that the records are correct, the system will record the changes of the database and the account book in a block, It will link the fingerprint of the past account book to this paper, and then send this paper to everyone else in the whole system. Then, over and over again, the system will look for the next person with fast and good bookkeeping, and everyone else in the system will get a of the whole ledger. This means that everyone as like as two peas in the system is called Blockchain. It is also called distributed account technology. P>

as like as two peas (computer) have identical accounting books, and everyone has the same rights, they will not collapse e to the loss of contact or downtime of a single person. As like as two peas, the data is transparent and everyone can see what changes are in every account. Its very interesting feature is that the data can't be tampered with. Because the system will automatically compare, it will think that the same number of books with the largest number are real books, and a small number of books with different numbers are false books. In this case, it's meaningless for anyone to tamper with his own account book, because unless you can tamper with most nodes in the whole system. If there are only five or ten nodes in the whole system, it may be easy to do so. However, if there are tens of thousands or even hundreds of thousands of nodes and they are distributed in any corner of the Internet, unless someone can control most computers in the world, it is unlikely to tamper with such a large block chain

< H2 > [elements]

combined with the definition of blockchain, we think that we must have the following four elements to be called public blockchain technology. If we only have the first three elements, we will consider it as private blockchain Technology (private chain)

1, peer-to-peer network (power equivalence, physical point-to-point connection)

2, verifiable data structure (verifiable PKC system, non tampering database)

3, distributed consensus mechanism (Solving Byzantine general problem, solving double payment)

4 Game design of Nash equilibrium (cooperation is the strategy of evolutionary stability)


< H2 > [Characteristics]

combined with the definition of blockchain, blockchain will realize four main characteristics: decentralized, trustless, collective maintenance and reliable database. And the other two will be derived from the four characteristics  Features: open source  Privacy. If a system does not have these characteristics, it can not be regarded as an application based on blockchain technology

Decentralized: there is no centralized hardware or management organization in the whole network. The rights and obligations of any node are equal, and the damage or loss of any node will not affect the operation of the whole system. Therefore, it can also be considered that the blockchain system has excellent robustness

trustworthiness: there is no need to trust each other when participating in the data exchange between each node in the whole system. The operation rules of the whole system are open and transparent, and all data contents are also open. Therefore, within the specified rule range and time range of the system, nodes cannot and cannot cheat other nodes

collective maintenance: the data blocks in the system are maintained by all the nodes with maintenance function in the whole system, and these nodes with maintenance function can be participated by anyone

reliable database: the whole system will enable each participating node to obtain a of the complete database in the form of sub databases. Unless more than 51% of the nodes in the whole system can be controlled at the same time, the modification of the database on a single node is invalid, and the data content on other nodes cannot be affected. Therefore, the more nodes and computing power in the system, the higher the data security in the system

Open Source: since the operation rules of the whole system must be open and transparent, the whole system must be open source for the program

Privacy Protection: since there is no need to trust each other between nodes, there is no need to disclose the identity between nodes, and the privacy of each participating node in the system is protected

2.

One of the characteristics of blockchain projects (especially public chains) is open source. Through open source code, to improve the credibility of the project, so that more people can participate. But the open source code also makes it easier for attackers to attack blockchain system. In the past two years, there have been a number of hacker attacks. Recently, the anonymous currency verge (xvg) was attacked again. The attacker locked a vulnerability in the xvg code, which allowed malicious miners to add false timestamps on the block, and then quickly dig out new blocks. In a few hours, the attacker obtained nearly $1.75 million worth of digital currency. Although the subsequent attack was successfully stopped, no one can guarantee whether the attacker will attack again in the future

of course, blockchain developers can also take some measures

one is to use professional code audit services,

the other is to understand the security coding specifications and take preventive measures

the security of cryptographic algorithm

with the development of quantum computer, it will bring a major security threat to the current cryptosystem. Blockchain mainly relies on elliptic curve public key encryption algorithm to generate digital signature for secure transactions. Currently, the most commonly used ECDSA, RSA, DSA, etc. can not withstand quantum attacks in theory, and there will be greater risks. More and more researchers begin to pay attention to cryptographic algorithms that can resist quantum attacks

of course, in addition to changing the algorithm, there is another way to improve the security:

refer to bitcoin's treatment of public key address to rece the potential risk of public key disclosure. As users, especially bitcoin users, the balance after each transaction is stored in a new address to ensure that the public key of the address where bitcoin funds are stored is not leaked

security of consensus mechanism

the current consensus mechanisms include proof of work (POW), proof of stake (POS), delegated proof of stake (dpos), practical Byzantine fault tolerance (pbft), etc

POW faces 51% attack. Because POW depends on computing power, when the attacker has the advantage of computing power, the probability of finding a new block will be greater than that of other nodes. At this time, the attacker has the ability to cancel the existing transaction. It should be noted that even in this case, the attacker can only modify his own transaction, but not the transaction of other users (the attacker does not have the private key of other users)

in POS, attackers can attack successfully only when they hold more than 51% token, which is more difficult than 51% computing power in pow

in pbft, when the malicious nodes are less than 1 / 3 of the total nodes, the system is secure. Generally speaking, any consensus mechanism has its own conditions. As an attacker, we also need to consider that once the attack is successful, the value of the system will return to zero. At this time, the attacker does not get any other valuable return except destruction

for the designers of blockchain projects, they should understand the advantages and disadvantages of each consensus mechanism, so as to select an appropriate consensus mechanism or design a new consensus mechanism according to the needs of the scene

security of smart contract

smart contract has the advantages of low operation cost and low risk of human intervention, but if there are problems in the design of smart contract, it may bring greater losses. In June 2016, the Dao, the most popular funding project of Ethereum, was attacked. The hacker obtained more than 3.5 million Ethereum coins, which later led to the bifurcation of Ethereum into Eth and etc

there are two aspects of the proposed measures:

one is to audit the security of smart contract, and the other is to follow the principle of smart contract security development

the security development principles of smart contract are: to be prepared for possible errors, to ensure that the code can correctly handle the bugs and vulnerabilities; Release smart contracts carefully, do well in function test and security test, and fully consider the boundary; Keep smart contracts simple; Pay attention to the threat intelligence of blockchain and check and update in time; Be clear about the characteristics of blockchain, such as calling external contracts carefully

security of digital wallet

there are three main security risks in digital wallet: first, design defects. At the end of 2014, a user lost hundreds of digital assets e to a serious random number problem (repeated r value). Second, the digital wallet contains malicious code. Third, the loss of assets caused by the loss or damage of computers and mobile phones

there are four main countermeasures:

one is to ensure the randomness of the private key

The second is to check the hash value before installing the software to ensure that the digital wallet software has not been tampered with

The third is to use cold wallet

The fourth is to back up the private key

3. There are many consensus mechanisms in the blockchain. The advantage of the pow consensus mechanism behind bitcoin, the most influential one, is that it is secure and can not be tampered with. The disadvantage is that it is too slow to process only seven transactions a second
4. At present, there are four main types of consensus mechanisms: pow, POS, dpos, pool
1. POW workload proof, which is familiar with mining, calculates a random number that meets the rules through and or operation, that is, obtains the bookkeeping right, sends out the data that needs to be recorded in this round, and stores it together with other nodes in the whole network after verification
advantages: complete decentralization, free access of nodes
disadvantages: bitcoin has attracted most of the computing power in the world, and other blockchain applications using POW consensus mechanism are difficult to obtain the same computing power to ensure their own security; Mining causes a lot of waste of resources; The period of reaching consensus is long, which is not suitable for commercial application.

2. Proof of rights and interests of POS, a mechanism of upgrading consensus of pow; According to the token proportion and time of each node; It can rece the difficulty of mining in equal proportion, so as to speed up the speed of finding random numbers< Advantages: to a certain extent, it shortens the time to reach a consensus
disadvantages: mining is still needed, which does not solve the pain point of commercial application in essence

3. Dpos share authorization certification mechanism is similar to the voting of the board of directors, in which the coin holders cast a certain number of nodes to verify and account on their behalf
advantages: greatly rece the number of participating verification and accounting nodes, which can achieve second level consensus verification
disadvantages: the whole consensus mechanism still depends on token, and many commercial applications do not need token to exist

4. Pool verification pool, which is based on traditional distributed consistency technology and data verification mechanism; It is a consensus mechanism widely used in the instry chain at present.
advantages: it can work without token, and realizes second level consensus verification on the basis of mature distributed consistency algorithms (pasox and raft)
disadvantages: the degree of decentralization is not as good as that of bictin; The multi center business model is more suitable for multi-party participation

it has great advantages in using consensus mechanism to ensure data consistency (the consensus mechanism is first proposed by ripple, and the network transaction synchronization mechanism with data correctness priority. In the consensus network, no matter how the software code changes, if you can't reach a consensus, you can't enter the network, let alone fork)
- - - - - - - -
PS: a little black, although the consensus mechanism can absolutely ensure that there will be no hard bifurcation at any time. However, the disadvantage of this mechanism is obvious, that is, it is much longer than the current bitcoin network to reach a consensus with other nodes. In extreme cases, the consequences of disconnection in ripple consensus mechanism network are also very terrible

it is possible that one day after the power failure in your home, the whole system will no longer be able to reach a consensus with other rippled nodes (in fact, the consensus mechanism requires more than 80% of the nodes to acknowledge your data before your submission will be accepted by other nodes, otherwise it will be rejected by exclusive nodes), Even you can only empty all your 500 GB data and resynchronize to connect to other ripple nodes

so at present, the existing rippled end is not suitable for civil use (if it is commercial, the impact is relatively small. For example, RL's own rippled node is hosted in Amazon cloud data center. If it has no response for a long time, it can make high claims, and there is almost no break in that place except for large disasters). This is one of the aspects RL has always wanted to improve.
5. 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.
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).
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