The reason why blockchain is called chain is that there are many
"blockchain is equivalent to this account book, and the block is equivalent to a page of this account book. The information carried in the block is the transaction content recorded on this page. The blockchain is block by block, and each block is filled with transaction records and connected together to form a chain, which is called blockchain. "
take bitcoin as an example, there is a "power race" every ten minutes to compete for the right to charge. It's like saying that you have a lot of calculation power, just like your muscles are stronger and more capable of fighting. Everyone will convince you to keep this account, that is, the right to write a block (note that it is not the content in the block) to the general ledger of the blockchain. However, it should be noted that computing power can only determine the probability of winning the competition. For example, there are several lotteries in total, and those with more computing power can buy more to improve the winning probability. However, those who buy more may not win the lottery in the end.
blockchain is a data block chain guaranteed by such computing power. Starting from the first block, each block collects data according to certain rules, and then attaches a value to these data, so that the result of the formed data block after similar one-way function calculation falls into a certain range. By estimating the computing power of the whole network and the size of the control result range, the data blocks that meet the requirements can be found in a long enough time. This calculation result will be included by the next block, and the chain data structure formed in this way is called blockchain
each small ledger is called a block, and each different blockchain protocol (generating different cryptocurrency) will specify the size of each block (the initial bitcoin is 1m). The ledger constitutes a block, the block constitutes a chain list, and the block header contains the hash value of the previous block, which is the blockchain. In this way, no one can modify the content or exchange the order at will. If you do, it means you need to recalculate all the special numbers
regulations allow everyone in the world to build blocks. Every person who builds a new block (finds this special number - sha256 value has 30 zeros) can get a reward. For this part of people (miners) who build a new block:
1. There is no sender information, There is no need to sign
2. Each new block will add a new virtual (encrypted) currency to the whole currency
3. The process of building a new block is also called "mining": it requires a lot of work and can inject new currency into the whole economy
4. The work of mining is: receiving transaction information, building blocks, broadcasting blocks, Then get new money as a reward
for each miner, each block is like a small lottery, and everyone is trying to guess the number quickly until a lucky person finds a special number, so that there are many zeros at the beginning of the hash value of the whole block, and they can get a reward. I remember a Zhihu respondent gave an image analogy. Blockchain is like a king with a beautiful daughter (block). Many young people are looking forward to it. The king's method is to give a very difficult topic for all young people to calculate (learning to change their lives), Who can calculate quickly (or be lucky in the process of calculating the hash value) will be able to win the beauty
for users who want to use this system to collect and pay, they don't need to listen to all the transactions, but just listen to the blocks broadcast by the miners, and then update them to their saved blockchain
"block" can also be imagined as a box, There are some digital currencies and a small note in the block, on which the only transaction information generated in the past ten minutes is recorded, such as "small a transferred to small B100 yuan"; Of course, this piece of information must have been encrypted to ensure that only small a and small B (through the key in their hands) have the ability to interpret the real content
after this magical block was created, it was soon buried underground. Where is it buried? No one does not know that all computer nodes need to participate in digging three feet before it is possible to find (find an effective workload proof). Obviously, this is an event with huge workload and random results. However, for the computer node, once the block is g out from the ground, it will get the valuable digital currency in the block, as well as the tip paid by small a in the process of "small a transferred to small B100 yuan". At the same time, for this node, only he has the right to truly record the contents of the note, which is an honor, while other nodes can only use its , a without digital currency blessing. Of course, there are some other special things about this magical block.
the process of computer nodes digging out blocks from underground is called "mining". As I said just now, this is a huge workload, a lot of luck and a lot of profits. A node on zhangheng road in Pudong New Area of Shanghai, China, suddenly jumped out and said excitedly, "I've g the block! The little notes inside are all valid! The reward belongs to me! ". Although Zhang Heng Road node has got digital currency at the moment, for other computer nodes, because it also involves some other interests, they will not choose to believe what Zhang Heng Road node says by default; Based on the principle that strangers do not trust each other, they take the so-called block () g by Zhang Heng Road node, and start to check whether the small note information in the block is true and effective, etc. In the world of blockchain, nodes check the accuracy of the small note information, or indirectly or directly judge whether the node that successfully digs out the block is lying How to define the true and effective information of a small note will be explained later, but I won't go into details here. In the verification process, each node will directly express their identification (accurate) and attitude towards zhangheng road node through the following two behaviors: stop half or even 80% of the mining process; Add the block () g out by zhangheng road node to the end of its own blockchain. You can be a little confused: if you stop mining, you may have done 80% of the mining work. Then 80% of the previous work is in vain?! Then, what the hell is at the end of the blockchain? For the first puzzle. I want to say that what you said is right, but there is no way. The reality is so cruel. Even if 80% of the work is done, you have to give up. The 80% of the work can be regarded as useless, absolutely damaging the wealth and the masses. The second puzzle is, what is the ghost at the end of blockchain and blockchain? Here, it is not clear in advance, but you can simply imagine: blocks are generated and g out periodically, and a computer node may have executed "take blocks from others" n times in advance; The process of "checking the validity of small notes" must have stored n blocks on its own node, and these blocks will be arranged in a chain in order of time. Yes, this chain is what you always think of as the blockchain. If you still can't understand, it doesn't matter. There will be many opportunities for in-depth study later in the article
go into the more microcosmic world of the block and have a look at what the little note really is, how it came into being and its mission all its life: when initiating a transaction, the initiator will receive a little note, and he needs to write the transaction record, such as "stealing transfer to a piece of RMB 340" on the paper. It's amazing that when it's finished, on the back of the note, the transaction record will be automatically formatted to at least contain the two important fields of "input value" and "output value"“ Input value is used to record the effective source of digital currency, and output value is used to record the object to which digital currency is sent. The newly created note is immediately marked as an "unconfirmed" note. Small pieces of paper that are successfully g out of the ground and eventually connected to the blockchain are initially marked as "valid.". If the valid slip is used as the input value of other transactions, the valid slip will soon be marked as invalid. Due to various reasons, the block is disconnected and discarded from the chain, and the small notes once marked as "valid" in the block will be re marked as "unconfirmed". There is no concept of account balance in the blockchain. The digital asset you really own is actually a piece of transaction information; Get the balance in your digital wallet by simple addition and subtraction. The above 1, 2 and 3 are just the knowledge points forced to you at the beginning. Some of the descriptions may be a bit confusing, which makes you feel confused. Only by understanding the whole blockchain can you have a more comprehensive understanding of the mystery
block capacity. Bitcoin specifies that the block capacity is 1m when it is created, or in the source code. The reason why it was originally designed as 1m is, on the one hand, to prevent DoS attacks. On the other hand, when Zhongben Cong created the blockchain, the capacity was 32m. However, he changed the block capacity to 1m through a humble commit like "clear up". In order to prevent the volume of the blockchain from growing too fast, he added some mystery to the problem of block capacity. The capacity of 1m means that the maximum number of transactions processed by bitcoin is about 2400 (the size of 486882 block 1034.39 is very close)
to put it bluntly, blockchain is a small book for distributed bookkeeping, a tool for bookkeeping, and based on cryptography and cryptography technology, once data transactions are recorded in the book of blockchain, data can not be tampered with and denied. The Internet is the transmission of value, and the blockchain is the transmission of trust. Under the premise of blockchain technology as a credit endorsement, each node in the blockchain changes from a single center to a unified multi center with multi-party participation, which can achieve transaction transmission without the participation of a third party organization and improve the efficiency
blockchain refers to the technical solution of collective maintenance of a reliable database through centralization and distrust in the past, and it is a technical way for the whole people to participate in bookkeeping. Previous bookkeeping methods were all centralized and needed centralized intermediary, whether it was traditional government, financial institutions, notarization institutions or emerging e-commerce platform and online payment platform
in economic hypothesis, information is sufficient. In fact, it is precisely because of insufficient information that there are very large intermediaries. The existence of intermediaries increases the transaction cost and raises the transaction threshold. In essence, blockchain technology is a large-scale collaboration tool. It makes direct value transfer possible by using pure technology for the first time, and continues the trend of Internet decentralization and disintermediation. Disintermediated blockchain technology will greatly subvert the information intermediary instry
blockchain technology is the basic technology for building bitcoin data structure and encrypted transmission of transaction information, which realizes the issue and transaction of bitcoin. The core of blockchain technology is that all the current participating nodes jointly maintain the transaction and database, so that the transaction is based on the principle of cryptography rather than trust, so that any agreed parties can directly carry out payment transactions without the participation of a third party
technically, a block is a data structure for recording transactions, reflecting the capital flow of a transaction. In the system, the transaction blocks are connected to form a main chain, and all the nodes participating in the calculation record the main chain or part of the main chain
a block contains the following three parts: transaction information, hash formed by the previous block and random number. Transaction information is the task data carried by the block, including the private keys of both parties, the number of transactions, the digital signature of electronic currency, etc; The hash hash formed by the previous block is used to connect the blocks and realize the sequence of past transactions; Random number is the core of the transaction. All nodes compete to calculate the answer of the random number. The node that gets the answer the fastest generates a new block and broadcasts it to all nodes for updating, so as to complete a transaction.
blockchain is a digital account book that can be jointly bookkept, and will record all transactions that have occurred and have been unanimously recognized by the system it's the same as the whole family. You're bookkeeping, and your father and mother are also bookkeeping. They can see the general ledger, but the saved information can't be tampered with any more
In 2008, Nakamoto first proposed the concept of blockchain subsequently, blockchain has become the core component of electronic currency bitcoin, which serves as the public account book for all transactions. By using peer-to-peer network and distributed timestamp server, the blockchain database can be managed independentlyextended data:
type of blockchain
1, public blockchain
any indivial or group in the world can send transactions, and transactions can be effectively confirmed by the blockchain, and anyone can participate in its consensus process. Public blockchain is the earliest and the most widely used blockchain. The virtual digital currencies of bitcoin series are all based on public blockchain. There is only one blockchain corresponding to this currency in the world
2, Alliance (instry) blockchain
instry blockchain: multiple preselected nodes are designated as bookkeepers within a group, and the generation of each block is jointly determined by all preselected nodes (preselected nodes participate in the consensus process), and other access nodes can participate in the transaction, However, regardless of the bookkeeping process (in essence, it is still managed bookkeeping, only distributed bookkeeping, how many preselected nodes, and how to determine the bookkeeper of each block to become the main risk point of the blockchain), anyone else can conct limited query through the open API of the blockchain
3, private blockchain
only uses the general ledger technology of blockchain for bookkeeping. It can be a company or an indivial, and enjoys the write permission of the blockchain. This blockchain is not very different from other distributed storage schemes
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
Because the design of blockchain is a kind of protection measure, such as distributed computing system with high fault tolerance. Blockchain makes hybrid consistency possible. This makes blockchain suitable for recording events, titles, medical records and other activities that need to include data, identity management, transaction process management and provenance management. Blockchain has great potential for financial disintermediation and has great influence on guiding Global trade
extended data :
1. Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. The so-called consensus mechanism is a mathematical algorithm to establish trust and obtain interests between different nodes in the blockchain system
2. Blockchain is an important concept of bitcoin, which is essentially a disintermediated database and the underlying technology of bitcoin. Blockchain is a series of data blocks generated by cryptography. Each data block contains the information of a bitcoin network transaction, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block
3. Blockchain - the original blockchain is a kind of decentralized database, which contains a list called blocks, with continuously growing and orderly records. Each block contains a time stamp and a link with the previous block. The block chain is designed so that the data can not be tampered with. Once recorded, the data in a block will be irreversible
references : blockchain network
blockchain is an important concept of bitcoin, which is essentially a decentralized database and the underlying technology of bitcoin. Blockchain is a series of data blocks generated by cryptography. Each data block contains the information of a bitcoin network transaction, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block
let's talk about the social or economic significance of blockchain. In fact, many of the previous technologies were devoted to "proctivity". For example, artificial intelligence is a kind of progress in proctivity. The blockchain, which has greatly improved the proction relations, is committed to the proction relations. So why do you say that
because the so-called proction relationship is actually how to do business between people and business partners. And these things, originally, are in the cognitive process between people, and there is no special program to program or quantify it
for example, if you and I are good friends now, we can do business. If someone stirs up our relationship and we are not good friends, we will not do business. Even if we can make money in business, we will not do business because there is no trust between us
as for blockchain, it is actually because the data is authenticated by all nodes and backed up at the same time, so my data is as real as possible and can't be tampered with. In this case, if you believe my data, you can make a program on this basis, and then use the data to make what kind of business contract, what kind of service, what kind of service, and what kind of service, what kind of service, what kind of service, what kind of service, what kind of service, what kind of service, what kind of service, etc This "proction relationship" of commercial cooperation is programmed. In this way, we believe in the data and the program compiled by the algorithm. Because you believe in the data and the program, you can develop all kinds of apps in the program. These apps are the proction relations and what business to do. This is: blockchain is actually a reconstruction of "proction relationship".
From the perspective of technology and architecture, I will tell you my understanding of blockchain in common language
what is blockchain? In a word, blockchain is a storage system. To be more specific, blockchain is a distributed storage system without an administrator and each node has all the data
What are the common storage systems like
first, how to ensure high availability
the common storage system usually uses "rendancy" to solve the problem of high availability. As shown in the figure above, if the data can be copied into several copies and rendant to multiple places, high availability can be guaranteed. The data in one place is hung, and there is data in other places. For example, the master-slave cluster of MySQL is the same principle, and the raid of disk is also the same principle
two points need to be emphasized in this place are: data rendancy often leads to consistency problems
1. For example, in the master-slave cluster of MySQL, there is actually a delay in reading and writing, which means there is a inconsistency in reading and writing in a short period of time. This is a side effect of data rendancy
The second point is that data rendancy often reces the efficiency of writing, because data synchronization also consumes resources. If you add two slave libraries, the write efficiency will be affected. The common storage system is to use rendancy to ensure the high availability of dataso the second question, ordinary storage system, can write more
the answer is yes, for example, take this graph as an example:
in fact, MySQL can do a master-slave synchronization of al masters, master-slave synchronization of al masters, two nodes can be written at the same time. If you want to do a multi room multi live data center, in fact, multi room multi live data synchronization. What we should emphasize here is that multi-point writing often leads to the consistency problem of writing conflicts. Take MySQL as an example, suppose that the attribute of a table is self incrementing ID, then the data in the database is 1234 now. If one of the nodes writes and inserts a piece of data, it may become 5, and then these 5 pieces of data are synchronized to another master node, Before synchronization, if another write node inserts a piece of data, a piece of data with self incrementing ID of 5 will be generated. Then, after the generation, synchronize to another node, and the synchronized data will conflict with the two local 5's after it arrives, which will lead to synchronization failure and write consistency conflict. This problem will occur in the case of multi-point writing
how to ensure consistency in multi-point writing
the reform "Swan class" gives you more technical work