Reading blockchain with playing mahjong
blockchain is an important concept of bitcoin. It is essentially a disintermediated database. At the same time, as the underlying technology of bitcoin, it is a series of data blocks generated by using cryptographic methods. Each data block contains the information of a bitcoin network transaction, which is used to verify the effectiveness of its information (anti-counterfeiting) and generate the next block
blockchain is a new application mode of distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and other computer technologies
in a narrow sense, blockchain is a kind of chain data structure that combines data blocks in a sequential way according to the time sequence, and it can not be tampered with and forged by cryptography
broadly speaking, blockchain technology uses blockchain data structure to verify and store data, uses distributed node consensus algorithm to generate and update data, and uses cryptography to ensure the security of data transmission and access It is a new distributed infrastructure and computing method to program and operate data by using intelligent contract composed of automated script code
extended data:
the evolution mode of blockchain is as follows:
& 9642; Blockchain 1.0 - digital currency
▪ Blockchain 2.0 - digital assets and smart contracts
▪ Blockchain 3.0 - Implementation of distributed applications in various instries
blockchain features:
1. Disintermediation. Due to the use of Distributed Accounting and storage, there is no centralized hardware or management organization in the system, the rights and obligations of any node are equal, and the data blocks in the system are jointly maintained by the nodes with maintenance function in the whole system
2. Openness. The system is open. In addition to the private information of all parties to the transaction is encrypted, the data of the blockchain is open to all. Anyone can query the blockchain data and develop related applications through the open interface, so the information of the whole system is highly transparent
3. Autonomy. Blockchain adopts consensus based specifications and Protocols (such as a set of open and transparent algorithms) to enable all nodes in the whole system to exchange data freely and safely in a de trusted environment, so that the trust in "people" is changed into the trust in machines, and any human intervention does not work
The information can not be tampered with. Once the information is verified and added to the blockchain, it will be stored permanently. Unless more than 51% of the nodes in the system can be controlled at the same time, the modification of the database on a single node is invalid. Therefore, the data stability and reliability of the blockchain are extremely high5. Anonymity. Because the exchange between nodes follows a fixed algorithm, the data interaction does not need to be trusted (the program rules in the blockchain will judge whether the activity is effective). Therefore, the counterparties do not need to make the other party trust themselves by disclosing their identities, which is very helpful for the accumulation of credit
Chinese Mahjong: the world's earliest blockchain project
first of all, a initiates an application. I want to play mahjong and set up a mahjong Bureau, which is equivalent to creating a block, and this block will be broadcast to B, C, D, a, B, C, C, C, C, C, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D D...
in the process of playing mahjong, the above four people constantly play cards, which can be understood as mining, through what to mine? Mahjong machine can understand the mineralization machine. These four miners are the so-called miners. These four miners collide from 144 mahjong, and any right card can be Hu card. We can understand the 144 mahjong as a series of hash values (numbers). The process of Hu card is called computational power. Until Hu card, it means that the right hash value is collided and you can get a reward, Each person will pay the corresponding chips to C and put them in the blockchain. The reward is bitcoin or other virtual coins
Why do the other three people take the initiative to reward C? That's because these people have automatically reached a consensus that C has indeed won, and everyone has recorded the account, including the family members who are sitting next to buy horses. It's not good to deny it, otherwise when it comes out that the character is not good, no one will play with him again. After all, the circle is very important
when we reached a consensus, we didn't see any intermediary or third party judging that C had won, and the rewards given to C didn't need to be transferred to C through the third party. All of them were direct point-to-point transactions. This process was decentralization. The card players (miners) recorded their own achievements in the first game, and the third team won the first game, After the record is completed, a complete block is generated. But remember, this is only the first round. In the whole blockchain, this is just a node. The first eight rounds are finished, that is, eight nodes (blocks). Eight blocks are connected together to form a complete account book, which is the blockchain. Because everyone has one account book, it is a distributed account book. The purpose is to prevent someone from tampering with records. In the end, it is clear who wins or loses.
decentralization. Blockchain technology does not rely on additional third-party management institutions or hardware facilities, and there is no central control. In addition to the self-contained blockchain itself, each node realizes information self verification, transmission and management through distributed accounting and storage. Decentralization is the most prominent and essential feature of blockchain
openness. Blockchain technology is based on open source. In addition to the private information of all parties involved in the transaction is encrypted, the data of blockchain is open to everyone. Anyone can query blockchain data and develop related applications through the open interface, so the information of the whole system is highly transparent
independence. Based on consensus specifications and Protocols (similar to various mathematical algorithms such as hash algorithm used by bitcoin), the whole blockchain system does not rely on other third parties, and all nodes can automatically and safely verify and exchange data in the system without any human intervention
in the distributed network of blockchain, the communication and trust between nodes need to rely on digital signature technology, which mainly realizes the identity confirmation and information authenticity and integrity verification
digital signature
digital signature (also known as public key digital signature, electronic signature) is a kind of common physical signature written on paper, but it uses the technology in the field of public key encryption to identify digital information. A digital signature usually defines two complementary operations, one for signature and the other for verification. Only the sender of information can proce a digital string which can not be forged by others. This digital string is also an effective proof of the authenticity of the information sent by the sender. Simply prove that "I am who I am."
openness mainly refers to that the stored information in the blockchain is completely open to all participants. This is mainly determined by the point-to-point network storage mode of the blockchain. In the blockchain network, each node can store a of the blockchain, and the uniqueness of the blockchain can ensure that the is exactly the same between different nodes
security mainly refers to that the information stored in the blockchain block is saved after being processed by digital encryption technology, and only the private key holder can decrypt the information to obtain the real information. Other members can only see and verify the integrity and uniqueness of information, but cannot see the real information
uniqueness is mainly e to the fact that the information on the blockchain cannot be tampered with once it is on the chain, so it is unique. Of course, the uniqueness here also includes the uniqueness in space, that is, all nodes have only one version of information, and also includes the uniqueness in time, that is, the historical data cannot be changed. This uniqueness also means that the blockchain maintains the characteristics of a unique main chain in the process of operation, and once other chains appear, it is a bifurcation. The emergence of bifurcation will lead to the plication of blockchain in two different spatial dimensions. Of course, to solve this problem, we need to set reasonable consensus rules to avoid. When the concept of blockchain was hot, many related top domain names were registered and used as blockchain platforms.