Mathematics: The Sophisticated Components of Blockchains
Preface: Mathematics plays a very important role in the development of human civilization. Newton foresaw the possibility of launching artificial celestial bodies through mathematical calculations; the mass-energy formula of Einstein's theory of relativity predicted the advent of the age of atomic energy from the perspective of mathematical demonstration; it was Maxwell's equations that first demonstrated electromagnetic waves mathematically, and later The development of electromagnetic wave acousto-optic information transmission technology; the birth and development of electronic digital computer is carried out under the guidance of mathematical theory. Mathematics is also the premise and basis for the development of the blockchain, and the core guarantee for the future development of the blockchain industry. If the various ingenious and perfectly designed rules in the blockchain are its soul, then the mathematical ideas deeply penetrated into it are the blood, thus supporting the establishment of the trust mechanism of the entire blockchain system. This article will briefly analyze the cutting-edge mathematical theories applied in the blockchain world, and try to describe the mathematical order of the blockchain world.
【The symbol of God】
Mathematics is God's symbol for describing nature - Hegel
Mathematics has always been the main cultural force in the development of human civilization, and at the same time, the development of human culture has greatly affected the progress of mathematics; moreover, mathematics is an art, so mathematics has not only scientific value, but also cultural and economic value.
Walking into a computer room, between the walls lined up by servers, listening to the noise of the fans, it seems that you can smell the uninterrupted flow of 0 and 1 between the CPU and the memory. From calculating the abacus to today's computer, the tools we use for calculation have finally begun to make a leap from quantity to quality. Computers can do more and more than their creators can. At the end of the last century, Deep Blue became the first computer to defeat the human chess world champion with its unprecedented ability to search and judge chess games, but its victory still relied on the rich chess knowledge endowed by human masters; However, Watson has already been able to rely on its own algorithm to "understand" the problem first, and then search for the relevant answer in the massive database in a targeted manner. If things go on like this, a tool will surpass its maker in more ways. And all of this comes from increasingly sophisticated calculations.
Maybe you have heard the name Turing machine often, but why is the computer called a Turing machine?
In the mathematical logic class taught by Newman, Turing first heard Hilbert's decidability problem and Gödel's incompleteness theorem. It was the spring of 1935. He had just completed his four-year undergraduate study at King's College, Cambridge, and was selected as a research fellow of the college with honors. He was about to show his talents in the mathematics world, and mathematical logic naturally attracted his interest. Turing clearly realized that the key to solving the problem of decidability lies in the strict definition of "mechanical computing". Examining Hilbert's original meaning, the word probably means "a calculation that can be completed according to certain limited steps without the calculator's inspiration", which was quite imaginative and accurate at the time when there were no electronic computers. Definition. But Turing's idea was simpler. What is "mechanical computing"? Mechanical calculation is the calculation that a machine can complete, which is Turing's answer.
One of the great advantages of a Turing machine is its simplicity. As long as the state transition table is given, anyone can simulate the calculation of a Turing machine. For engineers, it is not difficult to build a Turing machine mechanically in reality. For programmers, it is even easier to write a simple program that simulates a Turing machine.
It is possible to build a hut without a foundation, but never a strong mansion - Eng. Isidor Goldreich
Cryptography is an ancient discipline with a long and fascinating history. Its use to protect military and diplomatic correspondence dates back thousands of years to ancient times when writing was just being invented. For thousands of years, cryptography has been continuously advancing. Starting from the Caesar cipher, people are also tirelessly cracking the existing cryptographic algorithms when developing new cryptographic algorithms, because for crackers, the higher the difficulty of the password, the greater the value of the secret behind it. The five algorithms of the SHA family are SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512, and the latter can also be collectively referred to as SHA-2, which is established by the US National Security Agency (NSA) Designed and published by the National Institute of Standards and Technology (NIST); is a U.S. government standard. It is also the key gatekeeper of many Internet and electronic products. The hash function has a one-way property. Anything that goes in will come out as a string of random numbers. This is very similar to a black hole, where any input is made into the black hole, and all random numbers come out. Asymmetric encryption algorithm requires two keys: public key (publickey) and private key (privatekey). The public key and the private key are a pair. If the data is encrypted with the public key, only the corresponding private key can be used to decrypt it; if the data is encrypted with the private key, only the corresponding public key can be used to decrypt the data. decrypt. Cryptography forms the foundation of the blockchain. For more research on cryptography, readers can also read my previous articles.
【In Math We Trust】
Mathematics is a variety of proof techniques - Wittgenstein
There are two participants in the zero-knowledge proof process, one is called the prover, and the other is called the verifier. The prover holds a secret, and he wants the verifier to believe that he holds the secret, but he does not want to reveal the secret to the verifier.
There are two participants in the zero-knowledge proof process, one is called the prover, and the other is called the verifier. The prover holds a secret, and he wants the verifier to believe that he holds the secret, but he does not want to reveal the secret to the verifier.
The two parties follow an agreement and through a series of interactions, the final verifier will come to a clear conclusion, whether the prover has the secret or not. There are three main points in the whole agreement:
a. Zero-knowledge: verifying whether an event is correct or not does not require the verifier to reproduce the entire event
b. Test method: the test cannot be completely given by the prover
c. Test content: the content of the test problem must be differentiated
In the computer field, the general practice is to map the original problem to an NP problem. The verifier only needs to verify the solution of the NP problem given by the prover, and the computational load is not large. If someone has the secret and can solve the original problem, then the corresponding NP problem can be solved by converting it. If you don't know the secret, bypass the original problem, and directly solve the NP problem violently, it can generally be considered impossible. A zero-knowledge proof is essentially an agreement involving two or more parties, that is, a series of steps that two or more parties need to take to complete a task. The prover proves to the verifier and makes him believe that he knows or has a certain message, but the proof process cannot leak any information about the proven message to the verifier. Numerous facts have proved that zero-knowledge proofs are very useful in cryptography. If zero-knowledge proofs can be used for blockchain verification, many privacy-related issues can be effectively solved.
Mathematics is a culture that evolves. — Wilder
Formal verification is to use logic to verify the reliability of a program, that is, to prove a program in a logical way to prove that it can get the expected results and has no bugs. Generally, this kind of research is mainly used in the operating system of expensive aerospace equipment and the program of dangerous medical equipment. Because aerospace equipment and medical equipment involve human life, if there is an error in the operating system, it is very dangerous, and it cannot be tested over and over again, so formal verification is used. For example, NASA will employ a large number of formal verification experts to verify the correctness of their operating systems.
Smart contract security is very important. I've written about common security issues in Ethereum bytecode before, but approximate detections like this only scratch the surface. Ideally, we want to guarantee that our smart contracts are 100% correct. Formal verification (Formal verification) allows us to ensure that a certain wrong state will not occur. Formal methods simply mean using mathematical tools for definition, development and verification (specification, development and verification). Mathematicians believe that, regardless of hardware or software engineering, just like everything in the world, all knowledge, in the final analysis, is a mathematical problem. "An engineer who doesn't understand mathematics is not a good engineer". If all design and development can be carried out according to strict mathematical methods, then the developed system will be as perfect as mathematics itself: the software will never go wrong, and the hardware will always be normal.
In the case of a formalized specification, Verification can be roughly divided into two types: "hand calculation" and "computer calculation", because the "hand calculation" of a skilled mathematician may not be better than the purely automated "computer calculation". "Bad." For example, there is a method called "Model Checking" in the fully automated Verification, which is to exhaustively enumerate all the states (States) that can be reached during the operation of the system. This modeling, that is, when writing the Spec, also needs to be very clever. The technique is essentially "machine theorem proving". In 1954, Martin Davis used a machine to prove a theorem for the first time: "The addition of two even numbers is still an even number", but earlier, Turing had already proved that Turing's complete machine through a famous "stopping problem". unsolvable problem.
【Thinking of EKT】
【Thinking of EKT】
In the blockchain, after the block packaging is completed, the consensus mechanism solves the problem of reaching consensus and resisting attacks under the distributed ledger structure. It solves the problem of mutual trust between nodes on the basis of decentralization and is the guarantee of the blockchain system. key to continued safe operation. Based on the different trust foundations of each node in the distributed network, it can be divided into workload proof mechanism, Byzantine fault tolerance mechanism, etc., and they have their own advantages in terms of node entry and exit, anti-attack and so on. Take the workload proof mechanism as an example to illustrate the principle of the consensus mechanism. Reaching a consensus requires certain standards and rules. If you meet the standards, you can obtain the right to bookkeeping. At the same time, this standard or rule cannot be achieved at low cost, otherwise the authority and security of bookkeeping will be easily challenged.
A simple understanding of the proof-of-work mechanism based on mathematical difficulty is a proof to confirm that you have done a certain amount of work. Because the whole process of monitoring work is usually extremely inefficient, and it is a very efficient way to prove that the corresponding workload has been completed by certifying the results of the work. For example, graduation certificates, driver's licenses, etc. in real life are also proofs obtained by means of inspection results (passing relevant exams). Proof of work solves the problem of confirmation of bookkeeping rights in the case of complete decentralization and free entry and exit of nodes.
Our EKT multi-chain adopts a new solution based on delegated proof of rights and interests, and redesigns a public chain that guarantees the normal operation of each contract. It has a ready-made framework and an indivisible multi-chain architecture. This innovation greatly simplifies the architecture, reduces the pressure of data processing, and ensures that the surge of traffic on one chain will not affect the efficiency of the other chain, and any business carried out on the chain will not receive other business interference, effectively Resource isolation is achieved.
In fact, a big problem that EKT considered in the design is that every set of mathematical logic proof system will not solve all problems perfectly. EKT provides a set of underlying blockchain mechanisms. Other blockchain projects can easily deploy their own main chain based on the EKT main chain code, and then make some customized settings according to requirements, such as selecting Consensus mechanism, etc. Blockchain projects written on EKT will not need to worry too much about security issues, because each interface is very simple and deployed and run on many parallel main chains. When deploying the main chain, you can flexibly issue tokens of your own main chain and choose a consensus algorithm. The newly deployed main chain can also join the entire ecology of EKT general credits, share the user resources of the EKT ecology, and tokens can also be exchanged and circulated with the EKT main currency and tokens of other main chains.
EKT's DApp chain is a chain for different developers to develop DApps. We have optimized it from three aspects: smart contract development language, data storage, and efficiency. EKT's DApp chain can basically achieve the same or even faster development speed as the current Internet application, and the achievable functionality is not much different from that of the Internet application. Most importantly, we can achieve 1-second execution of most events And confirmation, events with relatively high security requirements can be confirmed in 3 seconds.
The default is to have this kind of expansion capability, which is also the most natural open concept of dapp. If someone does not want this kind of openness, he can do it in a centralized way by building his own private server. The blockchain platform will uniformly provide this openness and scalability for all applications. In EKT, we adhere to the concept that a currency system does not require a Turing-complete development language, and the principle of isolation between different applications as much as possible. Therefore, when designing, we separated the processing of tokens from the processing of DApps, which means that there are two types of chains on EKT: token chains and DApp chains.
EKT's DApp chain is a chain for different developers to develop DApps. We have optimized it from three aspects: smart contract development language, data storage, and efficiency. EKT's DApp chain can basically achieve the same or even faster development speed as the current Internet application, and the achievable functionality is not much different from that of the Internet application. Most importantly, we can achieve 1-second execution of most events And confirmation, events with relatively high security requirements can be confirmed in 3 seconds.
At present, the platform for decentralized applications and in-app assets developed, managed and traded in the blockchain ecosystem should take the needs of developers and users in this industry as the starting point for the design of the initial version of the project. The main technologies we can see now are also based on this starting point and serve this goal. The central idea of EKT is to design a community mechanism, so that developers can easily develop a main chain that can carry DAPP, and the rest is handed over to EKT. EKT's "one chain, one main currency, multi-chain, multi-consensus" mechanism It provides great convenience for the development of subsequent blockchain projects, and can be used in any applicable application scenarios of blockchain. The multi-chain we launched can only be a minimum standard, that is to say, you can think what functions need to be included in a minimized version of a product, and then you can derive other new functions and new gameplay on it, if you only have With these minimal functions, the product must be meaningless.
The above are some of my thoughts on blockchain mathematical thinking, and some considerations on building a multi-chain bottom layer when designing EKT's multi-chain and multi-consensus. Welcome to ask questions and discuss together.
End


