Blockchain from the perspective of computer science

Bitcoin is like a stream of air that is silently accumulated in the ocean. It has brought huge impact to all walks of life after landing. In the past few years, Bitcoin has added value to the rocket, which has led to unlimited imagination. Infinite blockchain projects have also led to countless heroes.

The people involved in the blockchain movement are roughly divided into three categories, of course, there are also intersections in the middle. The first category is the so-called "coin circle", including the speculative currency, the exchange, the wallet, and the leek and the cut leek; the other is to find the application project, from cross-border payment to Wuyuan. Organic pork, all kinds of fake, true and false, true and false; there is the so-called "chain circle", the purpose is to study the development of the basic technology of the blockchain, which contains real understanding of the doorway, there is also a large A bite of gold that helps the full name of the class. This article focuses on blockchain technology. By analyzing the ins and outs of blockchain from the perspective of computer science, it corrects some misunderstandings that are widely circulated. It also points out that many new-generation chain projects that are changing with each passing day are actually wild horses that are rushing on their way. The end result was nothing more than running the wild horse, running the rider, running without the grain, and running out of confidence in the blockchain technology.

Blockchain from the perspective of computer science

Why is bitcoin surprising, in the end solve the consensus problem in computer science?

Many people refer to the blockchain as the most revolutionary technology since the Internet. One of the things often mentioned is "decentralization." The blockchain can actually go to the center or not to the center, and there is no necessary connection between the two. Bitcoin is a decentralized design. At first glance, it solves the so-called "consensus" problem in distributed systems, that is, multiple nodes in a distributed system maintain a consistent view on something. A distributed system can be simply imagined as multiple computers connected via the Internet. Internet connections are not necessarily reliable (such as possible dropped calls), information dissemination takes time, and propagation time is not fixed or even capped. In addition, the time of each computer's clocks is not guaranteed to be synchronized (for the same reason), and some computers may deliberately falsify, so the distributed consensus problem is usually unsolvable. This is the conclusion of academic research and the consensus of experts engaged in distributed systems.

Bitcoin does not solve the traditional consensus problem, but transforms the problem. On the one hand, the serial number of the blockchain is used as the virtual time. On the one hand, the economic power of “mining” promotes the continuous extension of the bitcoin chain. This is why Bitcoin is always reversible in theory and can always be forked because the consensus it achieves is not absolute. Using economic factors (in practice, not in theory) to solve the distributed system consensus algorithm is the genius of Nakamoto.

Why is the Bitcoin system slow? 10 minute settlement is actually a feature, not a bug!

Since Bitcoin has been hot, many people complain that the system's settlement speed (TPS) is too slow. Many people have spent energy trying to speed up bitcoin, and many people have proposed a new blockchain system to try to solve the speed problem. Complaining that bitcoin is slow, they don't see the doorway. Of course, computer science does not necessarily understand why the bitcoin settlement system is slow. I don't know if it is a feature of design, not a bug.

In fact, the difficulty of mining determines the settlement speed, and the difficulty is adjustable, so the settlement speed can be long or short. Imagine if the settlement time is reduced to one second, that is, the difficulty of mining is reduced to one second, what will happen? It is often that thousands of miners dug mines at the same time. At that time, how did you decide which lucky miner was assigned a reward? Picking a lucky miner is another consensus issue, looping! Imagine what would happen if the settlement time became one hour? Because of the difficulty of mining, it is very unlikely that multiple miners will dig into the mine at the same time, and the possibility of conflict or temporary forks is low. Therefore, the settlement time does not have to be too slow, but it must not be too fast. This makes it clear how awkward the idea of ​​accelerating the bitcoin chain is. Nakamoto has not elaborated on the origins of its system design in the documentation on Bitcoin. I don’t know if it’s being beaten or targeted.

To extend it again, as long as it is a public chain that uses pure mining to make consensus, the settlement speed cannot be too fast. Does Ethereum plan to get off the bus from PoW? Now it’s not easy to make an Ethereum thing to fool people. I have made it clear here, and there may be no more calls to speed up Bitcoin to do ICO in the future.

Students who want to delve into this topic can compare the experience of local Ethernet (Ethernet) that everyone uses. On a local network, if multiple nodes "talk" (transmit data) at the same time, it will cause conflicts. After the conflict occurs, each node knows that the data has not been transmitted, and try again. However, if everyone immediately re-tests, there will be conflicts, causing network congestion. If everyone waits for a fixed time to try again, it will conflict. Therefore, the Ethernet design is that each node waits for a random time to try again, which greatly reduces the collision rate and realizes high-speed data transmission. Does this method of waiting for random time apply to Bitcoin? Obviously not, because there will be unconscious miners vying for retesting based on economic interests, everyone will fight, return to the original point, and solve the problem.

Can Ethereum become the foundation chain that supports thousands of applications?

Bitcoin is a single-purpose blockchain that is compact and well thought out and can be said to be near perfect. A little left a little open space, the original intention is to leave a comment or leave a message, Nakamoto Satoshi left a sentence in the first block to explain the start of the bitcoin chain. The man with a flexible mind will use this land as a colored coin and so on. But after all, there is not much room for activity and there are not many things to do.

Ethereum came into being, and it is known as a blockchain platform that can write omnipotent smart contracts. For a time, huge amounts of money poured in, and countless people began to develop various applications (including the so-called DApp, that is, distributed applications) on the basis of Ethereum, and more extreme so-called distributed autonomy (DAO).

Everyone is applying on a chain in Ethereum. What is the concept? It's like Microsoft introduced a system called Windows, and then people all over the world write programs that run on the same Windows system on the same computer. Can such a system support so many applications for so many people? Totally impossible. Look at the situation around you. Everyone uses their own computer or mobile phone. When communication is needed, communication is needed. When you need to cooperate, you need to cooperate with you. When you need to shop, go to the shopping website. The rest of the time each did their own thing. If the Internet tries to share a supercomputer model in the world, it is impossible to develop. Ethereum runs counter to one another, I don’t know if I really don’t understand it or deliberately flicker. As a platform for issuing coins, Ethereum was very successful. There is no drama to do anything else, and it remains to be seen.

Is there a promise for smart contracts? Is the so-called Turing integrity a good thing or a bad thing?

I first quote someone else's words, "The smart contract on Ethereum is neither intelligent nor contract." There is a fundamental constraint in expressing a contract in a programmable computer language. For example, after the contract is written as a code, it is "definitely dead", and where is the intelligence. To be able to adapt to the intelligence, you must consider the possibility of various changes in advance. In the real world, there are unexpectedly unconstrained contracts, or the parties have different perceptions of the content of the contract. In the real world, parties to the contract can also sit down and discuss and modify the contract. How do the functions of these modifications and deliberations or arbitrations take place at Ethereum?

Another word that followed many people's mouths with the Ethereum's smart contract is the Turing Complete, as if this is a great feature. In fact, if you really want to be a smart contract, Turing integrity is a way of thinking. Why do you say this? Anyone who has designed a computer programming language knows that the less restrictive a programming language is, the more powerful it is, and the more error-prone the programmer is. For example, the C language that everyone uses is an example of this. It is powerful because it is a system-level language that is used by operating systems and requires such great flexibility. But as a requirement for writing applications, it can be said that there are traps everywhere. Later, the Java language introduced a number of restrictions, such as type safety and garbage collecTIon, which avoided many programmers' pitfalls and became the preferred language for enterprise applications.

Go back to the blockchain smart contract issue. To write contracts securely and reliably, the contract language must be further reduced in functionality and incorporate many constraints. Those who have dealt with lawyers know that contracts are generally classified as models. Lawyers are never willing to draft from scratch, but write contracts on the basis of templates. This is because the template provides a lot of constraints, has experienced the test of time and constant updates, and is not easy to make mistakes. The lawyer's template is similar to the type and pattern in high-level programming language design. Some time ago, the DAO on Ethereum was attacked because of an error in the contract code. Therefore, for the programming language of writing smart contracts, there are fewer and more. In addition, if you really want to design a smart contract language, I would like to consider how to use formal verificaTIon technology to prove the correctness of each contract from the beginning, and design verifiability or provability to the structure of the language. Inside.

Is the transaction under the chain a solution?

Because the transaction speed on the chain is slow, a lot of under-chain projects are generated, that is, the transaction is implemented under the chain (or outside the chain), and then runs to the chain to unify the summary. At first glance, it seems that there is some truth. But after careful analysis, the problem is coming. The reason why the blockchain is optimistic is because there are many good functions in the chain, such as the content can not be tampered with and so on. By taking the deal out of the chain, you lose support for these features and bring additional risks. For example, a small amount of payment between two nodes seems to be done daily under the chain, and when it accumulates to a certain time or scale, it will rise to the chain once. But how do you guarantee the correctness of these transactions outside the chain? If one of the systems fails and the account book is lost before the checkout has been completed, the other party can rely on the account. This kind of scenario that is impossible in the chain will happen outside the chain. Those who advocate down-chain trading do not seem to emphasize the problems brought about by the chain.

There is also a down-chain scene, the exchange and the wallet. Many problems are at the end of these chains, including technical security issues, as well as non-technical trust issues. For example, some websites claim to help users manage various currencies, which is the same as asking strangers for your bank card password. There are also so-called cold wallets, mostly from unnamed manufacturers, the price is only tens of dollars, shoddy, but was used to manage huge assets, how can there be no problem? And if there is a problem, no one can be responsible, and the currency is turned away and irreversible. There is still a long way to go to the extent that the management and use of these coins can be safely and conveniently operated by the public.

What is the correct direction of the blockchain?

Having said that, I pointed out a lot of misunderstandings that have been widely circulated, and have pierced a lot of myths and false words, which is a blow to a large piece. This is not to say that I am not optimistic about the technology of the blockchain. The growth of Bitcoin has driven several things with market power. One is to prove that everyone has a public key encryption system has arrived, and everyone can accept it. One is that the consensus algorithm of distributed systems has been closely watched after many years of cold, attracting many scholars and doctoral students to actively study. There is also the attraction of so much money to the field, although it has been sacrificed a lot, but after all, some money will fall to the right place, always have to do something.

The development of blockchain is likened to the new generation of the Internet. In principle, it is necessary to learn from the successful development of the Internet for decades, rather than simply doing all kinds of hype in the way of web 1.0. The correct direction for development in the future is to spread the essence of Internet success in the blockchain field. To do this requires a solid knowledge background, strong research skills, and rich practical experience. Specifically how to do it, there is no time to continue to write today, here to sell a Guan, and listen to the next decomposition.

Handheld Unit Encoder

The handheld addresser is used to program the address of the monitoring module offline. When in use, connect the two output wires of the handheld encoder to the communication bus terminal (terminal label 1, 2) of the monitoring module, turn on the black power switch on the right side upwards, and press "ten Add", [Subtract ten", [Add one place" and [Subtract one place" to program the address.

Position Encoder,Magnetic Rotary Encoder,Hybrid Encoder,Channel Encoder

Changchun Guangxing Sensing Technology Co.LTD , https://www.gx-encoder.com