区块链节点被删除怎么恢复,区块链节点被删除怎么办
近来,区块链技术正在快速发展,越来越多的企业开始投资区块链技术,但是在实际操作中,如果区块链节点被删除了,那么如何恢复是一个重要的问题。本文将介绍如何恢复节点,以及恢复节点的相关关键词:备份、更新和配置。
备份:备份是恢复区块链节点的基础,也是最重要的一步。在备份之前,需要先进行完整的节点检查,以确保节点的完整性和安全性,然后再进行备份。备份的方法有多种,可以使用硬盘备份、网络备份、云备份等,根据实际情况选择最合适的备份方式。备份完成后,可以保存备份文件,以备以后恢复节点使用。
更新:更新是恢复区块链节点的重要一步,更新的内容包括节点软件、操作系统、驱动程序等,这些更新都是为了提高节点的安全性,防止节点被攻击。在更新之前,需要先检查节点的硬件及软件环境,确保节点的完整性,然后再更新节点的软件及操作系统,以便提高节点的安全性。
配置:配置是恢复区块链节点的最后一步,也是最重要的一步。配置的内容包括节点的IP地址、端口号、节点名称等,这些配置都是为了让节点能够正确的连接到网络,从而实现节点的恢复。在配置之前,需要先检查网络环境,确保网络的安全性,然后再配置节点的IP地址、端口号、节点名称等,以便节点能够正确的连接到网络。
以上就是区块链节点被删除怎么恢复的相关关键词:备份、更新和配置,每个关键词都有其特定的作用,只有按照正确的步骤进行操作,才能有效的恢复节点,保证节点的安全性。
请查看相关英文文档
A. The most straightforward explanation of blockchain
In recent years, the term "blockchain" has become a hot topic, and news media have been reporting on it, but you may The understanding of blockchain is still in the foggy stage. Today we will unveil its mystery.
In fact, the essence of blockchain is very simple and can be explained in one sentence: decentralized distributed database.
The main function of the blockchain is to store information. Anyone can write information and read it at the same time, so it is a public database.
Characteristics of blockchain
Distributed database technology has long existed in the market, but the difference is that although blockchain is also a distributed database , but it has no administrator and is completely decentralized.
Decentralization is a disruptive feature of blockchain technology. It does not require a centralized agent and realizes a direct point-to-point interaction, enabling high-efficiency, large-scale, and information interaction without a centralized agent. way becomes reality.
However, without an administrator, everyone can write data into it. How can we ensure that the data is trustworthy? What should I do if I am changed by a bad person? The designers have already thought of this, which proves that blockchain is a truly epoch-making product.
Block
The 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:
Block header (Head): records the characteristic value of the current block
Block body (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
...
Every time in the system Each node has the latest complete database copy. Modifying the database of a single node is invalid because the system will automatically compare and consider the same data record that appears the most times to be true. At the same time, every step of the data record will be retained on the blockchain, and the information at each step can be traced.
Here, you need to understand what a hash is, which is necessary to understand the blockchain.
The so-called "hash" 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), converted toBinary is 256 bits, 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 approximately considered 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.
The immutability of hashes
Blocks and hashes have a one-to-one correspondence, and the hash of each block is for the "block header" (Head) computational. 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 includes the block header and not the block body. In other words, the hash is uniquely determined by the block header.
As mentioned earlier, 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 is of great significance to the 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 . Due to the reasons mentioned later, 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.
B. If the currency is to be cut off, where will the research and development of the Leek Blockchain go?
Conclusion:
1) According to Tianyancha Statistics of website search results;
2) Since the industrial and commercial bureaus across the country have inconsistent operating standards on whether to advance "blockchain" in company names and business scopes, there may be a large number of companies actually carrying out blockchain operations. The research and development of chain technology is not reflected in the name and business scope, resulting in the situation that it cannot be included in the statistical results.
Data shows that Guangdong, especially Guangzhou and Shenzhen, has accumulated a large number of blockchain companies. Compared with other provinces, Guangdong is almost unparalleled in attracting blockchain companies to settle in. The vast majority of these companies were registered within the past year.
In actual operation, if you set up a company in Guangzhou and Shenzhen, it can be reflected in the name, such as Guangzhou ABC Blockchain Co., Ltd., or you can add "blockchain technology development and application" or "Internet" to the business scope. Blockchain technology research and development services” and the like.
We believe that the application of blockchain industry will accelerate in the future. Its decentralization, disintermediation and anonymity will not only bring new challenges to enterprise management and government supervision, but also will It will bring more opportunities, realize data transparency, information disclosure, efficient management and operation, and gradually spread the physical implementation of blockchain technology to various fields.
C. Explain blockchain in vernacular
img src=' https://p26 . toutiaoimg.com/large/39b 70000088 e 51 B3 c 258 39/
Recently, various ICO financial scams have been blocked in China, but this does not hinder the vigorous development of blockchain technology. After all, technology is innocent and can bring benefits to people. As for how to use it, it depends on people to operate it. If the operation is good, you can recommend development. If the operation is not good, it is like the major ICO projects. Find some knowledge for Internet celebrities to conduct so-called illegal fund-raising and financial fraud.
After talking for a long time, what is blockchain? When it comes to blockchain, the first thing that comes to mind for many people is Bitcoin. We need to solve a problem. Bitcoin is a blockchain, but blockchain is not Bitcoin. Simply put, blockchain is distributed ledger technology (DLT), not a token. It has many characteristics, such as decentralization, traceability, and difficulty in tampering.
(1) Blockchain is a distributed database
First of all, this is a decentralized distributed architecture system. Therefore, having only one central server or node is not called a blockchain. For example, if you go to Taobao to buy a mobile phone, you and the seller are strangers and have no basis for trust. If you give the money to the seller first, the seller may block you by not delivering the goods, and then your mobile phone money will be gone. If the seller ships first, do you pay? It is possible that you do not pay the seller after receiving the goods, and one party may lose money anyway. At this time, a third-party guarantee is needed to solve the trust problem. Just like Alipay now, you give money to Alipay and the seller will deliver the goods. When you receive the goods, the seller will receive the money.
The above example is a centralized system because all guarantee work is handled by Bora, a third-party payment company. Suppose one day Alipay wants to tamper with data, neither buyers nor sellers can do anything because all authority is in the hands of one company.
At this time, a distributed database is needed. This third party is no longer Alipay, but thousands of monitors. When you buy a mobile phone on Taobao, you will shout to everyone that I am going to XXX to buy a mobile phone, and I paid XXX yuan. The other person will yell like everyone else. I collected XXX’s mobile phone bill and sent it over. This way everyone knows about this deal, bigEveryone is recording this transaction, so it is useless if one or two nodes have problems or malicious behavior, because most nodes have recorded this matter.
(B) Blockchain uses encryption technology to ensure data security
There are two important points here: 1. Crypto-enabled hash function 2. Asymmetric encryption.
If you are interested in specific concepts, you can go online, but people without basic knowledge may not be able to understand it, because these two points are too professional. In fact, if you only know the use of blockchain, you don’t need to have an in-depth understanding of it. It is also a technical concept. All you need to know is that blockchain relies on these technical points to ensure data security and is not easily tampered with. Of course, many people say that these two points can guarantee 100% non-tampering. I want to be a little conservative here. As an author who works in the security industry, I have always been skeptical about 100% security, so it may be more appropriate to call it difficult to be tampered with.
I will briefly introduce these two concepts and try to explain them clearly in plain English.
1. Cryptographic Hash Function
This is mainly used to verify the integrity of information. For example, I sent a message to the company leader saying that I was sick on Friday and needed to take a day off. At this time, a hash value will be generated based on the message I sent, such as: 123456. At this point, when the leader receives this message, a hash value is also generated. Because the content of the message I sent has not changed (it has not been tampered with), the hash value remains unchanged, still: 123456. This is if someone wants to tamper with this news and get sick on Friday and need to take a year off. At this time, the hash value will change, such as: 123489. That's when we learned our information had been tampered with.
2. Asymmetric encryption
It is mainly used for information encryption and authentication. It is actually two keys, one is called the public key and the other is called the private key. Public key encryption, private key decryption.
A public key is a key that everyone has. You own it, I own it. We can all encrypt with this key, but when decrypting it must be decrypted with my private key. If you don't have my private key, you can't decrypt it.
(C) The blockchain uses a consensus algorithm to reach consensus on new data.
The role of the consensus algorithm is to enable all nodes to reach a consensus on the new block. In other words, everyone must approve the new block.
For a centralized deployment system, this is simple, everything is controlled by the center, but in the distributed system of the blockchain, it is very complicated. For example, there are three nodes. A said he bought a mobile phone from XXX store and paid for it, B said he didn’t pay, and C said he didn’t pay enough. Then who do you listen to? What's more, blockchain technology is not as simple as three nodes, but a huge distributed system.
This is when a solution is needed. There is a corresponding problem in computer science called the "Byzantine Universal Problem" or "Byzantine Fault Tolerance" (BFT). This question was raised not because of Bitcoin, but because of a special background.
Early aircraft had three independent control systems. Why do we need three independent control systems? For example, in an emergency, the other sideThere are planes. How to judge whether you should hide? If there is only one system, there is no choice, which is equivalent to centralized deployment. If the system breaks, you're dead. What if one of the two systems breaks? The good ones are said to hide, and the bad ones are said not to hide. The computer cannot judge the final result. Therefore, three independent systems are needed to support it, and the probability of two total failures is still very small. But this only takes into account injuries. What should I do if there is a malicious system? Is three enough? The answer is no, we need four systems to maintain consensus.
The use of blockchain is similar, because it is supported by a huge number of nodes, and each node is an independent system without interfering with each other. We can assume that the number of failed nodes and malicious nodes is limited, so it will not cause abnormal consistency of data.
Related questions and answers: What is blockchain? What is the use?
Blockchain is a new computing paradigm and distributed infrastructure that uses fast chain data structures, distributed node consensus algorithms, cryptography and smart contracts based on automated script codes to produce, verify, store and transmit data. It can also be said that blockchain is a distributed ledger technology that can provide a decentralized trust mechanism in a non-trust environment, allowing multi-party participants to conduct secure and trust-based transactions without intermediaries.
The core advantage of blockchain technology is decentralization. It can realize decentralized credit-based transactions in a distributed system where nodes do not need to trust each other by using data encryption, timestamps, distributed consensus and economic incentives. Point-to-point transactions, coordination and collaboration provide solutions to the common problems of high cost, low efficiency and insecure data storage in centralized institutions.
The fields of use of blockchain include digital currency, certificates, finance, anti-counterfeiting and traceability, privacy protection, supply chain, entertainment, etc. With the popularity of blockchain and Bitcoin, many related top domain names have been registered. It has had a relatively large impact on the domain name industry.
Related Q&A: Can you explain to me what a blockchain is in an easy-to-understand way?
Er Gazi is my friend since we were young, and we were naked in Hegou together. Later, I came to the city to study and work, and lived a life as a drifter in the north; he farmed at home and did some small business, and now he has a son and a daughter, and his life is safe. He envied my so-called "seen the world", and I envied his simple life without the pressure of mortgage loans. We have completely different and mutually enviable lives??
That day, Gazi came to me on WeChat and asked "District" What is a blockchain?" I was stunned for a moment, how could this idiot care about such an avant-garde word? I pretended to be calm and prepared to talk about the technical principles bit by bit, but I could see the confused expression of that idiot through the screen of my mobile phone. How to explain "what is blockchain" to people who have a little bit of Internet concepts and technical foundation? This seems to be a very thorny problem??
The village commissary interprets the core of blockchain (picture quoted from the Internet)
The core essence of blockchain is "decentralization", and almost all operating modes of blockchain operate around the concept of "decentralization". Once you understand what “decentralization” is, thenThis basically explains the question "What is blockchain?" For Erga, of course, he must perform a version that he can understand.
“I said, Gazi, are you still open that canteen at the east end of the village?” Gazi answered yes. I decided to use this canteen as an example to explain the actual use of blockchain in modern business and financial models. Scenario, so that he can better understand what blockchain is.
"Are there still many villagers who take credit now? By the end of the year, some of the accounts cannot be remembered clearly, and there are still many defaulters or those who refuse to accept their accounts?" At this point, Ergazi got emotional and kept complaining. Nowadays, people's hearts are not as old as before, and business is difficult to do!
"In the past, the operation model of your canteen was a typical centralized one. You granted credit to the villagers and allowed them to take accounts on credit. All accounting was done directly through you and our villagers. You were the center of all accounting affairs." Ergazi said I understand, let me continue.
I said: "If you fail one day, then all the accounts will become dead debts? It will be difficult to get back the IOUs written in black and white, let alone those who remember the accounts verbally, but the block The decentralization of the chain can solve this problem very well. As long as the earth still exists, the blockchain will remember that every account will exist forever." Erga became more energetic after hearing this.
The essence of blockchain is “decentralization”
“The essence of blockchain is decentralization. Once someone takes credit from you, all the neighbors in the village will help you keep accounts. Because of the accounting There are many nodes, and it is neither easy to make mistakes nor others to default on the debt, so everyone reaches a consensus. If someone maliciously fails to pay back the debt, the whole village will know his character, and no one will be willing to have financial transactions with him in the future? ?”
At this point, Gazi was obviously a little excited. It seemed that he was really worried about the credit issue. Seeing that Gazi was interested, I felt a little sense of accomplishment and continued: "Of course, the above is just an analogy. In fact, the blockchain does not really allow the villagers to get paper and pen to help you keep accounts, but through the Internet It was completed by networking with the computer."
At this time, Gazi was a little confused and asked: "Then everyone in the village knows what others bought from me, so who would buy from me? There is no privacy. And you don’t have time to keep accounts here. Last year’s accounts are said to be this year’s. What if you keep delaying it?”
“Okay, Gazi, you are on to the point of asking this question.” It seems that Gazi is not stupid at all, and is still very smart in doing business. I continued to explain: "So, the recording and transmission of this information are all done through encryption. What you see is a string of numbers and English, and each account has a timestamp to record the time it occurred. , can't be relied on."
Gazi had another question: "Could it be that the people who owe the debt have a good relationship with the villagers, and they join forces to tamper with the accounting? Then it will be unclear what to say? ?”
“Gazi, that’s all you have to be careful about, haha.” I understood Gazi’s concerns and continued to explain: “The mechanism of the blockchain requires more than 51% of people to agree to tamper with a bill. Yes. Between peopleEveryone has a close relative, and it is impossible for everyone to favor the same person. If it were a computer, more than half of the computers on the entire network would need to recalculate. This project would be so huge that it would be almost impossible to complete??"
In this way, through the actual situation of the canteen and combined with some scenes in life, Gazi understood What is in the blockchain: decentralization, distributed accounting, consensus mechanism, encryption mechanism, timestamps, and the characteristics of being difficult to tamper with.
Ergazi was silent for a moment, seeming to be digesting the example I just gave him. I don’t know how much he can understand the example. Not long after, he sent me a voice message on WeChat: “What does blockchain mean? In the past, when I bought goods online and paid, I had to go through Jack Ma’s house. If there is a blockchain, can we directly trade with the seller? Anyway, the accounting is very safe. "
"Okay, Gazi, it's really clear at first glance. Blockchain is essentially a decentralized distributed ledger data cloud. Of course, it can be understood according to your understanding. "I'm very happy that Gazi can roughly appreciate the true charm of the blockchain. Fortunately, my words have not been in vain.
What is Bitcoin? (Picture quoted from the Internet)
"Then Bitcoin What is this thing again? What does it have to do with blockchain? "Gazi asked.
I thought about it briefly and decided to continue to explain to Gazi with the story of the canteen: "In your canteen, the villagers can't keep accounts for you for free all day long. Do you have to carry some during the holidays? This is the reward mechanism of the blockchain, and everyone who participates in bookkeeping may receive rewards. "
"Then what are the rewards based on? There has to be a rule, right? "Gazi asked very puzzled.
I explained: "Zhang San went to your store to borrow a pack of cigarettes on credit, but Li Si knew about it first and kept an account for you first, and then others knew about it. Keep accounts, then Li Si can get a small red flower as a reward ~ This small red flower is generated by the blockchain system and has no value in itself, so you do not need to pay any cost for this small red flower??"< p>“Can Bitcoin be spent as money? How is it different from the banknotes we usually spend? "Gazi continued to ask.
"Bitcoin is a digital encrypted virtual currency. In principle, it has no value itself like our banknotes. However, banknotes have a credit guarantee from the state, so they have value. Bitcoin is the value formed by consensus among Bitcoin network users, and it has tradable properties, so it can be used to carry value. "What is said here is a bit profound. I don't know if Gazi can understand it.
I continued to explain: "Banknotes can be printed infinitely. If more are printed, inflation will occur. When we were young, popsicles worth 1 cent were very good. , now you can’t eat with 1 yuan. Of course, there are many factors that affect inflation. The number of Bitcoins is fixed, and there is no possibility of unlimited over-issuance. However, different people have different judgments on their value, and coupled with the influence of supply and demand and investor sentiment, their prices are always fluctuating. ”
What is the difference between Bitcoin price fluctuations and stocks?
“Then speculating on BitcoinIs it just speculation in stocks? Can you understand it this way? "Gazi seems to know a lot.
"In fact, there are some similarities, but there are also big differences. "I continued Gazi's topic: "The price of stocks always fluctuates around the valuation of companies, and there is government supervision in the stock market. Bitcoin itself has no value. It is priced entirely based on supply and demand and player valuations. It grows wildly without any government supervision. Therefore, it may have higher risks and higher returns than stocks. "
In the end, Gazi revealed the real purpose of today. He asked me: "Can I invest in blockchain projects? ”
Gazi is a typical example of those who don’t go to the Three Treasures Hall for anything. Although there is a large circle of people who are involved in both blockchain and Bitcoin, in fact, what he really cares about is “blockchain project investment” Is it reliable? "When these words came out, I was extremely shocked. Now the so-called blockchain investment projects have actually reached fourth- and sixth-tier cities and small towns!
As of now, there are only three types of blockchain investments. Situation: Mining, currency speculation, so-called blockchain projects.
Mining and currency speculation are still the main lines of the blockchain (pictures quoted from the Internet)
The so-called mining means mining by purchasing mining machines, etc. Equipment, mine virtual currency, and then sell it for cash to get returns. You can install the mining machine yourself, or you can find a mining pool to host it, but the core keys to profitability are "computing power" and "power consumption" as well as Investment in equipment. With the sharp drop in the price of virtual currencies and the increase in mining difficulty, the current mining returns of many currencies are very unsatisfactory. Mining is obviously only a very small number of investors who understand technology can play successfully. I My childhood friend Gazi obviously can’t play with it.
As for “coin speculation”, I have just introduced some differences between Bitcoin and stocks in the previous section. In principle, although they are both “buy low and sell high” operations , but there is a huge difference. Ordinary investors cannot determine the value of a virtual currency itself, and the price is determined entirely by the relationship between supply and demand, which is somewhat similar to what we often call "market makers." On the other hand, the virtual currency trading market is extremely Irregularities, theft and hacker attacks often occur, and the risk factor is much greater than investing in stocks. For the safety of my friends' funds, I am one of the ten thousand people who disagrees with "coin speculation"!
"September 4th" It is illegal to issue virtual currency
In fact, in my opinion, most of the so-called investment projects in the market are essentially "illegal fund-raising" and "pyramid schemes." Some so-called blockchain investment projects use various The packaging and inflammatory rhetoric attract investors into the circle, and then create the illusion of profitability by building a software and hardware ecosystem of issuing new coins + mining + currency speculation, and then finally run away. Our country's laws clearly stipulate that the issuance of virtual currencies is illegal.
Illegal pyramid schemes now wear the cloak of blockchain (picture quoted from the Internet)
And how to identify some pyramid schemes under the guise of blockchain? In fact, these pyramid schemes are also so-called Ponzi schemes. , what we ordinary people often call "empty gloves". These so-called "direct sales" or "marketing"Activities often have no actual products to circulate, and rely more on developing "downline" to ensure top-level profits. With the rise of the concept of blockchain, this MLM model has shown an intensification trend, and it even deceives people under the banner of state support for new technologies.
When Gazi asked, “Can blockchain projects be invested in?”, I realized the seriousness of the problem. Gazi is a typical young man from a small town, and his pursuit is his wife and children. But when faced with the attraction of "wealth", people often do inappropriate things. Mining and currency speculation are simply not suitable for him, let alone blockchain investment projects that are most likely "illegal financing" or "illegal pyramid schemes"!
I quickly called Gazi and conducted the above analysis carefully??
D. How does the blockchain prevent data tampering?
The blockchain is New application models of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, and encryption algorithms.
Different from traditional distributed storage, the uniqueness of blockchain distributed storage is mainly reflected in two aspects: First, each node of the blockchain Complete data is stored according to the block chain structure. Traditional distributed storage generally divides the data into multiple parts for storage according to certain rules. Second, the storage of each node in the blockchain is independent and has equal status, relying on the consensus mechanism to ensure the consistency of storage, while traditional distributed storage generally synchronizes data to other backup nodes through the central node.
No node can record ledger data independently, thus avoiding the possibility of a single bookkeeper being controlled or bribed to record false accounts. Also because there are enough accounting nodes, theoretically speaking, the accounts will not be lost unless all nodes are destroyed, thereby ensuring the security of the accounting data.
The transaction information stored on the blockchain is public, but the account identity information is highly encrypted and can only be accessed with the authorization of the data owner, thus ensuring the security and personalization of the data. privacy.
Blockchain proposes four different consensus mechanisms, which are suitable for different application scenarios and strike a balance between efficiency and security.
Based on the above characteristics, this data storage technology can perfectly prevent the possibility of data tampering. In reality, it can also be applied to many fields. It is better than our electronic certificate storage technology in electronic contract signing. provides a safer and more reliable guarantee.
E. Blockchain and Bitcoin (1)
Blockchain is a technology that has been proposed by academic circles for a long time but has only become popular with Bitcoin in recent years. a concept. Bitcoin is an implementation based on blockchain technology. Bitcoin is a cryptocurrency, or a digital currency. Let’s start with Bitcoin and talk about how Bitcoin uses blockchain technology.
Suppose that during the 2006 World Cup finals, two football fans who did not know each other met. Italy played France. The French fans said that we have France.Zidane will definitely beat Italy. Italian fans are not convinced and say that Italy is invincible. If you don't believe it, let's bet 100 euros. In the real world, what should we do?
I have said before that we who work on computers spend more than 90% of our time dealing with abnormal situations. If humans were very trustworthy, the world might not be what it is now. The 600 miles that Qin promised King Huai of Chu were no longer 6 miles. Maybe it would be Chu who unified China. If you hand over the money to a third party, what if the third party also runs away? He stole the money. Therefore, in the real strange world, relying solely on a kind heart is unreliable. There must be means to firmly guarantee this commitment, legal contract, etc. Nowadays, a very common approach is for the third party to find an authoritative institution, such as the government, a bank, etc., or to find a reputable person or organization. In the final analysis, it is still to find an institution or person with credibility. But under normal circumstances, this third party will definitely "pluck out hair" and charge a certain percentage of handling fees.
So is there any way to solve this problem? This is one of the original intentions of Bitcoin's original design, to solve the trust problem between two strangers.
Encryption algorithm + multi-person accounting
Let’s talk about the encryption algorithm first. Here we need the asymmetric encryption I mentioned before, that is, the public key and private key. Everyone can have one or more pairs of public and private keys, but a public key can only have a corresponding private key, and vice versa. The principle is that two very large prime numbers (p and q) are multiplied to get a number (n). If you want to crack the private key based on the public key, you must theoretically crack it violently and figure out which two large prime numbers the number is multiplied by. Got it. Currently, there is no published private key in the world that can crack more than 1024 bits, so it is very safe to use a private key of 1024 or 2048 or even longer.
Then with the public key and private key, I as an individual can encrypt with the private key, and then publish the public key. Anyone can use my public key to decrypt to determine that this is what I published. . In the same way, when someone transfers money to me, I can also use his or her public key to decrypt it, thereby determining that this is someone's identity. This is also called a digital signature. The principles are the same, they are all encryption algorithms, obtained by using mathematical Euler's formula, prime number multiplication and other principles. This is a very great algorithm called RSA, proposed by three mathematicians. As long as we ordinary people understand the concept and use of public keys and private keys.
In the previous traditional model, banks or government agencies had their own separate ledgers. For example, if Zhang San transferred 100 yuan to Li Si, how would it be recorded in the ledger? 100 is deducted from Zhang San’s account and 100 is added to Li Si’s account, right?
The same is true for multi-person ledgers, except that the previous centralized institution has become a distributed, decentralized multiple institutions and even individuals. For example, Li Bai transferred 100 taels of silver to Du Fu.It is the Ministry of Finance's accounting. In the blockchain, it is Tang Taizong, Yang Yuhuan, Zhang Xiaojing, He Zhizhang and many other people who are keeping accounts together. It is recorded that Li Taibai transferred 100 taels of silver to Du Zimei. This is used as evidence. Li Bai's name is attached at the back. seal. In this way, with multiple ledgers, it would be extremely difficult to tamper with it. Li Bai could safely transfer it to Du Fu without worrying that he would tamper with the amount or deny it.
This can solve the problem of fans betting mentioned at the beginning, but there is another question, why should others help us keep accounts?
The answer is to be paid, which is in line with human nature. Otherwise, who would be willing to help keep an account that has nothing to do with them?
But there is only one person who can ultimately keep accounts, otherwise everything will be in chaos.
On the premise that it is beneficial, how to ensure who will keep the accounts? There is a mathematical knowledge involved here. Everyone who wants to keep accounts, in fact, the so-called miners, must solve a mathematical problem when keeping money. There is no trick to this mathematical problem. The only way is to put the numbers into the formula. In hard calculation, the algorithm is a Hash algorithm, which is similar to calculating a series of numbers. Miners can only guess, but there is no other way. Moreover, the current probability of guessing this number in Bitcoin is one in a trillion. It would take an ordinary computer to guess this number continuously for about a year.
But there are thousands of computers in the world, and if they are calculated together, the speed will be much faster, because from a probability point of view, one computer will definitely calculate it, and this is indeed the case. Let’s look at a real-life example of Bitcoin.
In addition, you can also see who the Miner is and how many transactions (Number of Transactions) are included in this block.
What if this miner is an individual with ulterior motives, and after calculating the calculation, he tampered with the transfer record and amount privately?
A. Tampering with transaction records/amount
We introduced the public and private key encryption technology earlier. The miners themselves theoretically do not have the private keys of the sender or payee. Therefore, the transaction record that he tampered with will make errors when decrypted with the correct public key, and will eventually be deemed illegal (the author is not sure at what point in time the identification was made, but he is sure that this record can be falsified) ).
B. Delete transaction records
Assume a scenario where Zhang San wants to buy a two-bedroom, one-living house in Beijing’s 4th Ring Road, but Zhang San doesn’t want to pay for it. Occupying the house for free, I thought of a sneaky way to tamper with the transaction records. Theoretically, after Zhang San paid, this record was generated but not confirmed.The record needs to wait until a miner solves the puzzle. Assuming that the miner is one of his own, he asks the miner to erase the record, no problem. But there are several ways to do it:
As we all know, Bitcoin mining takes a long time because of the troublesome math problems. The current cycle is about 10 minutes. This is based on the world Under the premise that hundreds of thousands of mining machines are working at full capacity at the same time. That is to say, tens of thousands of transactions will be uniformly confirmed and put into an immutable block every ten minutes, and these hundreds of thousands of mining machines will update their local records at the same time.
2.1 If the transaction has just been generated and the landlord sees it, and then transfers the property rights to Zhang San the next second, then if Zhang San wants to tamper with the payment record, he must meet several conditions:
The difficulty of success depends on how many confirmed blocks follow the tampered record. If there is only one, it is too simple, because the blockchain algorithm defaults to miners using the first received longer block when publishing a new block. So after this modification, it will be done once and for all, because all the ledgers will be synchronized, but there is also a problem, that is, this synchronization will be recorded. If the landlord cannot check the account, Zhang San will eventually be arrested. If there are many, for example, after Zhang San transfers the money, the landlord only transfers the property rights 1 hour after confirming the transfer, then Zhang San must tamper with the previous block information of about 6 blocks, which is very troublesome, because every block All will point to the previous block, and each block will have a digest (Hash), which is a summary of all transaction records in the current block. So if you try to modify a block that was written a long time ago, the digests of subsequent blocks will be changed. This is the hash tree (MerkleTree). Other nodes can report information that the blockchain has been tampered with. This involves the most important point. The 51% computing power that is often mentioned means that if Zhang San owns more than 50% of the ledgers and acknowledges this modification, then other nodes will also acknowledge this modification according to the algorithm design. . However, let’s not talk about the fact that almost no one in the world can do the above two things at the same time. Even if you can do it, if someone has questions about this, you can still force the system to be repaired. Similar problems have occurred in Ethereum before, and the outcome is Ethereum Entire blocks were tampered with and stolen property was recovered. Ethereum fork event.
The above is only a superficial introduction to the characteristics of Bitcoin implemented by applying blockchain technology. It can achieve openness, fairness, neutrality and equality. Any two strangers in the world can rely on Bitcoin or other blockchain technologies to trust each other.
F. Why do you feel that there is little chance of abey coins?
Yes. Because abey currency is a cryptocurrency, and most of the current mainstream blockchain technologies still have many shortcomings, there is little chance of abey currency appreciation. From a consumption perspective, well-known cryptocurrencies such as Bitcoin and Ethereum are known as “Currency", but due to technical hard restrictions, they do not have the attribute of "consumption".
Note: Investment is risky, financial management needs to be cautious.
Extended information:
1. Bitcoin is a A kind of electronic cash similar to email. Both parties need a "Bitcoin wallet" similar to email and a "Bitcoin address" similar to email address. As with sending and receiving emails, the sender will send money according to the recipient. Pay Bitcoin directly to the other party via your computer or smartphone. The following table lists some websites where you can download Bitcoin wallets and addresses for free. A Bitcoin address is a string of letters and numbers approximately 33 digits long, always ending with 1 Or starting with 3, such as Huobi "". Bitcoin software can automatically generate addresses. There is no need to exchange information online when generating addresses, and it can be done offline. There are many Bitcoin addresses available. Bitcoin addresses and private keys appear in pairs, just like A bank card number is the same as a password. A Bitcoin address is like a bank card number, used to record how many Bitcoins you have at the address. You can generate a Bitcoin address to store Bitcoins at will. When each Bitcoin address is generated, this The private key corresponding to the address. This private key can prove that you own Bitcoin at this address. We can simply understand the Bitcoin address as the bank card number, and the private key of the address as the password corresponding to the bank card number. Only if you know the bank password , you can use the money on your bank card number. So please keep your address and private key when using a Bitcoin wallet.
2. After the Bitcoin transaction data is packaged into a "data block" or "block" , the transaction is initially confirmed. When the block is linked to the previous block, the transaction will be further confirmed. After six consecutive blocks are confirmed, the transaction is basically irreversibly confirmed. The Bitcoin peer-to-peer network stores all transaction history in the "blockchain "(blockchain). The blockchain continues to extend, and once a new block is added to the blockchain, it will not be deleted. The blockchain is actually a set of decentralized client nodes and a distributed database composed of all participants. It It is a record of all Bitcoin transaction history. Nakamoto predicted that when the amount of data increases, the client hopes that the data will not be deleted and all stored in its own node. To achieve this purpose, he introduced a hash function mechanism. Through this In this way, the client will be able to automatically eliminate those parts that will never be used, such as some very early Bitcoin transaction records.