区块链数学知识,区块链 数学原理
区块链技术是一种分布式账本技术,它是建立在数学原理和密码学基础上的。区块链技术的基础是数学,它的基本原理是建立在密码学和数学原理上的。
数学在区块链技术中扮演着重要的角色,它可以帮助我们解决区块链技术中的许多问题。例如,数学可以帮助我们解决区块链技术中的安全性问题,数学可以帮助我们解决区块链技术中的可靠性问题,数学可以帮助我们解决区块链技术中的可信性问题。
区块链技术的数学原理主要包括:散列函数、共识机制和数字签名等。散列函数是区块链技术中最重要的数学原理之一,它可以将任意长度的输入数据转换成固定长度的输出数据,并且具有不可逆性。共识机制是区块链技术中另一个重要的数学原理,它可以帮助我们解决区块链技术中的安全性问题,并可以防止被篡改。数字签名是区块链技术中另一个重要的数学原理,它可以帮助我们解决区块链技术中的可靠性问题,并可以验证转账信息的有效性。
总之,数学原理是区块链技术的基础,它是一个不可或缺的部分。它可以帮助我们解决区块链技术中的许多问题,并可以帮助我们更好地理解区块链技术。
请查看相关英文文档
1. What is blockchain and how to make money with blockchain
Blockchain is computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. new application models. The so-called consensus mechanism is a mathematical algorithm that establishes trust and obtains rights and interests between different nodes in the blockchain system.
How to make money in the blockchain:
1. Earn commissions through promotion.
The blockchain approach is to first register an exchange account, generate your own invitation link, and then promote it. If someone registers the exchange through your link and generates transactions, you will get a commission.
2. Coin speculation.
Speculating in currencies is like speculating in stocks. Coin speculation is a way to make money on the Blockchain with the lowest threshold.
3. Mining.
"Mining" in Bitcoin is the accounting process. This process requires grabbing, and if you grab the opportunity to bookkeeping rights, you will be rewarded, and the reward is Bitcoin. This behavior is "mining".
4. Develop wallet.
The wallet is the infrastructure of the blockchain, just like the "Alipay Zheng Xinque" or "WeChat Pay" of the blockchain.
Extended information:
1. Blockchain is an important concept of Bitcoin. It is essentially a decentralized database and serves as the bottom layer of Bitcoin. technology. Blockchain is a series of data blocks generated using cryptographic methods. Each data block contains information about a Bitcoin network transaction and is used to verify the validity of its information (anti-counterfeiting) and generate the next block. piece.
2. Blockchain was born from Satoshi Nakamoto’s Bitcoin. Since 2009, various Bitcoin-like digital currencies have appeared, all based on public blockchains.
3. On January 20, 2016, the Digital Currency Seminar of the People’s Bank of China announced that it had achieved phased results in digital currency research. The meeting affirmed the value of digital currency in reducing the issuance of traditional currency and stated that the central bank is exploring the issuance of digital currency. The expression of the People’s Bank of China’s Digital Currency Seminar has greatly enhanced the confidence of the digital currency industry. This is the first time that the five central bank ministries and commissions have expressed a clear attitude towards digital currencies since they issued a notice on preventing Bitcoin risks on December 5, 2013.
Blockchain - Network
2. How to develop a block into a blockchain
1. The development of a block into a blockchain requires the software Go . Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
2. Blockchain is a term in the field of information technology. In essence, it is a shared database, and 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 broadapplication prospects.
3. From a technological perspective, blockchain involves many scientific and technical issues such as mathematics, cryptography, Internet and computer programming. From an application perspective, simply put, blockchain is a distributed shared ledger and database, which has the characteristics of decentralization, non-tampering, full traceability, traceability, collective maintenance, openness and transparency. These characteristics ensure the "honesty" and "transparency" of the blockchain and lay the foundation for creating trust in the blockchain. The rich application scenarios of blockchain are basically based on the ability of blockchain to solve the problem of information asymmetry and achieve collaborative trust and consistent action among multiple subjects.
For more information on how blocks are developed into blockchains, enter: https://m.abcgonglue.com/ask/587b481616112551.html?zd to view more content
3. Chinese version "Messi Conference" learns from the experience, can China's foodies become real gold
"Macy Conference" (Macy Conference)
The "Macy Conference" (Macy Conference) may not be well-known to the public, but in the eyes of academic circles, This is a meeting of great significance in the history of science, known as the "Pioneer Meeting of the Third Scientific and Technological Revolution". It is in the regularly held "Massey Conferences" that mathematicians, physicists, sociologists, and semanticists from all over the world have conducted interdisciplinary discussions and cooperation, which has provided the basis for almost all scientific research in the second half of the twentieth century to this day. Major scientific and technological issues have laid the foundation.
"We are in an era of technological explosion, and human society is gradually approaching the 'technological singularity'." Inspired by the mission of the times, the famous economist Zhu Jiaming led his Digital Asset Research Institute on December 17 -On the 18th, the Chinese version of the "Messi Conference" - Blockchain Mathematical Sciences Conference was hosted in Beijing. The conference focuses on exploring and dismantling existing blockchain mathematics paradigms, looking for mathematical fields related to blockchain technology, and combining mathematical tools that can introduce blockchain technology.
As a practical application of blockchain in the catering industry, foodie mainland The product uses a set of algorithm mechanisms based on the "incentive compatibility" theory of game theory to mobilize the enthusiasm of all participants to build an ecosystem. Although this algorithm mechanism has been initially verified, in order to make the theoretical foundation more solid, we have been looking for deeper internal scientific principles.
With admiration for science and "the most perfect mechanism in the world"With the desire to "algorithm", the Chihuahua Mainland team studied this blockchain mathematical science conference extremely seriously.
01
< /p>
AlphaGo surpasses humans? Scientist Zhang Bo said that computers are far behind humans...
Zhang Bo, an academician of the Chinese Academy of Sciences,
The in-depth analysis of artificial intelligence by computational scientist and academician of the Chinese Academy of Sciences, Zhang Bo, seems to make We have seen a little bit of the value of "being born as a human being".
Zhang Bo pointed out: "The reason why AlphaGo and Deep Blue can succeed is because chess is complete information. Game, if it is complete information, is extremely easy for computers and will definitely surpass humans. Therefore, in Go and chess, machines will eventually surpass humans. It is only a matter of time.
But if it becomes incomplete information, such as playing cards, whether it is four-person bridge or four-person mahjong, computers are not at all The reason for human opponents lies in incomplete information. The same is true for decision-making. If your decision-making is based on complete information, machines will definitely surpass humans. But if you make decisions with incomplete information, then computers are still far behind humans. But unfortunately, all decision-making scenarios have incomplete information, and actual decision-making scenarios are all human. ”
As a senior catering project, Chihuahua Mainland has industry information advantages. No matter how powerful the algorithm is, it cannot be dismantled if it does not know the true cost operation information of the industry. Solve the correct game strategy. Based on this understanding, the Chihuahua Continental team is quite pleased that the algorithm we designed is at least operable.
But we Still not satisfied, we long for ourselves to be better!
02
Only mathematicians can do mathematics? Economist Zhu Jiaming emphasizes the value of professionals in applied fields
p>
Zhu Jiaming, Director of Digital Asset Research Institute
Professor Zhu Jiaming pointed out at the beginning that mathematics gave birth to blockchain. From a development perspective, Professor Zhu Jiaming also said that blockchain has the possibility to extend into branches of applied mathematics. But academic discussions have always been cutting-edge. When it comes to practice, Professor Zhu also admitted: "At this moment, it is difficult to draw a conclusion on which new mathematical tools can be effectively combined with the blockchain." p>
Mathematicians are not the only ones who can develop blockchain applied mathematics. Historically, there are many precedents for professionals in applied fields to enter the field of mathematics.
Professor Zhu Jiaming gave an example: "For example, physicists, aerospace engineers, geologists, biologists, and economists have encountered practical problems. , input mathematical tools into their research fields, or invent some new mathematical methods.
Here is one that seems far away from us but is inspiring An example of this is the combination of biology and mathematics. The combination of the two produces mathematical biology and biomathematics. These are two scenarios where mathematics and biology are combined.
The difference between mathematical biology and biomathematics is that mathematical biology uses mathematical methods to study biological problems, while biomathematics uses mathematical problems in biology to form new mathematical methods."
< p>It can be seen that the path of exploring blockchain applied mathematics also requires the efforts of industry professionals. Encouraged by Professor Zhu Jiaming, Chihuahua Mainland, as an explorer of the catering blockchain industry, finally found another historical mission to improve itself - to explore mathematical methods for catering blockchain applications.
03
The Chinese Academy of Sciences is complicated Wang Feiyue, Director of the State Key Laboratory of System Management and Control
Young so fearless, this excited little heart has not yet calmed down, teacher Wang Feiyue’s words about imagination The views are so amazing that we want to go against the grain.
Wang Feiyue, Director of the State Key Laboratory of Complex System Management and Control, Chinese Academy of SciencesHe gave us a vivid walk through the history of science, and when he came up with artificial intelligence, he quoted the Tao Te Ching.
He said: "Intelligence is divided into three levels. One is algorithmic intelligence, which is our artificial intelligence. It can be written into a program, but it is far smaller than language intelligence. , and the intelligence that human language can express is far smaller than the intelligence we imagined. This is consistent with the Tao in the Tao Te Ching. Later, archaeologists discovered that, alas, these are not two sentences. , should be three sentences, Tao, Tao, very Tao, which corresponds to these three levels."
The Chihuahua Mainland team deeply agrees, We have always had a consensus that under the myth of technology, it is as if there are no people in the world except machines. This is obviously not the case. Several experts at the meeting also pointed out that imagination is the reason why humans will never be surpassed by machines.
In an era when computational intelligence can already perform "self-learning" through "raw data input", the more important role of human beings is to: transcend perception and discover patterns.
According to the requirements of the conference organizer, all experts at this conference need to propose their own "blocks" Chain Mathematical Conjecture”. Many conjectures are very interesting, such as the “small-scale consensus is vulnerable to attack” and the “two-military problem” proposed by Yuan Yong of the Chinese Academy of Sciences. From an industrial point of view, although these conjectures are relatively metaphysical, they are good thinking training.
It’s exciting when we see new practice-based approaches in the industry. For example, Mr. Jia Ke proposed the "two high characteristics of smart contracts": "too many restrictions and high difficulty" and "can be triggered internally and high risk". Through observation of experiments, they found that blockchain can completely abandon "smart contracts", "the functions and implementation logic required for blockchain applications can be triggered externally", "self-certifying storage mechanism" and other phenomena. Based on these methods, complex Internet applications without central servers can be developed.
Associate Professor Ding Xiaowei of Nanjing University’s new attempt at financial derivatives also allows us to see the new power of blockchain in reconstructing financial mathematics.
At this conference, we clearly saw that basic theory is the cornerstone of industrial development, and industrial development is the significance of basic theory. Foodie China is changing the catering industry for the better. This is the best result of basic theories such as blockchain mathematics.
4. Popular explanation of what blockchain is
Blockchain is a distributed, decentralized ized computer technology. Blockchain is not equal to Bitcoin, it is just an underlying technology invented to realize the digital currency of Bitcoin. Blockchain can be applied in a wider range. In addition to digital currency, it can also be applied in financial aspects such as P2P lending, global payment, micro-finance, electronic payment, remittance, etc. It can also be used in people's livelihood aspects such as intellectual property, elections, and notarization. The prospects for future development are huge.
So, what is distributed and decentralized? Take marriage registration as an example. In the past, when two people got married, they had to go to the Civil Affairs Bureau to go through the formalities, and then enter the information into the computer. Only then has the legal process been completed. What if blockchain technology is used? As long as two people agree to get married and then post a message in their circle of friends, the marriage process is completed, and there is no need to go to the Civil Affairs Bureau. Your friends are common witnesses. They may be scattered around the world, but their mobile phones will help you record the information and tell others who want to know the situation.
Characteristics of blockchain
1. Decentralization. Blockchain technology does not rely on additional third-party management agencies or hardware facilities, and there is no central control. In addition to the self-contained blockchain itself, each node realizes self-verification, transmission and management of information through distributed accounting and storage. Decentralization is the most prominent and essential feature of blockchain.
2. Openness. The foundation of blockchain technology is open source. In addition to the private information of the transaction parties being encrypted, the data of the blockchain is open to everyone. Anyone can query the blockchain data and develop related applications through the public interface. Therefore, the entire System information is highly transparent.
3. Independence. Based on consensus specifications and protocols (similar to various mathematical algorithms such as the hash algorithm used by Bitcoin), the entire blockchain system does not rely on other third parties. All nodes can automatically and securely verify and exchange data within the system without the need for any human intervention.
4. Security. As long as you cannot control 51% of all data nodes, you cannot manipulate and modify network data at will. This makes the blockchain itself relatively safe and avoids subjective and artificial data changes.
5. Anonymity. Unless required by legal regulations, technically speaking, the identity information of each block node does not need to be disclosed or verified, and information transfer can be carried out anonymously.
5. In-depth understanding of the consensus mechanism and algorithm principles of the blockchain
The so-called "consensus mechanism" completes transactions in a very short time through the voting of special nodes. Verification and confirmation; for a transaction, if several nodes with unrelated interests can reach a consensus, we can think that the entire network can also reach a consensus on it. To put it more simply,, if a Chinese Weibo V, a virtual currency player in the United States, an African student and a European traveler do not know each other, but they all agree that you are a good person, then it can basically be concluded that you are not bad.
In order for the entire blockchain network node to maintain the same data and ensure the fairness of each participant, all participants in the entire system must have a unified agreement, which is what we have here The consensus algorithm to be used. All Bitcoin nodes follow unified protocol specifications. The protocol specification (consensus algorithm) consists of relevant consensus rules, which can be divided into two major cores: proof of work and the longest chain mechanism. The ultimate expression of all rules (consensus) is the longest chain of Bitcoin. The purpose of the consensus algorithm is to ensure that Bitcoin continues to operate on the longest chain, thereby ensuring the consistency and reliability of the entire accounting system.
Users in the blockchain do not need to consider the credit of the other party when conducting transactions, do not need to trust the other party, and do not need a trusted intermediary or central agency. They only need to follow the blockchain protocol. Realize the transaction. The premise for smooth transactions without the need for a trusted third-party intermediary is the consensus mechanism of the blockchain, that is, in a market environment of mutual understanding and trust, each node participating in the transaction considers its own interests and does not violate any regulations. Motives and behaviors of cheating, so each node will actively and consciously abide by the preset rules to judge the authenticity and reliability of each transaction, and write the record of passing inspection into the blockchain. The interests of each node are different, and logically there is no incentive for them to collude to deceive. This is especially obvious when some nodes in the network have public reputation. Blockchain technology uses a consensus algorithm based on mathematical principles to establish a "trust" network between nodes, and uses technical means to achieve an innovative credit network.
At present, the mainstream consensus algorithm mechanisms in the district industry include: workload proof mechanism, equity proof mechanism, share authorization proof mechanism and Pool verification pool.
The workload proof mechanism is the proof of workload, which is a requirement that must be met when generating a new transaction information (i.e. a new block) to be added to the blockchain. In a blockchain network built based on the proof-of-work mechanism, nodes compete for accounting rights by calculating the numerical solution of random hashing. The ability to obtain the correct numerical solution to generate blocks is a specific manifestation of the node's computing power. The proof-of-work mechanism has the advantage of being completely decentralized. In a blockchain with a proof-of-work mechanism as the consensus, nodes can enter and exit freely. The well-known Bitcoin network uses a proof-of-work mechanism to produce new currencies. However, since the application of the workload proof mechanism in the Bitcoin network has attracted most of the computing power of computers around the world, it is difficult for other blockchain applications that want to try to use this mechanism to obtain the same scale of computing power to maintain their own security. At the same time, mining based on the proof-of-work mechanism has also caused a large number ofIt is a waste of resources and takes a long time to reach consensus, so this mechanism is not suitable for commercial applications.
In 2012, a netizen with the pseudonym Sunny King launched Peercoin. This encrypted electronic currency uses a proof-of-work mechanism to issue new coins and a proof-of-stake mechanism to maintain network security. This is the role of the proof-of-stake mechanism in encrypted electronic currency. first application in . Rather than requiring the certifier to perform a certain amount of computational work, Proof of Stake simply requires the certifier to provide ownership of a certain amount of cryptocurrency. The way the proof-of-stake mechanism works is that when a new block is created, the miner needs to create a "coin rights" transaction, which sends a number of coins to the miners themselves according to a preset ratio. The proof-of-stake mechanism reduces the mining difficulty of nodes in equal proportions based on the proportion and time of tokens owned by each node based on the algorithm, thus speeding up the search for random numbers. This consensus mechanism can shorten the time required to reach consensus, but essentially still requires nodes in the network to perform mining operations. Therefore, the PoS mechanism does not fundamentally solve the problem that the PoW mechanism is difficult to apply in the commercial field.
The share authorization certification mechanism is a new consensus mechanism to ensure network security. While trying to solve the problems of the traditional PoW mechanism and PoS mechanism, it can also offset the negative effects of centralization by implementing technological democracy.
The share authorization certification mechanism is similar to board voting. This mechanism has a built-in real-time shareholder voting system, just like the system is convening a never-ending shareholders' meeting at any time, where all shareholders vote. determine company decisions. The decentralization of the blockchain established based on the DPoS mechanism relies on a certain number of representatives rather than all users. In such a blockchain, all nodes vote to elect a certain number of node representatives, who act on behalf of all nodes to confirm blocks and maintain the orderly operation of the system. At the same time, all nodes in the blockchain have the power to remove and appoint representatives at any time. If necessary, all nodes can vote to disqualify the current node representatives and re-elect new representatives to achieve real-time democracy.
The share authorization certification mechanism can greatly reduce the number of nodes participating in verification and accounting, thereby achieving second-level consensus verification. However, this consensus mechanism still cannot perfectly solve the application problems of blockchain in business, because this consensus mechanism cannot get rid of its dependence on tokens, and the existence of tokens is not required in many commercial applications.
The Pool verification pool is established based on traditional distributed consistency technology and is supplemented by a data verification mechanism. It is a consensus mechanism widely used in current blockchains.
The Pool verification pool can work without relying on tokens. Based on mature distributed consensus algorithms (Pasox, Raft), it can achieve second-level consensus verification, which is more suitable for multi-party participation. polycentric businessmodel. However, the Pool verification pool also has some shortcomings. For example, the degree of distribution that the consensus mechanism can achieve is not as good as the PoW mechanism.
Here we mainly explain some algorithm principles of the blockchain workload proof mechanism and the Bitcoin network. How to prove your workload? I hope everyone can have a basic understanding of the consensus algorithm.
The main feature of the proof-of-work system is that the client has to do a certain amount of difficult work to get a result, and the verifier can easily use the results to check whether the client has done the corresponding work. A core feature of this scheme is asymmetry: the work is modest for the requester and easy to verify for the verifier. It differs from CAPTCHAs, which are easier to solve by humans rather than easier to solve by computers.
The figure below shows the workload proof process.
For example, give a basic character "hello, world!", the workload requirement we give is that you can add a nonce (random number) after this character creation Integer value, perform SHA-256 operation on the changed (nonce added) character creation, if the result (expressed in hexadecimal form) starts with "0000", the verification is passed. In order to achieve this proof-of-work goal, it is necessary to continuously increment the nonce value and perform a SHA-256 hash operation on the resulting character creation. According to this rule, it takes 4251 operations to find the hash with leading 4 zeros.
Through this example, we have a preliminary understanding of the proof-of-work mechanism. Some people may think that if proof of work is just such a process, then it is enough to remember that the nonce is 4521 so that the calculation can pass verification. Of course not, this is just an example.
Next we simply change the input to "Hello, World! + integer value". The integer value ranges from 1 to 1000, which means that the input is turned into an array of 1 to 1000: Hello, World !1;Hello,World!2;...;Hello,World!1000. Then perform the above proof of work on each input in the array in turn - find the hash with leading 4 zeros.
Due to the pseudo-random nature of the hash value, it is easy to calculate based on the relevant knowledge of probability theory. It is expected that it will take 2 to the 16th power of attempts to obtain a hash hash with four leading zeros. List. If you count the actual results of the 1,000 calculations just performed, you will find that the average number of calculations is 66,958, which is very close to 2 to the 16th power (65,536). In this example, the mathThe expected number of calculations is actually the required "workload". Repeating the workload multiple times will prove to be a probability event that conforms to statistical laws.
The actual number of calculations used to count the input characters and obtain the corresponding target result is as follows:
For any node in the Bitcoin network, if you want to generate a new block To join the blockchain, you must solve this puzzle of the Bitcoin network. The key elements of this question are the proof-of-work function, block and difficulty value. The workload proof function is the calculation method of this question, the block is the input data of this question, and the difficulty value determines the amount of calculation required to understand this question.
The proof-of-work function used in the Bitcoin network is the SHA-256 mentioned above. Blocks are actually generated in the proof-of-work process. Kuangong constantly constructs block data and checks whether each calculated result meets the required workload, thereby determining whether the block meets the network difficulty. The block header is the input data of the Bitcoin proof-of-work function.
The difficulty value is an important reference indicator for miners to mine. It determines how many hash operations it takes for miners to generate a legal block. The Bitcoin network generates a block approximately every 10 minutes. If the generation of new blocks basically maintains this speed under different network computing power conditions, the difficulty value must be adjusted according to changes in the computing power of the entire network. The general principle is to ensure that the network always generates a new block in 10 minutes, regardless of the mining power.
The adjustment of the difficulty value occurs independently and automatically in each complete node. Every 2016 blocks, all nodes will automatically adjust the difficulty value according to a unified format. This formula is based on the time spent in the latest 2016 blocks and the expected time (assuming a withdrawal is generated every 10 minutes, the expected time is 20160 minutes) and adjusted according to the ratio of actual duration to expected duration. That is, if blocks are generated faster than 10 minutes, increase the difficulty value; anyway, decrease the difficulty value. The formula is expressed as follows:
New difficulty value = old difficulty value * (20160 minutes/time spent in the past 2016 blocks).
Proof of work requires a target value. The calculation formula of the target value (Target) of Bitcoin's proof of work is as follows:
Target value = maximum target value/difficulty value, where the maximum target value is a constant value
The size of the target value is inversely proportional to the difficulty value. To achieve the Bitcoin workload proof, the block hash value calculated in the mine must be less than the target value.
We can also simply understand the process of Bitcoin workload as, by constantly changing the block header (that is, trying different nonce values) andIt is used as input to perform a SHA-256 hash operation to find a hash value in a specific format (that is, it requires a certain number of leading 0s). The more leading 0s required, the more difficult it is.
The steps of Bitcoin’s proof-of-work puzzle can be roughly summarized as follows:
The process can be represented by the following figure:
Bitcoin’s proof of work is the main work we commonly call “mining”. Understanding the workload proof mechanism will lay the foundation for us to further understand the consensus mechanism of the Bitcoin blockchain.
6. Does blockchain require high mathematics?
Blockchain requires high mathematics.
Economist Zhu Jiaming: Mathematics gave birth to blockchain, and blockchain promoted mathematics.
The famous economist Zhu Jiaming said in his opening speech: "We are in an era where science is dominant, science clusters and technology are growing together, and the 'technological singularity' is no longer a conjecture, and the material and conceptual worlds are parallel. The world has been formed, and applied mathematics connects the two worlds in the fields of physics, chemistry, engineering, IT and Internet revolution, economics and other fields. The circle of the conceptual world may exceed the circle of the physical world. Applied mathematics combines the material world and the world to a considerable extent. The conceptual world is connected together. The fundamental function of the blockchain is that it is the 'basic structure' of the non-material and non-physical world, and also the 'bridge' between the material and physical world and the non-material and non-physical world. Mathematics gave birth to the block Blockchain promotes mathematics, and mathematics will further transform the blockchain."
- 上一篇: 区块链技术波特五力模型分析,区块链技术博客
- 下一篇: 幸运12生肖区块链开了多久,12生肖区块链