简单模拟区块链怎么做,简单模拟区块链模型
请查看相关英文文档
Ⅰ What is blockchain and how to introduce blockchain in a simple and easy-to-understand manner
Blockchain is a term in the field of information technology.
Essentially, it is a shared database. The data or information stored in it has the characteristics of "unforgeable", "full traces left", "traceable", "open and transparent" and "collectively maintained". . Based on these characteristics, blockchain technology has laid a solid foundation of "trust" and created a reliable "cooperation" mechanism, which has broad application prospects.
On January 10, 2019, the Cyberspace Administration of China issued the "Blockchain Information Service Management Regulations". On October 24, 2019, during the 18th collective study session of the Political Bureau of the CPC Central Committee, General Secretary Xi Jinping emphasized that “blockchain should be used as an important breakthrough for independent innovation of core technologies” and “accelerate the development of blockchain technology and industrial innovation.” . "Blockchain" has entered the public eye and become the focus of society.
On December 2, 2019, the word was selected into the top ten buzzwords of 2019 by "Biwenqiezi".
(1) Simple simulation of blockchain extended reading:
Blockchain financial application:
Since 2016, various Major financial giants have also taken notice and launched blockchain innovation projects one after another to explore the possibility of applying blockchain technology in various financial scenarios. In particular, Puyin Group took the lead in pioneering the “blockchain+” standard digital currency.
The standard digital currency is an asset that has been identified, evaluated, confirmed, insured, etc. by a third-party organization and written into the blockchain through rigorous digital algorithms to form a standard correspondence between the asset and the digital currency. relationship, called a standard digital currency.
In order to realize the great leap forward development of blockchain finance, in order to promote the new development of China’s economy, accelerate the circulation of global assets, and realize the dream of rejuvenation that generations of people have been striving for, Puyin Group will launch in December 2016 Puyin Blockchain Finance Guiyang Strategy Release Ceremony was held in Guizhou on the 9th;
At the meeting, the digital circulation of assets through blockchain, the blockchain financial transaction model, and the relationship between blockchain services and blockchain services will be discussed. The application of social public industries will be discussed. This conference will mark the beginning of the application of blockchain finance and the transformation and development of a new financial ecosystem.
Reference for the above content: Network-Blockchain Finance; Network-Blockchain
Ⅱ What is blockchain and how to introduce blockchain in a simple and easy-to-understand manner
< p>Many people don’t know what blockchain is. Here is a detailed introduction to you. Blockchain is a new technology that subverts the old model. Just like people tend to ignore invisible but indispensable oxygen, people often ignore it. The most important thing in a market economy is trust. Without trust, no transaction can be established.In addition, different races, nationalities, cultures, religious beliefs, etc. will form a trust gap. Due to the lack of mutual understanding and necessary trust between strangers, transactions are difficult to occur.The market economy emerged in large numbers among strangers. The emergence and development of the market economy lies in the birth of a new mechanism, which solves the problem of trust between strangers.
The concept of blockchain was first proposed in a paper written by Bitcoin founder Satoshi Nakamoto in 2008. Blockchain can be understood as a kind of public accounting. Technical solution: All data will be open and transparent, without the need for a central server as a trust intermediary, thus ensuring the authenticity, immutability and credibility of information on a technical level. The immutability of data is very important.
Because the blockchain has the technical characteristics of large-scale expansion, open and transparent data, and because the data of each client is consistent, even if some clients are destroyed, it will not affect the reliability of data security. In particular, it can effectively solve the problem of trust between strangers, so this technology can be extended to all fields that can be digitized, such as digital currency, payment settlement, digital bills, proof of rights, credit information, government services, medical records, etc. If blockchain technology develops, it will be closely related to everyone in the future.
Ⅲ What is blockchain? A cartoon to help you understand (a must-read for beginners)
The word "blockchain" was actually used in the early cryptography circles. The underlying technology of Bitcoin is called "Bitcoin". In English, Bitcoin starting with a capital B refers to the network system or network protocol of Bitcoin.
However, due to public confusion, people are now very resistant when talking about Bitcoin, thinking that Bitcoin is synonymous with illegality, scams, pyramid schemes, and another phenomenal bubble in Internet finance! As a result, people had to merge all the underlying technologies (timestamps, proof-of-work mechanisms, etc.). In order to distinguish them from Bitcoin, they renamed them Blockchain, which translated into "blockchain". This is how the term “blockchain” appeared.
Blockchain is not a single technology, but a collection of a series of technologies.
How should we understand blockchain? Let’s first use the love story that everyone loves to talk about as a simple example. Establish a simple blockchain model, then the following situation will occur when falling in love in this blockchain model:
In the future, all men and women of the right age will fall in love and the entire process of marriage commitment will be blocked by all other men and women of the right age. Consensus, all the stories that happen between two people will form a block.
All other men and women are the chain. If a third party intervenes or you violate your partner, others can see it, and you will never find a partner in the future.
To be precise, the blockchain is a "full center" system, that is, every node on the chain is the center.
Trial marriages for men and women to fall in love, post on friends, show affection, promise to love each other for a lifetime and be known by all other marriageable men and women are the applications of blockchain. If one day one party violatesBreak your promise and don't think that deleting the photos will help, because every single one of them has been recorded by all the men and women of marriageable age.
Cannot be deleted or changed, this is blockchain technology.
IV How to interpret blockchain in the simplest way
Everyone hears the word blockchain every day recently, so what is blockchain? Explanations such as "distributed, difficult to tamper, and consistent storage" are too technical and dry. Let me give you some popular science here: Blockchain is mainly designed to solve the trust problem between individuals who do not trust each other.
To give a popular example: It is said that Lao Li and Lao Wang live in the same village. Lao Li is a little short of money recently and wants to borrow some money from Lao Wang. As for Lao Wang, he was worried about what would happen if he defaulted on the loan after borrowing money from Lao Li, so he called in the "highly respected" village chief. However, thinking about it, the village chief couldn't be trusted either. The village chief had even stolen other people's sweet potatoes in the past! what to do?
The blockchain method is: After Lao Wang borrowed 1,000 yuan from Lao Li, he then used a loudspeaker to shout in the village, "I, Lao Wang, borrowed 1,000 yuan from Lao Li today. Everyone Record it quickly." So everyone in the village recorded it in their own account books and kept it carefully. This is good, Lao Li can't rely on him anymore. Even if there are dishonest people in the village, there are still many good people. Lao Li can't find everyone in the village to secretly erase his loan records. In this way, the blockchain solved the trust problem of borrowing money between Lao Wang and Lao Li, who did not trust each other.
Before the emergence of blockchain, how did we solve the problem of trust between individuals who did not trust each other? It's simple, just find a "witness" who is "highly respected" and trusted by both parties, such as the village chief in the story, such as Alipay between the buyer and seller, such as the notary office, etc. However, it is possible that such "witnesses" may not always be honest, so the blockchain simply allows everyone to act as a witness.
Lao Wang is relieved, but Lao Li has a headache! Lao Li has to wait until everyone in the village has recorded the money before he can get the money lent to him. There is no uncle or aunt in the family who is slower. Therefore, there is still a certain distance between blockchain and application, and efficiency issues need to be significantly improved.
Recall how you usually trade with others: you can choose a beautiful dress in a physical store, confirm that the other party’s clothes are of good quality, and the other party confirms that your money is real money. , then we will pay and receive the goods face to face.
What if we are thousands of miles apart and neither know nor trust each other but still want to trade? Then there needs to be a third party that we all trust, which is the so-called consensus mechanism. For example: you can complete the transaction through a third-party witness guarantee on Taobao. The money is first given to Alipay - Alipay collects the payment and lets the seller deliver the goods - the seller delivers the goods - you confirm receipt - Alipay then gives the money to the seller.
However, if this centralized organization does evil and Dad Ma tears up the ledger, no matterWhat should you do if you admit that you gave money, or joined forces with the seller to defraud you of money?
Or maybe the government lends you 1 million, and finally pays you back by issuing excessive currency. The 1 million shrinks to 10,000, and you bear the loss of inflation. What should you do? ?
Is there a third party that is not controlled by any government or organization, can complete arbitration in an open and transparent manner, has records that will not be tampered with, and has no risk of running away?
Don’t worry, our protagonist’s blockchain technology solves this problem - the transactions between you can be witnessed by everyone in this blockchain system, and it will be recorded in everyone’s small ledger. Your deal. If B denies receiving money from A, or if A says that he borrowed 300 yuan, passers-by A, B, B, and D will question him. How exactly is it done?
1) The system issues a small ledger to everyone, so that everyone has the right to keep accounts. We call it distributed accounting.
2) In order to encourage everyone to help others keep accounts, the system code is set to reward tokens such as Bitcoin to the keepers. In order to prevent a group of people from being blocked in keeping accounts, the tokens are also set to There are only a limited number of A, B, C and D who need to be calculated through the mechanism specified by the system. Only the fastest and best calculation can obtain the right to keep accounts. After recording, it is broadcast to everyone through the system. Everyone copies the same ledger. This is obtained through calculation. The reward process is called mining, and passers-by A, B, B, and D who keep accounts are the miners.
3) One day, A, who originally recorded the transaction, Game Over, but the ledger still exists in other people's ledgers. Neither A nor B can deny it. We have written in code how to arbitrate and distribute, without the need for banks, governments, enterprises and other centralized organizations to serve as third-party witnesses (decentralization), and the direct point-to-point (P2P) transaction method is called decentralization.
4) The system packages multiple transactions into blocks and links them in chronological order to become the final ledger that everyone has. This is the blockchain technology
In fact, the block chain The simple understanding of blockchain as a ledger is only the simplest interpretation. If each of its characteristics is separated, it can be applied in many fields.
Now the traditional financial industry, securities firms, and investment institutions are rushing to enter the Internet of Things, games, storage, copyright, anti-counterfeiting, credit reporting, payment, prediction markets (gambling, etc.), communities and many other fields. The exploration and application of blockchain has already begun.
The Internet allows everything to be connected. Can blockchain make everything connected trustworthy?
Let me explain the blockchain using the natural stones of heaven and earth:
All science, philosophy, morality... heaven and earth are included. any thingThings and any kind of culture are related to the Taoism of heaven and earth.
Blockchain naturally cannot escape the fate of heaven and earth: that is, smooth, random, infinite, and impermanent.
It is this strange stone, and the overall data movement on its surface. First, the whole is intangible. Second, the lines and points adhere to a pattern: the path of impermanence. That is to say, every line and every point they pursue is not a closed goal or a limited purpose. I can understand it better when I say this: when a painter paints a chicken, it has a purpose and an ending, while strange rocks, when created by nature, have no ending. Therefore, the phase is not closed, and the line and point data are not terminated. The technology of block connection is this way of destiny. Impermanence is invisible and has no end. (No centralization means formlessness, no closed form, no closed structure, and no closed mind...just act like a "stone").
Confucius Lingshi Museum in Qufu, Shandong
Hello everyone, I am Pippi. I will use a few life examples to explain to you what blockchain is?
A decentralized, tamper-proof, distributed storage data block linking system that uses encrypted information as the link address is called blockchain
This thing is originally There are many high-tech composite products that cannot be simplified. No matter how simple it is, it takes a long paragraph, and it may not be clear.
The strict definition of blockchain refers to the design based on cryptography technology. Consensus mechanism, a distributed database technology in which multiple nodes in a peer-to-peer network jointly maintain a continuously growing, chained list ledger constructed of timestamps and ordered record data blocks. This technical solution allows any number of nodes participating in the system to calculate and record all information exchange data in the system over a period of time into a data block (block) through cryptographic algorithms, and generate the fingerprint of the data block for linking ( chain) and check the next data block, all participating nodes in the system jointly determine whether the record is true.
Blockchain is a general term for technical solutions similar to NoSQL (non-relational database). It is not a specific technology. Blockchain technology can be implemented through many programming languages and architectures. . There are also many ways to implement blockchain. Common ones currently include POW (Proof of Work), POS (Proof of Stake), DPOS (Delegate Proof of Stake), etc.
The concept of blockchain was first introduced in the paper "Bitcoin: A Peer-to-Peer Electronic Cash System"ystem)”, the author is an individual (or group) who calls himself Satoshi Nakamoto. Therefore, Bitcoin can be regarded as the first application of blockchain in the field of financial payments.
[Popular explanation]
No matter how big the system or how small the website, there is usually a database behind it. So who will maintain this database? Under normal circumstances, whoever is responsible for operating the network or system will maintain it. If it is a WeChat database, it must be maintained by Tencent's team, and Taobao's database must be maintained by Alibaba's team. Everyone must think that this approach is natural, but this is not the case with blockchain technology.
If we imagine the database as a ledger: Alipay, for example, is a typical ledger, and any change in data is an accounting type. We can think of database maintenance as a very simple accounting method. The same is true in the world of blockchain. Everyone in the blockchain system has the opportunity to participate in accounting. The system will select within a period of time, maybe within ten seconds, or maybe ten minutes, to select the person with the fastest and best accounting during this period. This person will do the accounting, and he will combine the changes in the database during this period with Changes in the ledger are recorded in a block. We can imagine this block as a page of paper. After confirming that the record is correct, the system will link (chain) the data fingerprint of the past ledger to this paper, and then This piece of paper is sent to everyone else in the entire system. Then the cycle starts over and the system looks for the next person who can do the accounting quickly and well, and everyone else in the system gets a copy of the entire ledger. This means that everyone in this system has exactly the same ledger. This technology is called blockchain technology, also known as distributed ledger technology.
Since everyone (computer) has exactly the same ledger, and everyone (computer) has exactly the same rights, there will be no problem due to a single person (computer) losing contact or going down. The entire system collapses. Since there are exactly the same ledgers, it means that all data is open and transparent, and everyone can see the digital changes in each account. Its very interesting feature is that the data in it cannot be tampered with. Because the system will automatically compare, it will consider the account books with the largest number of the same number as the real account books, and the small number of account books with different numbers as others are false account books. In this case, it makes no sense for anyone to tamper with their own ledger, because unless you can tamper with most of the nodes in the entire system. If the entire system has only five or ten nodes, it may be easy to do, but 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 of the computers in the world , otherwise it would be unlikely to tamper with such a large blockchain.
【Elements】
Combined with the definition of blockchain, we believe that it must have the following four elements to be called a public blockchain technology. If it only has the first three elements, we will consider it to be a private blockchain technology (private blockchain technology). chain).
1. Point-to-point peer-to-peer network (peer-to-peer power, physical point-to-point connection)
2. Verifiable data structure (verifiable PKC system, non-tamperable database)
3. Distributed consensus mechanism (solve the Byzantine generals problem and double payment)
4. Nash equilibrium game design (cooperation is an evolutionarily stable strategy)
/>
[Characteristics]
Combined with the definition of blockchain, blockchain will realize four main characteristics: decentralized, trustless, Collectively maintained (Collectively maintained), reliable database (Reliable Database). And the four characteristics will lead to two other characteristics: open source (Open Source) and privacy protection (Anonymity). If a system does not possess these characteristics, it will not be considered an application based on blockchain technology.
Decentralized: The entire network has no centralized hardware or management organization. The rights and obligations between any nodes are equal, and the damage or loss of any node will not affect it. operation of the entire system. Therefore, the blockchain system can also be considered to have excellent robustness.
Trustless: Each node participating in the entire system does not need to trust each other for data exchange. The operating rules of the entire system are open and transparent, and all data contents are also public. , therefore within the rule range and time range specified by the system, nodes cannot and cannot deceive other nodes.
Collectively maintain: The data blocks in the system are jointly maintained by all nodes with maintenance functions in the entire system, and these nodes with maintenance functions can be participated by anyone.
Reliable Database: The entire system will be divided into databases so that each participating node can obtain a copy of the complete database. Unless more than 51% of the nodes in the entire system can be controlled at the same time, modifications to the database on a single node are invalid and cannot affect the data content on other nodes. Therefore, the more nodes and stronger computing power participating in the system, the higher the data security in the system.
Open Source (Open Ssource): Since the operating rules of the entire system must be open and transparent, for the program, the entire system must be open source.
Privacy protection (Anonymity): Since nodes do not need to trust each other, there is no need to disclose their identities between nodes. The privacy of each participating node in the system is protected. protected.
[One of the meanings of blockchain: Solving the Byzantine Generals Problem]
The core problem solved by blockchain is not "digital currency", but information asymmetry and inconsistency. Under a certain environment, how to establish a "trust" ecological system that satisfies the occurrence and development of economic activities. This problem is called the "Byzantine Generals Problem", also known as "Byzantine Fault Tolerance" or the "Two Armies Problem". This is a difficult problem faced when information machines interact in a distributed system, that is, any point in the entire network When nodes cannot trust the other party they are communicating with, how can they create a consensus basis for secure information exchange without worrying about data being tampered with. Blockchain uses an algorithmic proof mechanism to ensure the security of the entire network. With it, all nodes in the entire system can automatically and securely exchange data in a trustless environment. For more introduction, please see "Bitcoin and the Byzantine Generals Problem".
[The second meaning of blockchain: realizing cross-border value transfer]
At the beginning of the birth of the Internet, the earliest core problem to be solved was information production and transmission. We can transfer information through the Internet It can be quickly generated and copied to every corner of the world with a network, but it still cannot solve value transfer and credit transfer. The so-called value transfer here refers to a method that everyone in the network can recognize and confirm, accurately transferring a certain part of the value from a certain address to another address, and it must be ensured that when the value is transferred, the original address is reduced The transferred portion, while the new address increases the value transferred. The value mentioned here can be a monetary asset, or some kind of physical asset or virtual asset (including securities, financial derivatives, etc.). The results of this operation must be recognized by all participating parties, and the results cannot be manipulated by any one party.
There are also various financial systems in the current Internet, and there are also many payment systems provided by government banks or third parties, but they still rely on centralized solutions. The so-called centralized solution is to put all value transfer calculations on a central server (cluster) through the endorsement of a certain company or government credit. Although all calculations are automatically completed by programs, this centralization must be trusted. person or institution. In fact, through centralized credit endorsement, credit can only be limited to certain institutions, regions or countries. It can be seen from this that the fundamental problem that must be solved is credit. So the core question of value transfer isThe topic is transnational credit consensus.
In such a complicated global system, it is difficult to establish a global credit consensus system out of thin air. Due to the different political, economic and cultural conditions of each country, it is difficult for two countries to It is almost impossible for enterprises and governments to completely trust each other. This means that whether it is endorsed by the credit of individuals or corporate governments, even if the value exchange between countries can be completed, there will be huge time and economic costs. But in the long history of mankind, no matter how different the religion, politics and culture of each country are, the only thing that can reach consensus is mathematics (basic science). Therefore, it is no exaggeration to say that mathematics (algorithms) is the greatest common denominator of global civilization and the basis for the greatest consensus among human beings around the world. If we use mathematical algorithms (programs) as endorsement, all rules are based on an open and transparent mathematical algorithm (program), which can allow all people with different political and cultural backgrounds to gain consensus.
[Future Development]
The Internet will make global interactions closer and closer, accompanied by a huge trust gap. Currently, the existing mainstream database technology architecture is private and centralized. On this architecture, the problems of value transfer and mutual trust can never be solved. Therefore, blockchain technology may become the next generation database architecture. Through decentralized technology, it will be possible to complete the huge progress of mathematical (algorithm) endorsement and global mutual trust on the basis of big data.
As a specific distributed access data technology, blockchain technology uses multiple nodes participating in calculations in the network to jointly participate in the calculation and recording of data, and mutually verify the validity of their information. (anti-counterfeiting). From this point of view, blockchain technology is also a specific database technology. The Internet has just entered the era of big data, but from the current point of view, big data is still in a very basic stage. But when it enters the blockchain database stage, it will enter the big data era of real strong trust endorsement. All data here has acquired indestructible quality, and no one has the ability or need to question it.
Perhaps we are now at a major turning point - the early stages of a major transition that is almost as profound as the changes brought about by the Industrial Revolution. Not only are new technologies exponential, digital and combined, progress and changes, but more surprises may be ahead of us. In the next 24 months, the planet will grow more computing power and record more data than it has in all of history combined. In the past 24 months, this value increase may have exceeded 1,000 times. This digital data information is growing faster than Moore's Law. Blockchain technology will not only be used in the field of financial payments, but will expand to all current application areas, such as decentralized Weibo, WeChat, search, renting, and even taxi-hailing software may appear. Because blockchain will be able toEnable humans to collaborate on a large scale in a trustless and geographically-restricted manner.
Blockchain is a technology based on which many applications have been produced, including all industry businesses related to data and information. Bitcoin is one of the most well-known applications. The popular explanation of blockchain is that if you buy a lipstick online, you first find the product you like and place an order with the seller. You first give the money to the intermediary platform. After the seller ships the goods and the buyer confirms receipt, the intermediary platform then transfers the money. Transfer it to the seller, because of the trust issue, both buyers and sellers rely on the intermediate platform, and the blockchain, as a decentralized distributed ledger database, focuses on removing this intermediate platform while solving the trust issue at the same time. In the blockchain, everyone has their own ledger to record everything that happens. If a seller takes money but does not deliver the goods during the transaction, this record will exist permanently and cannot be modified, and there is no need to interact with each other. To exchange information, the blockchain world will choose the person's ledger that records the fastest and best quality at the same time node to copy, send and connect in series. Finally, the thicker and thicker the stack is, the more blocks will be formed.
When everyone talks about virtual currencies, they often cannot do without the concept of blockchain. So what is the magic of blockchain?
Blockchain is an underlying technology, essentially a decentralized distributed ledger database. It sounds very high-end and out of reach, but it is actually very easy to understand.
For example, if you want to buy something on Taobao, the first thing you usually have to do is to open Taobao, find the product you want, place an order and pay the money to Taobao, which is the transaction intermediary. Taobao will pay the seller after receiving the goods and confirming receipt. This was originally just a transaction between me and the seller, but it has an additional "center", namely Taobao.
During the transaction process, this "center" has unlimited power and can even modify the bill at will. Therefore, the “center” often needs a strong backend to endorse it.
So, a man named Satoshi Nakamoto wanted to get rid of this center with infinite power. He wanted to create a decentralized system in which everyone is the center and everyone is the center. Have the authority to keep accounts. So, he created Bitcoin.
In the Bitcoin system, everyone has a small ledger to record every transaction that occurs. A transaction is only valid after being confirmed by a majority of people. If the seller doesn't deliver the goods, everyone's little ledger will record it, leaving him nowhere to escape.
At this time, you may have questions. Since it is just a public ledger, why is it called a blockchain? This involves the issue of consensus. The blockchain system is a system composed of many "centers". The entire blockchain belongs to all individuals participating in accounting. At this time, new problems arise. A system must be in order.can exist in the long run. If the bookkeeper can act recklessly regardless of the cost, it may happen that he originally just bought a mobile phone, but received a Tesla instead.
So, Satoshi Nakamoto invented a consensus method called PoW. This method increases the cost of bookkeeping for bookkeepers and prevents them from doing evil easily. PoW uses cryptography to require bookkeepers to compete for computing power to obtain accounting rights. The first bookkeeper to calculate the result can obtain the accounting rights of a block packaged from several transactions. At the same time, you will receive certain tokens as rewards. This is what we commonly call "mining".
Now that the bookkeeper has recorded a block containing several transactions, the system needs to be organized and sorted, and it is impossible to have countless blocks distributed in the system in an orderly manner. So it is necessary to link all blocks end to end in chronological order. At this time, the blockchain was born. The core of blockchain is technology.
IV What exactly is the blockchain?
What exactly is the blockchain? In essence, blockchain is a distributed, decentralized network database system that will make the storage, update, maintenance, and operation of data different. Blockchain has four indispensable core technologies, namely: distributed storage, consensus mechanism, cryptography principles, and smart contracts.
Then let’s talk about how blockchain is different from traditional data processing to help everyone understand what blockchain is and give everyone a general understanding of blockchain. cognition.
1. Data storage in blockchain: block chain data structure
In terms of data storage, blockchain technology utilizes "block chain data structure" To verify and store data.
What does the blockchain structure mean? Everyone has seen an iron chain, with one link within another. In fact, each link can be regarded as a block, and many links are linked together to form a blockchain.
How does this so-called "iron chain" store data? To put it simply, the difference between blockchain and ordinary stored data is that on blockchain, the data in the next block includes the data in the previous block.
Take reading as an example: when we read a book, we read page 1, then page 2, page 3...
What about in the blockchain? If each block is marked with a page number, then the content on page 2 contains the content on page 1, the content on page 3 contains the content on page 1 and page 2...Page 10 contains The content of the first 9 pages is such a chain nested layer by layer. In this way, the most original data can be traced back. This is the traceability of the blockchain.
The "blockchain data structure" of blockchain makes it traceable, which is naturally suitable for many fields, such as: food traceability, drug traceability, etc. In this way, the probability of tainted milk powder, fake vaccines, and fake and substandard food incidents will be greatly reduced, because once a problem occurs, through traceability, we can clearly know which link caused the problem, and accountability and recovery will be clearer.
2. Data update in the blockchain: distributed node consensus algorithm
In terms of data update, blockchain technology uses the "distributed node consensus algorithm" to Generate and update data.
Every time a new block is generated (that is, when data is updated), an algorithm needs to be used to obtain the approval of more than 51% of the nodes in the entire network to form a new block. To put it bluntly, it is a vote, and it can be generated if more than half of the people agree, which makes the data on the blockchain non-tamperable.
Why do you say that? Let’s make an analogy: we compare the blockchain to a ledger, because it records data. In the traditional world, the bookkeeping power lies with the bookkeeper, and the ledger belongs to the bookkeeper alone. So in the blockchain, everyone owns this account book. If you want to update the account, you must vote. Only if more than half of the people agree can you update the account data.
In this process, we will involve several terms: distributed, node, consensus algorithm. These terms are actually very easy to understand:
Everyone Accounting (that is, everyone has a ledger, and the ledger is scattered in everyone's hands) is the so-called "distributed";
The accounting method that everyone discusses, votes for, and unanimously agrees on is The so-called "consensus algorithm";
Every person participating in accounting is a so-called "node".
3. Data maintenance in blockchain: cryptography
In the data maintenance stage, the difference of blockchain is that it uses cryptography to Ensure the security of data transmission and access.
The cryptographic principles applied in the blockchain mainly include: hash algorithm, Merkle hash tree, elliptic curve algorithm, and Base58. These principles actually ensure data security on the blockchain through a series of complex operations and conversions.
4. Data operations in the blockchain: smart contracts
A smart contract is a commitment agreement defined and automatically executed by a computer program. To put it bluntly, it is executed with code A set of transaction rules, similar to the current automatic repayment function of credit cards. If you turn this function on, you don't have to worry about anything. The bank will automatically deduct the money you owe when it expires.
The outstanding advantage of smart contracts is that they canTo a certain extent, a series of problems caused by trust are avoided.
Many of us have encountered the situation of being borrowed money: a friend who is short of money borrows 2,000 yuan from you and promises to pay back the money after the salary is paid next month, but next month he finds other excuses. Also, dragging it around would be pointless. We didn't have much money, but we were still friends. Even though you were depressed, let it go.
Then, after having a smart contract, he cannot default on his debt, because in the smart contract, once the terms in the contract are triggered, the code will automatically execute, whether he wants it or not, as long as he sends Once you have earned your salary and have money in your account, he has to pay you back.
To summarize the contents of this section, there are four indispensable core technologies in the blockchain, namely: distributed storage, consensus mechanism, cryptography principles, and smart contracts.
We can understand it this way: distributed storage corresponds to the data storage stage, the consensus mechanism corresponds to the data processing and update stage, cryptography corresponds to data security, and smart contracts correspond to data operational issues.
VI Tutorials for getting started with blockchain
However, there are very few simple and easy-to-understand introductory articles. What exactly blockchain is and what makes it special is rarely explained.
Next, I will try to write a best-understood blockchain tutorial. After all, it is not difficult. The core concept is very simple and can be explained clearly in a few sentences. I hope that after reading this article, you will not only understand the blockchain, but also understand what mining is, why mining is getting more and more difficult, and other issues.
It should be noted that I am not an expert in this area. Although I have been paying attention to it for a long time, my detailed understanding of blockchain started at the beginning of this year. You are welcome to correct any errors or inaccuracies in the article.
1. The essence of blockchain
What is blockchain? In a word, it is a special distributed database.
First of all, the main function of blockchain is to store information. Any information that needs to be saved can be written to the blockchain and read from it, so it is a database.
Secondly, anyone can set up a server, join the blockchain network, and become a node. In the world of blockchain, there is no central node. Every node is equal and stores the entire database. You can write/read data to any node, because all nodes will eventually be synchronized to ensure that the blockchain is consistent.
2. The biggest features of blockchain
Distributed databases are not a new invention, and there have been such products on the market for a long time. However, blockchain has a revolutionary feature.
Blockchain has no administrator, it is completely centerless. Other databases have administrators, but blockchain does not. If one wanted to add auditing to the blockchain, it would not be possible because it is designed to prevent the emergence of a central authority.
It is precisely because it is unmanageable that blockchain can be uncontrollable. Otherwise, once big companies and groups control the management, they will control the entire platform, and other users must obey their orders.
However, without an administrator, everyone can write data into it. How can we ensure that the data is trustworthy? What if it is modified by a bad person? Please read on, this is the wonderful thing about blockchain place.
3. Block
Blockchain is composed of blocks. Blocks are much like database records. Every time data is written, a block is created.
Each block contains two parts.
Head: records the characteristic values of the current block
Body: actual data
The block header contains multiple characteristic values of the current block.
Generation time
Hash of the actual data (i.e. block body)
Hash of the previous block
...
Here, you need to understand what a hash is , which is necessary to understand blockchain.
The so-called hashing means that the computer can calculate a characteristic value of the same length for any content. The hash length of the blockchain is 256 bits, which means that no matter what the original content is, a 256-bit binary number will be calculated in the end. And it can be guaranteed that as long as the original content is different, the corresponding hash must be different.
For example, the hash of the string 123 is (hexadecimal), which is 256 bits when converted to binary, and only 123 can get this hash. (Theoretically, it is possible for other strings to get this hash, but the probability is extremely low and can be approximated as impossible.)
Therefore, there are two important inferences.
Corollary 1: The hash of each block is different, and the block can be identified by the hash.
Corollary 2: If the content of the block changes, its hash will definitely change.
4. The non-modifiable nature of Hash
Blocks and hashes have a one-to-one correspondence, and the hash of each block is calculated based on the block header (Head). That is to say, the characteristic values of the block header are connected together in order to form a very long string, and then the hash is calculated on this string.
Hash = SHA256 (block header)
The above is the calculation formula of block hash. SHA256 is the hash algorithm of the blockchain. Note that this formula only contains the block header and not the block body. In other words, the hash is uniquely determined by the block header.
As mentioned before, the block header contains a lot of content, including the hash of the current block body. , and the hash of the previous block. This means that if the content of the current block body changes, or the hash of the previous block changes, it will definitely cause the hash of the current block to change.
This point has great significance for blockchain. If someone modifies a block, the hash of the block changes. In order for subsequent blocks to still be connected to it (because the next block contains the hash of the previous block), the person must modify all subsequent blocks in sequence, otherwise the modified block will be removed from the blockchain . Because it will be laterThe reason mentioned is that hash calculation is very time-consuming, and it is almost impossible to modify multiple blocks in a short period of time, unless someone controls more than 51% of the computing power of the entire network.
It is through this linkage mechanism that the blockchain ensures its own reliability. Once the data is written, it cannot be tampered with. This is just like history, what happened happened, and it can’t be changed from now on.
Each block is connected to the previous block, which is where the name blockchain comes from.
5. Mining
Since synchronization between nodes must be ensured, the adding speed of new blocks cannot be too fast. Just imagine, you have just synchronized a block and are preparing to generate the next block based on it, but at this time, another node generates a new block, and you have to give up half of the calculations and synchronize again. Because each block can only be followed by one block, you can only generate the next block after the latest block. So, you have no choice but to sync as soon as you hear the signal.
So, the inventor of the blockchain, Satoshi Nakamoto (this is a pseudonym, his true identity is still unknown), deliberately made it difficult to add new blocks. His design is that on average, the entire network can generate a new block every 10 minutes, which is only six per hour.
This output speed is not achieved through commands, but by deliberately setting up massive calculations. In other words, only through an extremely large amount of calculations can the effective hash of the current block be obtained and the new block added to the blockchain. Because the amount of calculation is too large, it cannot be done quickly.
This process is called mining, because the difficulty of calculating a valid hash is like finding a grain of sand that meets the conditions among the sand in the world. The machine that calculates hashes is called a mining machine, and the person who operates the mining machine is called a miner.
6. Difficulty coefficient
After reading this, you may have a question. People say that mining is difficult, but isn’t mining just about using a computer to calculate a hash? This is the strength of computers. How could it be? It becomes very difficult, why can’t it be calculated?
It turns out that not any hash can be used, only hashes that meet the conditions will be accepted by the blockchain. This condition is particularly harsh, causing most hashes to fail to meet the requirements and must be recalculated.
It turns out that the block header contains a difficulty coefficient (difficulty), which determines the difficulty of calculating the hash. For example, the difficulty coefficient of the 100,000th block is 14484.16236122.
The blockchain protocol stipulates that the target value (target) can be obtained by dividing the difficulty coefficient by a constant. Obviously, the greater the difficulty coefficient, the smaller the target value.
The validity of the hash is closely related to the target value. Only hashes smaller than the target value are valid, otherwise the hash is invalid and must be recalculated. Since the target value is very small, the chance that the hash is smaller than this value is extremely slim. It may be calculated 1 billion times before it is considered a hit. This is the fundamental reason why mining is so slow.
As mentioned earlier, the hash of the current block is uniquely determined by the block header. If you want to compare the sameBlocks repeatedly calculate hashes, which means that the block header must keep changing, otherwise it is impossible to calculate different hashes. All feature values in the block header are fixed. In order to make the block header change, Satoshi Nakamoto deliberately added a random item called Nonce.
Nonce is a random value. The role of the miner is actually to guess the value of Nonce so that the hash of the block header can be smaller than the target value so that it can be written to the blockchain. Nonce is very difficult to guess. At present, we can only use trial and error one by one through exhaustive methods. According to the protocol, Nonce is a 32-bit binary value, which can reach a maximum of 2.147 billion. The Nonce value of the 100,000th block is 274148111. It can be understood that the miner started from 0 and calculated 274 million times before obtaining a valid Nonce value so that the calculated hash can meet the conditions.
If you are lucky, you may find Nonce in a while. If you are unlucky, you may have calculated it 2.147 billion times without finding the Nonce, that is, it is impossible to calculate a hash that meets the conditions for the current block body. At this time, the protocol allows miners to change the block body and start a new calculation.
7. Dynamic adjustment of difficulty coefficient
As mentioned in the previous section, mining is random, and there is no guarantee that a block will be produced in exactly ten minutes. Sometimes it can be calculated in one minute, and sometimes it may take several hours. No result. Overall, with the improvement of hardware equipment and the increase in the number of mining machines, the computing speed will definitely become faster and faster.
In order to keep the output rate constant at ten minutes, Satoshi Nakamoto also designed a dynamic adjustment mechanism for the difficulty coefficient. He stipulated that the difficulty factor should be adjusted every two weeks (2016 blocks). If the average block generation speed in these two weeks is 9 minutes, it means that it is 10% faster than the legal speed, so the next difficulty factor will be increased by 10%; if the average block generation speed is 11 minutes, it means It is 10% slower than the legal speed, so the difficulty factor of the next step must be lowered by 10%.
The difficulty coefficient is adjusted higher and higher (the target value is getting smaller and smaller), which makes mining more and more difficult.
8. Forks of the blockchain
Even if the blockchain is reliable, there is still an unresolved problem: if two people write data to the blockchain at the same time, that is to say, two people write data to the blockchain at the same time. Blocks join because they are connected to the previous block, forming a fork. Which block should be adopted at this time?
The current rule is that new nodes always adopt the longest blockchain. If there is a fork in the blockchain, it will look at which branch is behind the fork to reach 6 new blocks first (called six confirmations). Based on a block calculation of 10 minutes, it can be confirmed in one hour.
Since the generation speed of new blocks is determined by computing power, this rule means that the branch with the most computing power is the authentic blockchain.
9. Summary
As an unmanaged distributed database, blockchain has beenIt has been in operation for 8 years without any major problems. This proves it works.
However, in order to ensure the reliability of data, blockchain also has its own price. The first is efficiency. You have to wait at least ten minutes to write data to the blockchain. All nodes synchronize the data, which requires more time. The second is energy consumption. The generation of blocks requires miners to perform countless meaningless calculations. This is Very energy consuming.
Therefore, the applicable scenarios of blockchain are actually very limited.
There is no management authority that all members trust
The written data does not require real-time use
The benefits of mining can make up for its own costs
If the above conditions cannot be met, then the traditional database is Better solution.
Currently, the largest application scenario (and possibly the only application scenario) of blockchain is the cryptocurrency represented by Bitcoin.
Ⅶ How to introduce the blockchain in 3 minutes in a simple and easy-to-understand manner, and what its commercial value will be in the future
There is a real joke, an engineer from Ant Financial , he wrote a blind date resume, and the job in it was "code farmer", but no one clicked it for a long time. Later, he changed his work experience to "blockchain" and received 381 love letters at once. .
From workers in high-tech industries to square dancing aunties, it seems that everyone is participating in the blockchain carnival. So what exactly is the seemingly mysterious blockchain? After reading the following content, you will have completed the journey from beginner to beginner.
1. What is blockchain?
To put it bluntly, the blockchain is "everyone keeps accounts together." Any database needs a big housekeeper to be responsible for "accounting" (maintaining the system and entering data). But after using blockchain technology, the concept of this "central steward" disappears, and each of us can participate in accounting. So the question is, whose record will ultimately prevail? Of course, it is the person who completes the work well and quickly. A system that strictly adheres to fairness will select this person based on the algorithm, write the contents of his records into the ledger, and send the contents of the ledger during this period to everyone in the system. of others to make backups.
Any new thing must have unique advantages if it wants to develop rapidly, and the same is true for blockchain technology. First of all, blockchain technology ensures the security of the system. In the absence of a central steward, everyone is a defender of the home, which means that destroying some nodes has no impact on the system at all. Second, the recording process cannot be doneDisadvantages: Everyone in the blockchain system has the same ledger, and the entire process is open and transparent. The system will determine the final result based on the opinions of the majority. It is difficult for an individual to hack into so many computers at the same time, and it is meaningless to just modify one's own results. Who would do such a thankless task? Third, and most importantly, the blockchain completely abandons the existence of "credit intermediaries". Credit intermediaries are the platforms we must pass through when transferring money, such as traditional banks. Now any two strangers can directly complete mutual trust transfers, and the efficiency has been improved not only a little!
3. What is the use of blockchain technology? ?
As mentioned above, the main advantages of blockchain are that it does not require intermediary participation, the process is efficient and transparent, the cost is very low, and the data is highly secure. That is to say, any industry that has needs in these three aspects can use blockchain technology. Here are a few examples:
In the banking industry, the use of blockchain technology is equivalent to updating a digital, secure and tamper-proof General ledger books. In fact, Swiss bank UBS and Barclays Bank in the UK have already begun experiments, hoping to use it as a way to accelerate back-end system functions and clearing and settlement capabilities. Some institutions in the banking industry claim that blockchain may reduce middleman costs by 20 billion.
In terms of car rental, blockchain also has great potential. A future customer selects the car they want to lease, entering it into the blockchain's public ledger; then, sitting in the driver's seat, the customer signs the lease agreement and insurance policy, while the blockchain updates the information simultaneously. This is a foreseeable future for car sales and car registrations.
In terms of medical and health care, blockchain technology allows hospitals, patients and all parties in the medical benefit chain to share data in the blockchain network, and Don’t worry about data security and integrity. This means more accurate diagnosis, more effective treatment, and an improvement in the health system’s overall ability to deliver cost-effective care.
Blockchain is not cold-blooded. It has been implemented in applications that are closely related to our lives. For example, the application of Ant blockchain ranges from public welfare, to mutual insurance, to traceability of product authenticity, to traceability of rental housing.
In 2018, blockchain will "return to the world."
Blockchain, do you really understand it? Since it takes three minutes, thenSimple answer.
1. What is blockchain;
2. What are the benefits of blockchain;
3. What are the uses of blockchain;
4. Blockchain technology and existing problems;
Let’s first look at the first question: What is blockchain
Let’s look at it literally. Blockchain is called Blockchain in English. This is a very good word. The English name is well chosen and the Chinese translation is also very beautiful.
1. What is a "block"?
You can think of it as a record, or anything, which forms such a record during the production stage. This thing can be any physical or virtual object in the Internet of Everything.
For example, if you generate a Bitcoin, which is a thing, it actually corresponds to a block. This block is a record of what it is.
When you produce a bottle of medicine in the future, a block is actually generated when this bottle of medicine is produced. When it leaves the factory, it needs to be recorded once, and this corresponds to it one-to-one.
This is the first dimension.
To make it easier to understand, for example, each of us is born with a unique identifier, which is our DNA. All species in the world have different DNA. Every individual's DNA is different.
Your parents can name you Zhang San, Li Si, Wang Wu. These names can be repeated, just like a bottle of medicine, whether it is aspirin or penicillin, these can also be repeated. famous. However, human DNA is different. Even if you have identical brothers and sisters, your DNA is different, so this is your unique identifier. And once your DNA is formed, it cannot be changed. This is a benefit of the blockchain.
2. What is "chain"? The chain is actually a process. You can think of it as a transaction process. After this bottle of medicine leaves the factory, it enters the warehouse from the workshop and passes through a certain door, and it will record the process.
Of course, this requires automatic computer recording, and the cost of human recording is too high. Then, packing is a process, and transportation to the cargo transfer station is another process. Then it is loaded into a car and transported to the wholesale station, which is the next process.
Every step of the process is recorded. It is a process to go from the wholesale station to the store, it is another process for the people in the store to receive this batch of medicines and put them on the shelves, and it is still a process for you to buy them. Finally, when the whole process is connected, you will have a way to track the entire process of this bottle of medicine and know its authenticity, because once this bottle of medicine is produced, it will be bound to the blockchain, as well as to people and people. The same is true for DNA binding, which cannot be changed, but it can be seen and detected.
Doctors can also test DNADecide if this person is you. So in terms of nature, if we virtualize it, it is actually a smart contract. You have signed a sales relationship with one of your customers. Once this happens, it cannot be changed. Then everyone can only execute it. This execution process is the same as the tracking of drugs I just talked about.
Second question: What are the benefits of blockchain?
1. Mathematically speaking, it is very beautiful. It changes from the past that you had to own something before you could know its properties to that you don’t own it, but you can ask questions Learned many details about it.
Mathematically speaking, this is a perfect asymmetric situation. You can tell whether it's true or false, but you can't change it.
2. Theoretically speaking, blockchain is very safe. For example, if you participate in the process of a bottle of medicine, others cannot see this information. That is to say When you buy this bottle of medicine, you can know where it comes from, but others cannot.
For the same reason, for example, if we sign a contract, others can verify the contract. If you go to a bank for a loan, he can ask you the amount.
However, he cannot obtain this contract, and he cannot steal this contract from your computer.
Blockchain also has some very interesting properties. For example, a block chain can be divided into two at will, or several can be combined into one, etc.
3. Blockchain is transparent, which means that everyone abides by this algorithm and there is no special agreement in private. So, if you believe in this algorithm, it means you believe in me and believe that I didn't do anything fishy. I will not secretly do anything in the contract to make you suffer losses.
This is a beautiful place theoretically and mathematically.
In the third block, let’s take a look at the uses of blockchain
1. Bitcoin is a cryptocurrency, and the Ethereum currency that everyone uses now is also a cryptocurrency. Of course, you can make another one based on it, either Zhang three coins or Li four coins. As for whether it can replace the currency of the future, this is doubtful.
2. Financing, we used to divide financing into three stages: the first stage is to get a loan from the bank. If you want to open a restaurant, you need to mortgage something. The second stage is that you issue some stocks and I sell 10% of the stocks, so that I can obtain part of the funds.
The third stage is actually crowdfunding. For example, if I want to write a book, it may cost 50,000 yuan for the publishing house to publish it. If any of you can give me 50 yuan at the beginning, I will use it in the future. Once the book is written, give everyone a copy. You will get the book, and of course I will publish it. But there is a problem. For example, if I sell this book for 100 yuan and you get it for 50 yuan, what if I sell it for 100 yuan?The book is selling very well, let’s say 100,000 copies have been sold, but you don’t seem to have benefited from me, what should I do?
Is there a fairer way to measure everyone's contribution? One way is to issue a cryptocurrency (ICO). When the business we do becomes bigger in the future, you can benefit from it.
3. Smart contract, for example, sign a contract. In the future, the smart contract can become like this. All the nodes in the middle are determined when the contract is signed, such as building or decorating a house for you. , your payment must be given to me at any stage of the decoration. If you accept it, no problem, the payment will be automatically given to me.
You can even sign with my supplier, which means that as soon as my money arrives in my account, I will give it to my supplier immediately. This will eliminate many triangular debt problems in the future, including the problem of arrears to migrant workers.
Blockchain can also be used for property registration, car registration, etc. Of course, another great use is gambling. In fact, gambling is the most willing to adopt new technologies because it is closely related to money.
After talking about the benefits of blockchain, let’s take a look at the technology and existing problems of blockchain.
Today’s blockchain is basically the second generation and the first generation. It is the Bitcoin generation. It has many problems. It is not a platform, but is actually a specific application.
The second generation is represented by Ethereum. It is a platform on which you can issue your own coins, and it removes the concept of mining machines, so its transaction costs will be much lower. . The reason why ICOs are everywhere today is because with Ethereum, you can issue coins. Unlike in the past with Bitcoin, you had to completely copy its formula and copy it again. Today you are on Ethereum. , it is easy to issue your own currency, just like you can easily make your App on the Android operating system today.
There are three problems with Bitcoin transactions
1. The transaction delay is very long. I asked people who specialize in Bitcoin transactions and the delivery time ranges from two hours to two hours. Days wait, so it is very inconvenient for you to use it to launder money. After the RMB is converted into US dollars, it may fall by 20% in two days, and you will lose 20% of your money.
2. It cannot be distributed. Like Bitcoin, the early people took away a lot of its shares, so how to distribute it in the future is also a problem. No one knows clearly, so it is difficult to use it as a currency. a currency. Because if it really becomes a currency that everyone uses, it will be equivalent to the first few people taking away a large part of the world's property.
3. Transaction costs are high. For example, a cup of coffee at Starbucks in the United States costs $2.50 on average. You usually pay money at the counter, and the transaction time is only one minute. If you want to use Bitcoin, you have to wait two hours before you can drink coffee and tradeThe cost is extremely high, the electricity bill alone is $20. In other words, if you pay $2.50 for coffee, the transaction cost of electricity is $20, so this is unrealistic.
Blockchain has high risks. This risk is not only a technical risk, but also a policy risk. In fact, this is also an opportunity. Whoever solves this problem will get the opportunity. Its transaction costs are also very high, so whoever can develop new underlying technologies and reduce this transaction cost will make a lot of profits in the future.
Some people say it is the next generation of the Internet. I don’t agree with this, but it will definitely be a supplement to the Internet. Some people say whether it can subvert the central bank, but this is not certain, because there is no reason why the central bank or these big banks cannot do this themselves, so those who expect it to subvert the central bank may be too happy too early.
Perhaps in the end it was these large financial institutions in the past that used the blockchain to update themselves.
Talk in the vernacular and get useful information!
Literally, blockchain is blocks and chains, and some relationship between them. It is essentially a distributed accounting method and a network database system that cannot be tampered with.
The current development directions include digital currency, payment, smart contracts, defi finance, web3 and so on. It is still in the initial stage of development and is a back-end technology. Most projects are still speculating and financing.
Today’s Afghanistan may best prove the value of Bitcoin, and there is no problem with value storage
Blockchain is not just a technology, it is a way of trust transfer, value The way it is delivered may have huge potential in the future.
Keywords: block, chain, database, ledger, Afghanistan, currency speculation, value, technology, market
First, what is a blockchain? Blocks and chains are an accounting method and a form of network data storage.
Literally speaking, blockchain refers to blocks and chains. This block actually records the transaction records of the entire network, or the execution result data of smart contracts, etc.
Every once in a while, the entire network will produce a block. This block records all transfer data, and the blocks need to be connected by some kind of "chain".
This chain is an encryption algorithm. Some information of the previous block is used to calculate and obtain certain information of the next block. They are linked together. The latter block can trace back to the previous block and needs to be modified. The next block must modify the previous block, all the way to the first block. Regarding the details of these issues, I have written many articles before. If you are interested, you can go back and take a look.
Blockchain is actually an accounting method, or a database storage method. Please pay attention to what I say below. The whole process is the operating mechanism of blockchain.
All over the networkThe nodes have the same status and run the same program. This program is used to collect, encapsulate and package all transaction record data records that occurred in the entire network within a period of time. Then broadcast it to the entire network
Let’s take Bitcoin as an example. Once this packaging and encapsulation is completed, you can obtain the right to produce the block. A certain amount of Bitcoin can be issued every time a block is produced. Since the nodes in the entire network run the same program, there is no center to control everyone. Therefore, the currency issued is irrevocable and cannot be changed.
How to decide who has the right to make a block? This requires the use of the so-called consensus mechanism, which is to establish a rule and use who produces the block as the benchmark to solve the problem of network consistency. The mainstream consensus mechanisms include POW mechanism and POS mechanism. Proof of work and proof of stake. Proof of work, who does more work, and proof of equity, who stakes more assets
Pow means that everyone calculates a difficult mathematical problem together, whoever calculates it Whoever comes out has the right to produce the block. Pos means that everyone takes out their family assets as mortgage, and whoever mortgages more. It is possible to be selected as a block producing node.
The essence of this approach is that you have to pay a certain price and receive a certificate of investment, which essentially builds a kind of trust.
When all these tasks are completed, a block can be produced, and the block will be connected to the previous block one by one. This is the entire block sequence. Note that the entire blockchain world will produce many blocks, connected to one chain after another, but everyone will only recognize the longest chain, and short chains will be discarded.
To put it simply, each network node uses a program to package transactions within a period of time, and then connects the transaction blocks one after another and saves them in each node, but an encryption algorithm will be used in the process. Ensure that node information is not leaked, ensure that user information is encrypted, and ensure that the information in the block is not cracked or tampered with
Second, the block The current development of the chain, various projects and significance, at this stage are more about currency speculation, and there is no problem with value storage.
Blockchain has been developing for twelve or three years since the Bitcoin white paper in 2008. It has also experienced various evolutions and developments.
For example, now it has gone from being able to issue currency in a distributed way to now having huge functional expansion. The landmark event is the birth of the Ethereum smart contract.
I have explained many times that a smart contract is an automated contract signed by two or three parties. It will be automatically executed as long as the conditions are met. It is essentially a program with infinite possibilities and the judge in the blockchain world. Various functions can be input into the program, and the program exists. Blockchain has become rich and colorful.
Current blockchain applicationsMainly in the following aspects, smart contract type, payment type, cross-chain asset type, oracle type, defi type, web3 storage type, etc. I will briefly give two examples to talk about its commercial applications.
For example, defi applications are quite popular on Ethereum now. Defi is decentralized finance. Abbreviation for decentralized finance.
What does it probably mean? It is to move all financial-related businesses in real life, such as mortgages, insurances, and loans, onto the blockchain.
This field is very popular now, and the reason is simple. It is very suitable for blockchain. As I said, a smart contract on the blockchain is a contract. If the contract conditions are met, execution can be automatically triggered.
In the past, it might have been very troublesome for you to go to the bank to apply for a loan. You had to sign various signatures and verify them, and the bank might not be open on weekends and nights
But with blockchain The network operates 24 hours a day. If you want to run various assets on it and do various mortgage transactions, you only need to click and there is a software terminal.
Of course, the real assets will be frozen in the process and mapped to virtual assets. After the transaction is completed, they will be exchanged for real assets. Cross-chain technology and oracle technology may also be used in this process, which I have written in detail in other articles.
It roughly means cutting off banks through decentralization, and direct point-to-point transactions. The security of transactions is guaranteed by blockchain technology, code and cryptography.
There is also the current web3 storage class. For example, the leading project fil. His vision is to take out all the scattered hard drives. Break all the data and information that need to be stored on the network into small pieces
and then distribute them to the entire network. When we want to use network data in the future, we no longer need large network database or server. In this way, Internet giants cannot charge high service fees. There is no way to maintain a monopoly.
If you want to obtain stored information, just take a taxi online like dd. You pay for a taxi, so that information on the Internet can flow freely. Costs will drop significantly.
Of course, these visions are grand and huge, and the current blockchain development is still in its early stages. There are still some technical difficulties to be overcome and some underlying systems to be established, but there is no problem in this direction.
The original digital asset projects like Bitcoin have now been proven to be very safe. Just like this situation in Afghanistan, the first thing that comes to my mind is Bitcoin. He is the first violent and unplunderable asset.
Your house may be occupied and blown up, and your gold may be robbed. And if you have Bitcoin, it's much easier. No one can snatch this thing away because the mnemonic phrase and private key are in your brain.In his heart, he doesn't even know if you have this thing in your mind. If you want to pass it on to your child, just ask him to memorize the key and mnemonic phrase.
It is precisely because we are now in a stage of financing and bubbles that all the news you see on the Internet is still speculation.
Also, this thing is a back-end technology. For example, Guangdong Province already has blockchain invoices. For example, there are already some blockchain apps for judicial certification, but for the front-end For you, you can't feel it. There is an extra string of hash codes on the invoice, can you tell the difference?
This is why when it comes to blockchain now, everyone is speculating on coins, but in fact it has certain applications and future technical logic.
Third, it is essentially a mechanism of trust, a method of value transmission, and an exploration of social governance methods.
What is the essential value of blockchain? The most important thing is that it is a way of credit transfer. Because there is enough credit, real-life assets and property values can be spread on the Internet in the form of information codes.
Mainly in these aspects.
First, before Bitcoin, people did not know how to protect a piece of information, because information on the Internet can actually be copied. Bitcoin solves the problem of uniqueness of information assets. With scarcity, there is value in transactions and storage.
The second is decentralization and disintermediation. We used to do everything. All require some kind of intermediary. For example, when you borrow money, a bank acts as an intermediary, and when you buy a house, various institutions and real estate agencies act as intermediaries.
You cannot buy or sell directly. Because you don't have enough credit. We usually come to find a third party, but the third party is usually made up of people and may also do evil.
For example, the master who could whip five lightning whips a while ago. If he calls you all kinds of names at the beginning, you may be frightened. You won't know he is a liar until he is punched and lying straight there. This is human credit, which is unreliable
Blockchain ensures credit through code, cryptography, and consensus mechanisms. We no longer need a powerful third party. Note that this third party will often become a monopoly boss.
The third is to reduce the cost of coordination, communication and entry barriers.
If we want to become richer, we need to trade in the market. And transactions require coordination and division of labor. Essentially, the companies and organizations we work for are intermediaries.
You have to integrate your resources through this kind of intermediary, transform your labor force, your brain power, and your ingenuity into final products and sell them on the market.
The smart contract technology of blockchain technology can break up these contracts in a decentralized manner. people in marketThey can combine freely to establish a new type of organization that is completely transparent and cannot tamper with the rules, which is a blockchain autonomous organization. The future of this kind of organization may be more promising than that of ordinary joint-stock companies.
You can join or quit an organization at will, and the trust between you and others has been resolved. You can cooperate with others and sign smart contracts to complete joint collaboration and complete a certain product. We no longer have to worry about some big capitalist taking advantage of everyone and getting the bulk of the profits.
So the Bitcoin blockchain is essentially a big social experiment, through the consensus mechanism, the decentralized decision-making method, and the distributed signing of smart contracts. Gradually and completely change the original appearance of our society. Restore the original ideal of market economy, peer-to-peer, direct transactions between people.
To summarize. Blockchain is a block of information connected together through an encryption algorithm. It is essentially an accounting method and a network data structure
Through decentralization, you can do finance, storage, and decentralize many things, but now it is still very In the initial stage, most projects are still in the stage of speculation, financing and concept development.
The value storage capability of the blockchain has been proven to be problem-free, very safe, and cannot be plundered by violence.
The essence of blockchain solves the problem of credit intermediary, and at the same time can reduce the cost for people to work together, lower the threshold for enterprise entry, improve social efficiency, make social transactions larger, and allow We are richer.
I recommend the book linked below, it is easy to understand. Like You Pump tells the history of the birth of blockchain, the underlying technical logic of blockchain, and some mainstream projects. Learn some knowledge about blockchain, feel more at ease, and no longer worry about whether it is a scam.
VIII Easy-to-understand explanation of blockchain
A simple explanation of blockchain technology is as follows:
In simple terms: Blockchain is a new generation network system formed using a package of existing network technologies. This network system has a new structure, a new mechanism, and unprecedented new value. Five major technologies or innovations are specifically used: encryption technology, P2P network technology, distributed storage technology, consensus mechanism, and smart contracts.
Essentially: it is a shared database, and the data or information stored in it is "unforgeable", "full-process traces", "traceable", "open and transparent" and "collectively maintained" ” and other characteristics. Based on these characteristics, blockchain technology has laid a solid foundation for "trust-based sales" and created a reliable "cooperation" mechanism. Yunchun has broad application prospects.
2. Openness.
In addition to the private information of the transaction parties being encrypted, the data in the blockchain is accessible to everyone.It is public and provides a flexible script code system. The entire system information is highly transparent, and within the rules specified by the system, nodes cannot deceive each other.
3. Autonomy.
Consensus technology, smart contracts.
Ⅸ Hot! Create and play with your own blockchain in 5 minutes
Blockchain is developing so fast this year! From an unfamiliar concept at the beginning, it has now taken off in various industries. A single spark has the potential to start a prairie fire. I really hope I can have my own blockchain to practice with! But how can one person and one computer set up a blockchain environment? The blockchain is so popular that it is not easy to say that I love you!
Don’t Worry! The editor has been addicted to blockchain and smart contracts and can’t extricate himself! Now I will take you step by step to start from scratch and create your own blockchain in 5 minutes! ~
The SuperVessel platform developed by IBM China Research Institute provides a blockchain development and testing environment for blockchain enthusiasts and developers. Through this platform, users can create multi-node blockchains based on Hyperledger Fabric for free and super quickly, and play with smart contracts on their own chains.
----
0.
Preparation
All you need is your local browser!
1. Register an account
Access the public beta address of SuperVessel blockchain service: 8800/bc.
Click the Log in button in the upper right corner, click Register in the pop-up window, fill in your email and password and submit. At this time, it is recommended to check the activation email in your mailbox and activate your account (Editor's tip: It doesn't matter if you activate lazily, but some advanced services must be activated before they can be used).
2.
Quickly create your own blockchain
After registration is completed, return to the homepage and click on the huge GIVE ME A BLOCKCHAIN (Give me a blockchain!) button. Select the Consensus Plugin (consensus plug-in) and Size (number of blockchain network nodes) you want in the pop-up box.
Editor's note: Currently there are two consensus plug-ins officially provided by Hyperledger Fabric: noops and pbft.
After clicking Submit, you will get your own blockchain in a few seconds and automatically enter the monitoring panel. That’s right, getting your own blockchain is that simple!
After entering the monitoring panel, you can see that the left side is the smart contract management panel, including the management and deployment of smart contracts; the right side is the network panel, which displays the applied blockchain network status, topology, and connections between nodes. Delay information, etc. are clear at a glance; click the telescope icon in the upper right corner to view real-timeMonitor the log information of each node. The bottom is the blockchain panel, which shows the overall situation of the current blockchain. In the initial state, there is only one block.
3. Deploy and use smart contracts
Next, the editor will teach you how to deploy and use smart contracts on your own blockchain.
Under the Smart Contracts tab of the smart contract management panel, 2 smart contracts are listed as examples, namely map and chaincode_example02. The map contract can store key-value pairs, and the chaincode_example02 contract can simulate transfers and queries between two people.
Editor's note: The code for these two sample contracts can be found in the Hyperledger Fabric source code.
Take the deployment and use of the chaincode_example02 contract as an example:
Deploy the contract
Click the Deploy button corresponding to the chaincode_example02 contract, and fill in the initialization value of the contract, including the contract name, initial function, and initial parameters. The initial function of the contract is init, and the initial parameters need to be filled in according to the format, such as ["a", "100", "b", "200"], which means registering two people a and b, giving them 100 units and 200 units respectively.
Click the Deploy button and the contract will be deployed in your blockchain. The process will take about 20 to 40 seconds. When a new block appears on the blockchain panel, it usually means that the contract has been deployed.
Call the contract
After the deployment is completed, view the deployed contract instance under the My Deployment tab of the smart contract management panel.
Click the Invoke button below the Action to call the smart contract, and fill in the called method name and corresponding parameters (the method names and parameters of different contracts have different meanings, which are related to the content of the contract). For this contract, call the invoke method name and fill in the parameters ["a", "b", "50"], which means a transfers 50 units to b.
After clicking Submit to complete the call, you can view the blockchain situation and a new block will be generated.
Query Contract
After the call is completed, you can query the contract execution results. Still under the My Deployment tab, click the Query button under Action to query the smart contract, and fill in the query method name and corresponding parameters. If you select the query method name and fill in the parameter ["a"], it means querying the current unit of a.
After clicking Submit, you can see that the current unit of a is 50. You can try query b again!
OK, then you can continue to operate the contract, observe the blockchain situation, orDeploy a new smart contract on it, such as map. For ease of use, the method names and parameter formats for deploying, calling, and querying contracts are all filled in by default. You only need to select a method name and change the parameters as you like! See how long you can play with the chain~
4. Upload and test your own private smart contract
In addition to the two public smart contracts currently provided, you can also upload and test your own private contract! Private contracts can only be seen by you.
Click Import private smart contract under the Smart Contracts tab.
After filling in the contract name and description, and uploading the contract code file, click Import to complete the upload.
Then the contract I uploaded will appear in the Smart Contracts list and can be deployed, called and queried as before.
Ⅹ What is blockchain in simple terms
Blockchain is a term in the field of information technology. Essentially, it is a shared database. The data or information stored in it has the characteristics of "unforgeability", "whole process traceability", "traceability", "openness and transparency" and "collective maintenance". Based on these characteristics, blockchain technology has laid a solid foundation of "trust" and created a reliable "cooperation" mechanism, which has broad application prospects.
On January 10, 2019, the Cyberspace Administration of China issued the "Blockchain Information Service Management Regulations". Blockchain has entered the public eye and become the focus of society. From a technological perspective, blockchain involves many technological issues such as mathematics, cryptography, the Internet, and computer programming.
Extended information:
From an application perspective, in short, blockchain is a distributed shared ledger and database, which is decentralized, non-tampering, traceable, traceable, and collective. Maintenance, openness and transparency. These characteristics ensure the "honesty" and "transparency" of the blockchain and lay the foundation for establishing trust in the blockchain. The rich application scenarios of blockchain are basically based on the fact that blockchain can solve the problem of information asymmetry and achieve cooperation, trust and coordinated action among multiple entities.
Blockchain is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism and encryption algorithm. Blockchain is an important concept of Bitcoin. Essentially, it is a decentralized database. At the same time, as the underlying technology of Bitcoin, it is a series of data blocks associated with cryptographic methods. Each data block contains a batch of Bitcoin network transaction information to verify the validity of its information (anti-counterfeiting) and generate the next data block [8]. In fact, the word blockchain does not appear in the original English Bitcoin white paper, but blockchain. In the Chinese translation of the earliest Bitcoin white paper [9], blockchain was translated into blockchain language. This is the earliest time when the Chinese word "blockchain" appeared.