Blockchain circle

One stop hot information platform

About us:

Blockchain circle provides the latest information about blockchain, digital currency, digital wallet, exchange, metauniverse, bitcoin, Ethereum, contract, financial management and so on, and always pays attention to the latest market...

[turn] the simplest and clearest explanation of blockchain

Time : 29/06/2021 Author : 8dnf95 Click : + -
        First of all, don't think too deeply about blockchain. It is a database storage system distributed all over the world and can work together, which is different from traditional database operation &mdash& mdash; The read-write permission is controlled by a company or a centralized authority. The centralized feature blockchain believes that anyone who has the ability to set up a server can participate. Gold diggers from all over the world deploy their own servers locally and connect to the blockchain network to become a node in this distributed database storage system. Once joined, this node enjoys the same rights and obligations as all other nodes, which are decentralized and distributed.
 
        At the same time, people who carry out services on the blockchain can read and write to any node in the system. Finally, all nodes in the world will complete synchronization again and again according to some mechanism, so as to realize the complete consistency of data of all nodes in the blockchain network. But there are few easy to understand introductory articles. There are few explanations about what blockchain is and what is special about it. Now I will try to write a blockchain tutorial that I best understand. After all, it is not very difficult. The core concept is very simple and can be explained in a few words. I hope that after reading this article, you can not only understand blockchain, but also understand what mining is and why mining is becoming more and more difficult.
 
        It should be noted that I am not an expert in this field. Although we have paid attention to blockchain for a long time, we have been learning about blockchain carefully since the beginning of this year. You are welcome to correct the mistakes and inaccuracies in the article. First, the main function of blockchain is to store information. Any information that needs to be saved can be written to or read from the blockchain, so it is a database. Secondly, anyone can set up a server to join the blockchain network and become a node. In the world of blockchain, there is no central node, and every node is equal and saves the entire database. You can write / read data to any node, because all nodes will finally synchronize to ensure the consistency of the blockchain.
 
        Distributed database is not a new invention, and such products have long existed in the market. But blockchain has a revolutionary feature. Blockchain is completely centerless without administrators. Other databases have administrators, but blockchain does not. If someone wants to add audit to blockchain, it can't be achieved, because its design goal is to prevent the emergence of a central authority. It is precisely because the blockchain cannot be managed that it cannot be controlled. Otherwise, once large companies and groups control the management power, they will control the whole platform, and other users must obey them. But without the administrator, everyone can write data into it. How can we ensure that the data is credible? What if it is changed by bad people? Please read on. This is the wonderful place of blockchain.
 
        The so-called hash is that the computer can calculate an eigenvalue 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 ensure that as long as the original content is different, the corresponding hash must be different. There is a problem here, because hash only corresponds to the block header. How can I ensure that the data of the block body is not modified? For the time being, I have no connection. Blocks and hashes are one-to-one, and the hash of each block is calculated for the block header. That is to say, connect the characteristic values of the block header in order to form a long string, and then hash the string.
 
        The above is the calculation formula of block hash. Sha256 is the hash algorithm of blockchain. Note that this formula only contains the block header, not the block body, that is, the hash is uniquely determined by the block header. As mentioned earlier, the block header contains many contents, 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, the hash of the current block will change. This is of great significance to blockchain. If someone modifies a block, the hash of the block changes. In order for the following blocks to be connected to it, because the next block contains the hash of the previous block, the person must modify all the following blocks in turn, or the changed blocks will be separated from the blockchain.
 
        Due to the reasons mentioned later, the calculation of hash is very time-consuming, and it is almost impossible to modify multiple blocks in a short time, unless someone has mastered more than 51% of the computing power of the whole network. It is through this linkage mechanism that the blockchain ensures its own reliability. Once written, data cannot be tampered with. It's like history. It happened. It can't be changed from now on. Since the synchronization between nodes must be guaranteed, the adding speed of new blocks cannot be too fast. Imagine that you just synchronized a block to generate the next block based on it, but at this time, other nodes have new blocks to generate, and you have to give up half of the calculation and synchronize again. Because each block can only be followed by one block, you can always generate the next block after the latest block.
 
        So you have no choice but to synchronize as soon as you hear the signal. So Nakamoto Cong, the inventor of blockchain, whose real identity is still unknown, deliberately makes it difficult to add new blocks. His design is that on average, one new block can be generated in the whole network every 10 minutes, which is only six in an hour. This output speed is not achieved by command, but by deliberately setting a large amount of calculation. In other words, only through an extremely large number of calculations can we get the effective hash of the current block, so as to add new blocks to the blockchain. It's too much calculation to speed up. This process is called mining, because the difficulty of calculating the effective hash is like finding a qualified sand in the sand of the world.
 
        The machine that calculates the hash is called a miner, and the person who operates the miner is called a miner. After reading this, you may have a question. People say that mining is difficult, but isn't mining just using computers to calculate a hash? This is the strength of computers. How can it become difficult to calculate it too late. It turns out that not any hash can be accepted. Only the hash that meets the conditions will be accepted by the block link. This condition is so harsh that most hashes do not meet the requirements and must be recalculated. The validity of hash is closely related to the target value. Only the hash smaller than the target value is valid. Otherwise, the hash is invalid and must be recalculated. Since the target value is very small, the chance of hash smaller than this value is extremely slim. It is possible to calculate one time only after one billion times.
 
        This is the fundamental reason why mining is so slow. As mentioned earlier, the hash of the current block is uniquely determined by the block header. If you want to calculate the hash repeatedly for the same block, it means that the block header must change constantly, otherwise it is impossible to calculate a different hash. All eigenvalues in the block header are fixed. In order to make the block header change, Ben Cong deliberately added a random term called nonce. Lucky line C; Maybe I'll find nonce in a moment. Bad luck line C; Nonce is not found, that is, it is impossible for the current block body to calculate the hash that meets the conditions. At this time, the agreement allows the miners to change the block body and start a new calculation.
 
        As mentioned in the previous section, mining is random, and there is no guarantee that a block will be produced in exactly ten minutes. Sometimes it will be produced in a minute, and sometimes it may not be produced in a few hours. Overall, with the improvement of hardware equipment and the growth of the number of mining machines, the calculation speed will be faster and faster. In order to keep the output rate constant in ten minutes, moto also designed a dynamic adjustment mechanism of the difficulty coefficient. He stipulated that the difficulty coefficient should be adjusted every two weeks in 2016 blocks. If the average generation speed of the block in these two weeks is 9 minutes, it means that it is 10% faster than the legal speed, so the next difficulty coefficient will be increased by 10%. If the average generation speed is 11 minutes, it means that it is 10% slower than the legal speed, so the next difficulty coefficient will be reduced by 10%.
 
        The difficulty coefficient is adjusted higher and higher, and the target value is smaller and smaller, which makes mining more and more difficult. Even if the blockchain is reliable, there is still a problem to be solved. If two people write data to the blockchain at the same time, that is, two blocks are added at the same time, because they are connected to the previous block, forming a bifurcation. Which block should be adopted at this time. The current rule is that new nodes always adopt the longest blockchain. If the blockchain has forks, we will see which branch reaches six new blocks first after the fork point, which is called six confirmations. It can be confirmed in an hour according to the calculation of a block in 10 minutes. Since the generation speed of new blocks is determined by computing power, this rule means that the branch with most computing power is an authentic blockchain.
 
        As an unmanaged distributed database, blockchain has been running for 8 years since 2009 without major problems. This proves that it is feasible. However, in order to ensure the reliability of data, blockchain also has its own costs. First, it takes at least ten minutes for efficiency data to be written into the blockchain, and it takes more time for all nodes to synchronize data. Second, the generation of energy consumption blocks requires miners to perform countless meaningless calculations, which is very energy-consuming. Concept, application scenario) network disk address: Password: TiFe alternate address (Tencent micro cloud): Password: ehmy8h in recent years,. At this stage, you need to master the dual system development environment of Linux and windows, establish object-oriented thinking, and be able to abstract and classify problems.
 
        Master the basics. Concurrency theory. The main contents include: go language introduction and development environment, basic types, operators, process control, functions, engineering management, composite types, object-oriented programming, exception handling, text file processing, cases: development practice. Go is an open source. Software becomes easy. Go was developed by robertgriesemer, robpike and kenthompson at the end of 2007, and later joined ianlancetaylor,. Terms, including mining, miners, ore pools, mines, target values, mining difficulty, computational power and other concepts.
 
        Understanding these concepts will help us understand better. Route, go language learning route, go language notes, go language development back-end route, cryptography principles, fabric, hyperledger, docker container technology, GIT, nginx,. Development project, redis Technology (triple master and triple master-slave expansion), distributed algorithm, cryptocurrency development process, upload it to GitHub, if you like, please give me a ⭐⭐ Constantly updating Bitcoin, a necessary tool for mining, is produced by mining. Every 10 minutes, the miners in the whole network calculate an arithmetic problem together. As long as the answer is calculated first, it is equivalent to digging this.
 
        Blockchain is computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. in the Internet era. 1.0 era: bitcoin Zhongben Cong announced bitcoin in 2008 by publishing bitcoin: apeer to peer electroniccashsystem. The general equivalent of "intermediary" is money. Money is made by shells???? It became metal and then paper money. The information revolution in the 20th-21st century has caused huge social problems. Abstract netizen 123: complex documents, especially academic ones, have many small problems, such as the character layout of formulas is disordered, the page numbers are all wrong, the line spacing of PDF is inexplicably larger, and so on. Even if the compatibility mode is turned on, it can only be compatible with office10.
 
        
Previous:Ouke cloud chain Xu star's new book "interesting financial history" is published in simple terms to interpret the 5000 year history of financial reform
Next:No more

Related articles:



© 2005-2032 | Blockchain Circle & & All Rights Reserved    Sitemap1 Sitemap2 If there is infringement, please contact us at: