为广大币圈朋友提供币圈基础入门专业知识!
当前位置首页 > 区块链知识> 正文

区块链orderer是什么意思,区块链order节点

发布时间:2023-12-15-20:07:00 来源:网络 区块链知识 区块   orderer

区块链orderer是什么意思,区块链order节点


请查看相关英文文档

Ⅰ (Translation) Basic Concepts of Hyperledger Official Document (3) - Node (Peer)

Hyperledger is a project initiated by the Linux Foundation, aiming to provide a set of enterprise A high-level blockchain application framework to facilitate the development of applications based on blockchain technology.

Basic concepts of Fabric

Initially, the application will select a group of peers to generate ledger update proposals. Which peers will be selected based on the endorsement policy, which determines which organizations need to endorse the update proposal before broadcasting the ledger update proposal. This will affect the consensus method. Any organization that cares about whether the update proposal is endorsed will confirm whether the proposal is endorsed before broadcasting the update proposal to the peer and being accepted by the peer.

When a peer endorses a proposal response, it adds its own digital signature to the response and signs the entire response with its own private key. The endorsement content can then be used to prove that the response was generated by a peer from an organization. In our example, if peer P1 belongs to organization 1 (Org1), then endorsing E1 is equivalent to proving that transaction T1 and response R1 on L1 are provided by peer P1 of Org1.

The first phase ends when the application has received a sufficiently signed proposal response.
We noticed that peers may return different information, so the same transaction may have inconsistent return information. This may be due to the fact that responses are generated at different times, by different peers, in different ledger states, and in most cases the application can request an updated proposal response multiple times. Another more serious, but very unlikely, reason is the inconsistent response caused by the uncertainty of the chain code. Uncertainty is the enemy of chaincode and the ledger. If this happens, it will be very serious for the proposed transaction, and the inconsistent proposal response will definitely not be submitted to the ledger. An independent node is notIt is possible to know that the outcome of a trade is non-deterministic, and the trades must be compared in aggregate before the non-deterministic trade is detected (strictly speaking, even this is not enough, but we defer this discussion to the trading section, where non-deterministic is discussed in detail sex).

At the end of the first phase, the application can safely discard inconsistent responses to end the transaction process early if it so wishes. We will see later that if an application submits to the ledger with an inconsistent response, it will be rejected.

Process 2 Packaging
The second transaction process is packaging. The key point in the process of the Orderer node is that it receives endorsed proposal transaction responses from many applications. The Orderer sorts transactions and packages a large number of transactions into blocks, and prepares to distribute the blocks to all peers connected to the Orderer, including endorsing peers.

The first role of the orderer is to package ledger update proposals. In the example above, application A1 sends a transaction T1 endorsed by E1 and E2 to Orderer O1. At the same time, application A2 sends a transaction T2 endorsed by E1 to Orderer O1. O1 packages the transaction from A1, the transaction from A2 and other transactions into block B2. We can see that the order of transactions in block B2 is T1, T2, T3, T4, T6, T5, not necessarily in the order of arriving at the orderer node (this example shows a very simple orderer configuration).

The Orderer node will receive ledger update proposals sent by different applications in the network Channel at the same time. The task of the Orderer node is to organize these update proposals in a pre-defined order and package them into blocks to prepare for the next distribution. These blocks will make up the blockchain. Once the Orderer node generates a block of the desired size, or the maximum waiting time is exceeded, the Orderer will send the block to the Peer connected to its specific Channel. The third process will elaborate on this process.

There is no direct relationship between the order of transactions in the block and the order in which transactions arrive at the Orderer node. Transactions can be arranged in any order in the block, and this order is the order in which transactions are executed. The point is that there is a strict ordering of transactions, but the exact ordering is not important.

The strict order of transactions in the block makes Fabric different from the situation in the public chain where a transaction can be packaged into multiple different blocks. In Fabric, this cannot happen. The block generated by multiple Orderers is the final block, because after the transaction is written into the block, the position of the transaction is sequential.The order is determined. This means there will be no forks in Fabric. Once a transaction is written into a block, it cannot be rewritten later.

We can see that the peer stores the ledger and chain code, and the orderer does not store these at all. When each transaction reaches the orderer, the orderer just mechanically packages the transaction into a block, regardless of the value, amount, etc. of the transaction. This is an important feature of Fabric. All transactions will be sorted out in a strict order, and no transaction will be discarded.

By the end of the second phase, we can understand that the orderer's responsibility is to simply collect transaction update proposals, sort them, package them into blocks, and prepare for distribution.

Process 3 Verification
The last transaction workflow is to distribute and verify the blocks from the orderer to the peer. If the verification is successful, it will be submitted to the ledger.
In particular, in each peer, every transaction in the block is verified before being updated to the ledger to ensure that all transactions are endorsed by the relevant organization. Failed transactions will be retained for future review and will not be updated in the ledger.

In addition to its packaging role in process 2, Orderer is also responsible for distributing blocks to peer nodes in process 3. In this example, O1 distributes blocks to P1 and P2. P1 processes block 2 and then adds block 2 to P1’s ledger L1. At the same time, P2 processes block 2 and then adds block 2 to P2’s ledger L1. Once the operation is completed, the ledger L1 has been updated in both P1 and P2, and each peer can send the processing results to the application connected to them.

The orderer distributes blocks to the peers connected to him is the beginning of process 3. A peer connected to a channel of the orderer node will receive a copy of the new block generated by the orderer. Each peer node processes the received blocks independently, but all peers process blocks in the same way. In this way, ledgers in different peers can reach a consensus. Not all peers must be connected to the orderer node. Blocks can be transferred between peers through the gossip protocol, so that peers can process the same block independently.

After receiving a block, the peer will process the transactions in the order they appear in the block. For each transaction, the peer will check whether the transaction is endorsed by the organization related to it according to the chaincode endorsement policy that generated the transaction. For example, some transactions may require endorsement by only one organization, while other transactions require endorsement by multiple organizations to be valid. thisA verification process verifies that the results or outputs produced by all relevant organizations are consistent. Please also note that the third phase of verification is different from the first phase. In this phase, the application only receives the response from the endorsing node and determines whether it needs to send a transaction proposal. If the application sends the wrong transaction and violates the endorsement policy, the peer can still reject the transaction during the third stage of verification.

If the transaction endorsement is correct, the peer will try to submit the transaction to the ledger. In order to be able to write the ledger, the peer must perform a ledger consistency check to ensure that the current ledger status is consistent with the updated ledger status. This state is not always consistent, even if the transaction has full endorsements. For example, another transaction may have already updated the same asset in the ledger, so that the transaction we are updating will never be written to the ledger. In this case, the ledger in each node must maintain consensus through the network, and the verification method of each node is the same.

After the peer verifies each independent transaction, the ledger will be updated. Failed transactions are saved for review. This means that the block in the peer is the same as the block received from the orderer, except for the flag in the block indicating the success or failure of the transaction.

We should also note that the chaincode is not executed in the third phase. This step will only be completed in the first phase, which is important. This means that the chaincode is only available to the endorsing node, not the entire network, which ensures the security and privacy of the chaincode in the endorsing organization. This is different from receiving the execution result of the chain code. The execution result will be shared with all peers in the Channel, regardless of whether they can endorse the transaction. Endorsement nodes are designed in this way to facilitate expansion.

Finally, each time a block is submitted to the peer's ledger, the peer will generate a corresponding event. Block events contain all the contents of the block, while block transaction events only contain brief information, such as whether the transactions in each block are valid. Chaincode events generated by chaincode execution can also be published at this time. Applications can register for these events and receive notifications when these events occur. These notifications are completed during the third and final stage of the transaction workflow.

In general, we can know that the blocks generated by the orderer in the third stage are continuously synchronized to the ledger. The strict ordering of transactions in blocks allows each peer in the blockchain network to consistently verify transactions and submit them to the ledger.

Orderer and Consensus
The entire transaction workflow is called consensus, because all peers agree on the ordering and content of the transaction, and the orderer node coordinates it during the execution process. Consensus is a multi-step process, and the application will only receive notification at the end of the consensus process, but the notification time may be different on different peers.

We will discuss more later orDerer, now, think of orderer as just the process of collecting and distributing ledger update proposals from the application to the peer, and the peer verifies and updates the ledger.

Ⅱ What is the concept of blockchain? Read it in three minutes!

On October 25, 2019, Xinwen Broadcast sent a very important signal: the country must vigorously develop blockchain. After that, blockchain has become an Internet celebrity, and the figure of "blockchain" is floating in the streets and alleys. In fact, many technology companies have already deployed blockchain technology.

Although blockchain is very popular, many people do not know much about blockchain.

What is blockchain?

Let’s first take a look at how Du Niang explained it. Network display: Blockchain is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithms.

Why is blockchain called blockchain?

The blockchain is linked by blocks one by one, and the blocks are storage units that record the communication information of each block node. The blocks are much like the records of a database. Each block is a storage unit. Writing data every time creates a block. With the expansion of information exchange, one block continues with another, and the result is called a blockchain.

What are the characteristics of blockchain?

Blockchain mainly has the following characteristics:

1. Decentralization: In the blockchain system, every node has equal rights. and obligations, there is no central control here. Decentralization has well established trust relationships with each other. Although there is no central management organization, people can collaborate with each other and trust each other. This mainly applies blockchain distributed ledger technology.

2. Openness: Blockchain data is open to everyone. Except for some encrypted information that is not open, everyone can check the data here.

3. Independence: The entire blockchain system does not rely on other third parties. All nodes can automatically and securely verify and exchange data within the system without any human intervention.

4. Security: Blockchain has a certain degree of security and cannot be tampered with. Because everyone in the blockchain system has the same ledger, if someone wants to tamper with it, it is possible to forge a non-existent record only if they control more than 51% of the accounting nodes. Of course, this is basically impossible. This is mainly due to the core technology of the blockchain: the consensus mechanism. The consensus mechanism has the characteristics of "the minority obeys the majority" and "everyone is equal".

5. Anonymity: Many people think that if the blockchain is so open and transparent, then we don’t have it.Privacy? In fact, no, although the transaction information in the blockchain is open and transparent, the identity information of the account is encrypted and can only be accessed with authorization.

Now let me tell you a story to help you better understand the blockchain.

There are three people in the family, mom, dad, older brother and younger brother. Last year, my father was in charge of the family's account books. He was responsible for all the family's income and expenses alone.

However, on the day of Double Eleven, my mother, who has always been frugal, wanted to buy herself a beautiful piece of clothing on a certain online store. When she checked the account book, she found something was wrong. It stands to reason that except for some money deposited in banks and financial management, the whereabouts of the daily consumption money at home are all in this account book, but no matter how you look at it, it is wrong. Some consumption is clearly not recorded, but is recorded.

Later, my father took the initiative to confess that he couldn’t help but buy a pack of cigarettes.

Later, my mother changed her strategy and the whole family kept accounts. Everyone recorded their monthly consumption expenditure in their own account books. Whenever there was a transaction or consumption at home, my mother would shout, "Book it," and everyone would record the transaction in their own books. This is the decentralized accounting model, where everyone is the center and everyone has a ledger.

The previous accounting model for dad was centralized accounting. If dad wanted to do something alone, it would be difficult for anyone to see it. The decentralized accounting model has solved the problem of centralization very well. The disadvantage of bookkeeping is that it is very difficult for dad to tamper with the books.

For example, if my father wants to take some money from the ledger and secretly buy cigarettes, the amount of money is limited, and if he wants to take the money, he has to change the ledger, but he only tampered with his own ledger. No, he had to change the accounts of three people including himself. And this is undoubtedly more difficult than reaching the sky.

So, many times my father had the idea of ​​smoking, but he had no choice but to give up the idea due to the current situation.

Are blockchain and Bitcoin the same thing?

In fact, blockchain and Bitcoin are not the same thing. It is just the underlying technology of Bitcoin. Bitcoin is the first digital currency applied by blockchain.

In 2008, Satoshi Nakamoto first proposed the concept of blockchain. In the following years, it became a core component of the electronic currency Bitcoin, serving as a public account book for all transactions. Blockchain was first applied to Bitcoin.

The origin of blockchain is to solve the problem of trust, and one of the most successful applications of blockchain is digital currency. Bitcoin is arguably the most successful application of blockchain so far.

What are the applications of blockchain?

The application of blockchain is actually veryExtensive. In addition to digital currency, the future applications of Bitcoin are still very extensive. Blockchain technology has been widely used in different industries. Such as product traceability, copyright protection and transactions, payment and settlement, Internet of Things, digital marketing, medical care, etc., promoting different industries to quickly enter the "blockchain+" era.

1. Payment and clearing: Blockchain can abandon the role of transit banks, realize point-to-point payment, reduce transit fees, and accelerate fund utilization.

2. Product traceability: For example, if we buy a piece of clothing on a certain store, we can see the past and present life of this piece of clothing.

3. Securities trading: Traditional securities trading requires the coordination of four major institutions, which is inefficient and costly. Blockchain technology can independently complete one-stop services.

4. Supply chain: Introducing blockchain technology into the supply chain system, synchronizing information within the system can control all links, better complete division of labor and collaboration, and facilitate subsequent accountability.

5. Intellectual property rights: With copyright on the chain, our photographic works, musical works, literary works, etc. will become our information, and the ownership of the information will be confirmed and become our property.

III What does blockchain mean and how to understand it

Blockchain is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.

Blockchain is an important concept of Bitcoin. It is essentially a decentralized database. As the underlying technology of Bitcoin, it is a series of related cryptographic methods. Each data block contains a batch of Bitcoin network transaction information, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block.



Notes

1. Blockchain Originated from Bitcoin, on November 1, 2008, a person claiming to be Satoshi Nakamoto published the article "Bitcoin: A Peer-to-Peer Electronic Cash System", which elaborated on P2P network technology, encryption technology, The architectural concepts of electronic cash systems such as timestamp technology and blockchain technology mark the birth of Bitcoin.

Two months later, the theory came into practice, and on January 3, 2009, the first genesis block with serial number 0 was born. A few days later, block number 1 appeared on January 9, 2009, and was connected to the genesis block number 0 to form a chain, marking the birth of the blockchain.

2. In order to realize the great leap forward development of blockchain finance, in order to promote the new development of China’s economy, accelerate the circulation of global assets, and realize the dream of rejuvenation that generations have been striving for, Puyin Group launched the On the 9th, a Puyin Blockchain Finance Guiyang Strategy Release Ceremony was held in Guizhou. At the meeting, blockchain implementation will be discussed.The digital circulation of current assets, blockchain financial transaction models, and the application of blockchain services and social public industries will be discussed.

IV What is blockchain technology? What are the core components of blockchain technology?

What is blockchain technology? What are the core components of blockchain technology?

What is blockchain technology:
Blockchain is a new application model 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 that establishes trust and obtains rights and interests between different nodes in the blockchain system.
Blockchain is an important concept of Bitcoin. It is essentially a decentralized database and serves as the underlying technology of Bitcoin. Blockchain is a series of data blocks generated using cryptographic methods. Each data block contains information about a Bitcoin network transaction and is used to verify the validity of its information (anti-counterfeiting) and generate the next block.
The core components of blockchain technology:
Blockchain mainly solves the trust and security issues of transactions, so it proposes four technological innovations to address this issue:
The first one is called distribution A type of ledger means that transaction accounting is completed by multiple nodes distributed in different places, and each node records a complete account, so they can all participate in supervising the legality of the transaction and can also jointly testify for it.
Different from traditional distributed storage, the uniqueness of blockchain distributed storage is mainly reflected in two aspects: First, each node of the blockchain stores complete data according to the block chain structure. Traditional distributed storage generally divides data into multiple parts for storage according to certain rules. Second, the storage of each node in the blockchain is independent and of equal status, relying on the consensus mechanism to ensure storage consistency, while traditional distributed storage generally synchronizes data to other backup nodes through the central node. [8]
No node can record ledger data independently, thus avoiding the possibility of a single bookkeeper being controlled or bribed to record false accounts. Also because there are enough accounting nodes, theoretically, unless all nodes are destroyed, the accounts will not be lost, thus ensuring the security of the accounting data.
The second one is called asymmetric encryption and authorization technology. The transaction information stored on the blockchain is public, but the account identity information is highly encrypted and can only be accessed with authorization from the data owner. This ensures data security and personal privacy.
The third one is called the consensus mechanism, which is how all accounting nodes reach a consensus to determine the validity of a record. This is both a means of identification and a means of preventing tampering. Blockchain proposes four different consensus mechanisms, which are suitable for different application scenarios and strike a balance between efficiency and security.
The consensus mechanism of the blockchain has the characteristics of "the minority obeys the majority" and "everyone is equal".points, where "the minority obeys the majority" does not entirely refer to the number of nodes, but can also be computing power, the number of shares, or other characteristics that computers can compare. "Everyone is equal" means that when a node meets the conditions, all nodes have the right to give priority to the consensus result, which will be directly recognized by other nodes and may eventually become the final consensus result. [8]
Taking Bitcoin as an example, it uses proof of work. Only when more than 51% of the accounting nodes in the entire network are controlled, it is possible to forge a non-existent record. When there are enough nodes joining the blockchain, this is basically impossible, thus eliminating the possibility of fraud.
The last technical feature is called smart contracts. Smart contracts are based on these trustworthy and non-tamperable data and can automatically execute some predefined rules and terms. Take insurance as an example. If everyone's information (including medical information and risk occurrence information) is true and trustworthy, it will be easy to automate claims settlement in some standardized insurance products.
In the daily business of insurance companies, although transactions are not as frequent as those in the banking and securities industries, the reliance on trusted data continues unabated. Therefore, the author believes that using blockchain technology from the perspective of data management can effectively help insurance companies improve their risk management capabilities. Specifically speaking, it is mainly divided into risk management of policyholders and risk supervision of insurance companies.

What is the core layer of blockchain technology?

Chongqing Jinwowo Analysis: The consensus mechanism is the core of blockchain technology. The consensus mechanism largely determines the degree of mutual trust between nodes in the entire blockchain system, and also determines other users’ views on the blockchain. The degree of trust in online data

What is the core component of blockchain technology?

Analysis by Chongqing Jinwowo: Blockchain technology consists of three core technologies: consensus mechanism, common defense mechanism, and distributed storage.
The three core technologies are supported by machine trust, that is, through the support of network technology, breakthroughs in difficult problems such as point-to-point transaction, decentralization, non-tampering of recorded information, irreversible transactions, and information encryption are achieved through network technology support.

What are the advantages of blockchain technology? Classification of blockchain technology?

The development of blockchain technology is becoming more and more prosperous with the continuous expansion of applications. This powerful development force coming from the needs of various industries has caused rapid changes in blockchain technology, allowing various industries to achieve great results. The results are attracting more and more attention, and professional technology and resources are constantly concentrated in this industry, thus bringing the development of blockchain technology to a new stage, and the impact of this development of blockchain technology has also much attention.
When talking about blockchain technology, Bitcoin has to be mentioned. Many people know that the electronic currency Bitcoin does not rely on the issuance of a specific monetary institution, but is generated through a large number of calculations by a specific algorithm. In fact, the core that truly supports Bitcoin is blockchain technology.
How does the invisible and intangible Bitcoin operate through blockchain technology? IndustryThe interpretation circulated in the industry is that blockchain can be regarded as a technical solution for collectively maintaining reliable databases through "decentralization" and "trustlessness". In layman’s terms, this technology can be understood as a technology in which everyone participates in accounting. In the past, people used centralized servers to keep accounts, but in the blockchain technology system, everyone can participate in accounting and jointly identify Authenticity of records.
"Through this technology, even if there is no neutral third-party organization, two parties that do not trust each other can achieve cooperation. In short, the blockchain is like a 'machine that creates trust.'" Bubi Company It is a leading blockchain service provider in China. It has made many breakthroughs in the blockchain technology platform, can meet scenarios with tens of millions of users, and has the ability to quickly build upper-layer application businesses.
The blockchain technology used by all parties involved in recording and storing information adopts a decentralized distributed structure, which saves a lot of intermediary costs and can better ensure data security; at the same time, it has a timestamp that cannot be tampered with. It can effectively solve problems such as data tracking and information anti-counterfeiting.
Will it become the next trend of Internet finance?
Although blockchain emerged with Bitcoin, the derived value of this technology has transcended digital currency. Bubi Blockchain focuses on the innovation of blockchain technology and products. It already possesses a number of core technologies and has developed its own blockchain service platform. With decentralized trust as the core, we are committed to building an open value circulation network to allow digital assets to flow freely. What Bubi wants to do is to create a new technology and product - to realize real value circulation and bring the Internet to a new level. With the application of this technology, there will be no central organization when transferring assets, and direct transfer of assets between us can be achieved.
In the current international financial market, the U.S. Central Bank, Swiss Bank, and some insurance and futures companies are all competing to develop blockchain technology. Fang Liang introduced that in the Internet financial industry, blockchain technology will first affect financial infrastructure such as payment systems, securities settlement systems, and transaction databases; later, the technology will also expand to general financial services, such as credit systems and "anti-money laundering" "wait.
"The payment and clearing system in the financial field will evolve towards decentralization. The electronic ledger supported by blockchain technology is a reliable system that is error-free and cannot be tampered with. It has various functions for payment, clearing, transaction, confirmation of rights, etc. A profound impact," Li Yan said.
Therefore, industry insiders believe that blockchain technology may be the next trend in the Internet financial industry. As the interconnection of all things deepens, Yang Tao, assistant director of the Institute of Finance, Chinese Academy of Social Sciences, also said that blockchain will make it possible for all individuals to become important nodes in the allocation of financial resources, and will also promote the improvement of existing financial system rules. Build a shared and win-win financial development ecosystem.
Blockchain technology will affect many industries
“Blockchain technology has extensive applications in the era of big data.” Li Yan said frankly that at present, in addition to Internet finance,In the financial field, blockchain technology has been applied in many fields and has shown great prospects.
For example, the healthcare industry has benefited greatly from blockchain technology. In reality, patient private information leaks often occur, and centralized database or file cabinet management in medical departments is no longer the optimal choice. Medical institutions are using blockchain technology to keep patients' private information confidential.
In addition, blockchain technology also has important legal implications. In some civil fields, it is often necessary to provide evidence to determine blame, and blockchain technology can record every step and help judicial authorities identify the specific responsible person.
"Especially in the field of assets, whether it is physical assets such as real estate and cars, or intangible assets such as health and reputation, this technology can be used to complete registration, transactions, and tracking. It can be said that any production and life that lacks trust In all fields, blockchain technology will have its place."
The development of blockchain technology has also brought about changes in the operational concepts of various industries. New technologies and new concepts have promoted new developments in various industries. This The impact of this driving force on society and the promotion of economic activities are also huge. Many new industry phenomena will occur one after another, and the public is also waiting and watching, expecting this brand-new technology to be used by various industries and better benefit all industries.

What is blockchain technology? What does blockchain technology mean?

The so-called blockchain technology, also known as distributed ledger technology, is an Internet database technology that is characterized by decentralization. , open and transparent, allowing everyone to participate in database records.
Explained in layman’s terms: If the database is assumed to be a ledger, reading and writing the database can be regarded as a bookkeeping behavior. The principle of blockchain technology is to find out the fastest and best bookkeeping within a period of time. This person will keep accounts, and then send this page of information to everyone else in the entire system. This is equivalent to changing all the records in the database and sending them to every other node in the entire network, so blockchain technology is also called a distributed ledger.

What is the core technology of Jinwowo blockchain technology?

Chongqing Jinwowo analyzes the core technologies of blockchain technology as follows:
Distributed ledger technology, asymmetric encryption technology and smart contracts.

What is the core of Jinwowo blockchain technology?

The core of the blockchain is that it stores all information in an independent personal computer network, making it a decentralized and distributed structure.
This means that the system is not owned by a controlling company or person, but that everyone can use and run the system.

What is the core function of Renren blockchain technology?

I specifically checked the information to answer your question! Renren blockchain service allows users to quickly build their own IT infrastructure and blockchain services on a flexible and open cloud platform. useBaaS can greatly reduce the cost of implementing the underlying technology of the blockchain, simplify the construction and operation and maintenance of the blockchain, and at the same time, face the scenarios in various industry fields, meet the personalized needs of users, and quickly deliver customized BaaS in one stop. Hope to adopt

What is blockchain technology?

Blockchain has been hyped up like crazy, but you know nothing about it!

Blockchain is a distributed database system participated by different nodes and an open ledger system.

It consists of a series of data blocks or data packets generated according to cryptographic methods, that is, blocks. Each block of data information is automatically timestamped, thus Calculate a data encryption value, that is, a hash value (hash).

Blockchain technology is essentially a distributed accounting technology. It allows everyone to have an instantly synchronized account book in their hands. Every transaction that occurs in the entire network will have thousands of backups and synchronous records. When perpetrators attempt to tamper with ledger data, they must change the ledger in the hands of the majority of people to achieve their goal.

IV Blockchain Alliance Chain (3) Understanding Fabric

Fabric is the core blockchain framework launched by the Hyperledger Alliance. It is suitable for building within complex enterprises and between enterprises. Alliance chain. According to the goals of the Hyperledger Alliance, Fabric is built as a modular basic alliance chain framework that supports pluggable components. ;

Unlike Ethereum-based Quorum, Fabric only considered inter-enterprise applications from the beginning. Its unique channel concept connects enterprises in different subnets according to different business purposes. Each subnet corresponds to a channel, and each channel has its own independent blockchain. Quorum obviously has only one public network (all enterprise nodes join it), and private business between enterprises is completed through Private Manager.

The simplest way to understand channel is to analogize it to a Topic provided by a message service. In fact, Fabic was first implemented based on Kafka's distributed message service.

In the Fabric network, an enterprise can have one or more nodes join the entire alliance chain; an enterprise can join 1 or more Channels (subnets); a node can join 1 or more channels. Each channel forms a subnet, so Fabric is a network composed of subnets.

So how does Fabric implement the execution of smart contracts and complete business uploading (recording transaction results in the blockchain)?

Unlike other frameworks, Fabric divides the entire process into three stages:

Business endorsement stage: The endorsement node sent by the customer's request completes the business calculation through smart contracts (but does not update the status), and completes the endorsement; returns the endorsement result to the client.

Business sorting phase: The client sends the endorsement results to the ordering node (orderer) through the Channel. The ordering node completes the sorting of transactions, packages them into blocks, and finally distributes them to all connected The node of the channel.

Business verification and writing to the ledger stage: Through the Gossip network, all Channel nodes will receive the new block. The nodes will verify each transaction in the block to determine whether it is valid: valid will be followed by In the new world state, invalid ones will be marked as "invalid" and the world state will not be updated, but the entire block will be completely added to the ledger (including invalid transactions).

Based on the above description, Fabric nodes can actually be divided into , ordinary nodes and Order nodes:

Peer, ordinary nodes, complete endorsement (including execution of contracts only) and Verification.

orderer, sorting node, completes sorting.

The Fabric network that joins the orderer node can be described as follows:

Each Channel defines all nodes belonging to the channel, but it is not necessary that all nodes are connected to the Orderer Nodes (private data or transactions can be spread between nodes through gossip protocol communication).

In the blockchain, consensus is the basis of the blockchain. Different from the public chain, the consensus of the alliance chain requires that all transactions added to the ledger are deterministic and final, that is, there cannot be forks, the order between blocks is certain, and there is only one chain. In Fabric, this objective requirement is realized by sorting. All transactions will be submitted to the orderer node to obtain a determined order, and finally packaged into blocks and entered into the ledger. Fabric is supported starting from 1.4.1Supporting the implementation of sorting services based on Raft can be considered to achieve consensus based on Raft.

The RAFT-based sorting service has better distribution and simpler configuration than the early Kafka. It is a commonly used consensus algorithm in alliance chains. Quorum uses RAFT as the consensus by default. layer. Simply put, RAFT is a leader and follower model. All nodes joining the RAFT network have a leader at any time. Only this leader has the right to decide the order of transactions and package them into blocks. Other nodes can only submit transactions as followers. and sync block.

Based on the FAFT network, each enterprise can have one or more nodes participating in the Orderer. In Frabric, the network connection between enterprises can be changed into the following form:

Users of blockchain are called EOA (External of Account) in Ethereum, and the carrier of EOA is a wallet. Let's use this concept to see how Fabric implements users and initiates transactions. EOA in Fabric is a certificate (x.509) issued by the CA center. A Certificate represents an Identity (this is still very different from Ethereum. An EOA in Ethereum is actually a hash address). The channels that EOA can participate in And the authorized operations are determined by the MSP (Membership Service Provider) of the channel (as shown below).

Note: Certificate is a common method of verifying identity in cryptography; certificate contains personal information, public key and signature of the CA that issued the certificate. The verifier only needs to have the CA's certificate (including the CA's public key) to verify whether the signature is correct and whether the content of the certificate has been tampered with. Simply put, through CA and Certificate, we can obtain a verifiable identity and trust chain.

As shown in the picture above, fabric Zhongtong uses Wallet as the carrier of EOA. A Wallet can contain multiple Identities (x.509 certificate). Identity PassVerify correctness through the chain of trust provided by the CA.

After verifying the identity, Fabric uses MSP to resolve in the blockchain network whether the identity represents a member of the organization and what role it has within the organization. For example, the channel will first verify whether the current user Identity is a valid identity, then check the enterprise and role it has through MSP, and finally determine whether the user has the right to perform operations.

It can be said that Fabric access control is completed through MSP. An MSP needs to be defined every time access control is required. For example, each channel defines an MSP, which specifies the access rights to resources within the channel range. MSP is an obscure concept in Fabric, and it is also the basis for providing secure access between enterprises.

As mentioned earlier, Fabric divides business processing and Internet access into three parts: endorsement, sorting, and adding to the ledger after verification.

Endorsement is the stage in which Fabric executes smart contracts. In Ethereum, smart contracts are executed in the EVM and are supported in multiple languages. In Fabric, smart contracts are called chaincode: A chaincode can be understood as a container of smart contracts, which can contain one or more smart contracts. It is not used in EVM. Chaincode is executed in JVM or NodeJS.

Client applications access the ledger through smart contracts. Each accessible smart contract is installed on a node accessible to the client and is defined in the channel. (Nodes with smart contracts are called endorsement nodes, nodes without smart contracts are called unsubmitted nodes, and submitting nodes only maintain ledgers)

The client application submits a transaction request, and the request reaches the endorsement node , the endorsement node will first verify the customer's signature to ensure that the customer's identity has the right to execute this transaction, then execute the smart contract (chaincode) mentioned in the transaction, and generate an endorsement response (or transaction proposal, trans-proposal). This endorsement response usually contains the world state's read set, write set, and the node's signature for this transaction. The main difference here from the Ethereum alliance chain is that the endorsement phase only simulates transactions and does not actually update the transaction results. The real update transaction is completed in the third phase. The endorsement node finally sends the generated endorsement response fanhui to the client, and the execution of the smart contract part ends.

Usually the execution of a transaction requires the signatures of multiple parties, so the client needs to send a transaction to multiple endorsement nodes.The selection of nodes needs to meet the requirements of the endorsement policy.

The following figure is a network diagram including customers, endorsement nodes, and submission nodes.

According to Fabric’s official reference document, the process of successful customer transactions can be described in the following figure.

As shown in the figure above, from 1 to 3, it is the endorsement stage, 4 is the sorting stage, and 4.1, 4, 2, 5 are the verification and submission stages. Refer to Frabic's node concept to learn more about the concept of transaction details.

Generally speaking, Fabric is more focused on inter-enterprise. Through the above, everyone can have a general understanding of the basic composition and concepts of Fabric. Fabric itself is not mysterious. It uses existing inter-enterprise technologies. For a better understanding, it is recommended to read Support for Distributed Messaging Systems and Enterprise Security Infrastructure (CA related). Compared with the Ethereum-based alliance chain implementation, Fabric's subnet concept is more adaptable to complex inter-enterprise applications, but its complex security considerations make operating costs very high. In addition, Fabric uses Certificate as user identity, which has great The limitations of Fabric will be changed in the new 2.0.

In the next article, we will take a look at Sawtooth, a blockchain framework provided by Inter.

Blockchain Alliance Chain (1) Understanding Ethereum

Blockchain Alliance Chain (2) Understanding Quotum

Blockchain Alliance Chain (3) Understanding Fabric

Alliance Chain of Blockchain (4) Understanding Sawtooth

Ⅵ What is the concept of blockchain

Concept: Blockchain is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.

The essence of the blockchain is a distributed public ledger. Anyone can verify this ledger, but no single user can control it. Participants in a blockchain system jointly maintain a ledger: it can only be modified according to strict rules and consensus.

The development of blockchain has gone through three stages:

1. Incubation period: 2009-2012, the economic form was dominated by Bitcoin and its industrial ecology.

2. Embryonic period: The period is from 2012 to 2015. Blockchain entered the public view with Bitcoin, new wallet payment and remittance companies appeared, and the blockchain economyspread to the financial sector. The underlying technology of blockchain continues to innovate. Blockchain technology is divorced from the Bitcoin system.

3. Development period: In 2016, industry applications began to be explored, and a large number of blockchain startups emerged. The popularity of ICO in 2017 brought unprecedented attention to blockchain.

(6) What is a blockchain orderer? Extended reading:

Three characteristics of three blockchains:

1 , The core idea of ​​the blockchain is decentralization: in the blockchain system, the rights and obligations between any nodes are equal, and all nodes have the ability to vote with computing power, thus ensuring the recognition of The result is recognized by more than half of the nodes. Even if it suffers a severe hacker attack, as long as the number of nodes controlled by the hacker does not exceed half of the total number of global nodes, the system will still be able to operate normally and the data will not be tampered with.

2. The biggest disruption of blockchain lies in the establishment of credit: in theory, blockchain technology can make WeChat Pay and Alipay no longer valuable. "The Economist" gave a vivid metaphor to the blockchain: simply put, it is "a machine that creates trust." Blockchain allows people to collaborate without trusting each other and without a neutral central authority. Combating counterfeit currency and financial fraud will no longer be needed in the future.

3. The collective maintenance of blockchain can reduce costs: In a centralized network system, the maintenance and operation of the system rely on the operation, maintenance and operation of platforms such as data centers, and costs cannot be omitted. Anyone can participate in the nodes of the blockchain. While participating in the recording, each node also verifies the correctness of the recording results of other nodes, which improves maintenance efficiency and reduces costs.

In one sentence, blockchain touches money, trust and power, which are the fundamental foundations on which human beings rely for survival.

Ⅶ What is blockchain, and can blockchain be invested in?

What is blockchain, and can blockchain be invested in?

Blockchain Technology is an emerging concept after the introduction of the Internet concept. It mainly solves the information asymmetry in society and decentralized services. Give an example to explain what blockchain technology is:

Usually we deposit cash into the bank. Every time we withdraw money, the transfer must go through the bank system to complete. So if we use blockchain technology To solve this problem, then our money does not need to be placed in the bank. When transferring money to others, we only need to transmit data on the chain. The transfer record data will be recorded by the entire network, and the consumption path of the amount can be found at any time. , there is no need to go through any intermediary to complete the intermediate recording.

This is just one of the scenarios where blockchain technology is applied. At present, the payment industry, gaming industry, lottery gambling industry, etc. are the most widely used blockchain technology.

In the nascent stage of the development of blockchain technology, many investors will naturally see the development potential and prepare to invest in blockchain.How to invest in blockchain? Everyone knows that with the emergence of blockchain technology, digital currency will be generated, and the circulation of digital currency will generate value. Ordinary people can invest in blockchain by purchasing digital currency. Common digital currencies include Bitcoin, Ethereum, Yuzi, etc. However, the risk is extremely high. The return is much higher than that of stock investment, but the risk is also several times higher. Therefore, when investing in blockchain, the choice of digital currency is also very important. For novice investors, it is recommended to choose mainstream currencies, such as Bitcoin, Ethereum and Ripple. Their value has been basically recognized, they have a consensus mechanism, and the price will not drop significantly. However, the corresponding blockchain technology is still the best. Ethereum.

For professional risk control investors, you can choose to invest in blockchain companies, taking a fancy to their long-term value and tokens. Nowadays, blockchain companies will issue coins, which are so-called digital currencies. However, their value is zero and they have no actual circulation significance. Therefore, when choosing to invest in a blockchain company, you still need to clearly see the content of the company's projects, whether they can be truly implemented, and how much potential they have for changing human life in the future.

Ⅷ Fabric national secret transformation records and ideas - specific work (3)

VII. MSP membership service module transformation

(1), fabric Member identities are based on standard x509 certificates, and the secret keys use the ECDSA algorithm. The PKI system is used to issue digital certificates to each member. Only nodes in the same MSP within the channel can distribute data through the Gossip protocol;

msp/identities.go

msp/cert.go

msp/mspimplsetup.go

  msp/mspimplvalidate.go

msp/mspimpl.go

8. Orderer node module transformation

(1) The orderer node is in the fabric It is at the core of the architecture. Its main function is to sort and package transactions, generate new blocks, and then broadcast the data through the consensus algorithm;

(2) The consensus mode of the orderer node module is, solo stand-alone Mode, kafka message queue mode, etcdraft consensus algorithm mode, the kafka mode was initially used, and later switched to etcdraft mode in order to reduce resource overhead;

(3) If the kafka mode consensus is used, it is required Confirm whether kafaka's tls connection supports the national secret algorithm, and then decide whether to modify kafka's tls;

 (4). The list of modified program files is as follows:
                          orderer/ common/cluster/comm.go

orderer/common/cluster/connections.go

orderer/consensus/kafka/config.go

9 , Peer node module transformation

(1) Peer is the cornerstone of the blockchain network, including ledgers and chain codes. Applications or administrators must manage network resources through nodes;

(2),The channel corresponds to the ledger, and a peer node can access multiple channels, so a node can have multiple copies of the ledger;

(3) The chaincode and common parts have been modified in the national secret transformation;< br />
(4), the list of program files is as follows:

Peer /Common /Common.go

Peer /Common /PeerClient.go

Peer/common/ordererclient.go

peer/chaincode/common.go

10. Vendor directory state secret transformation

(1) The list of modified program files is as follows:

VENDOR /GITHUB.com /Shopify /Sarama /Config.go
Summary:

to the end So far, the national secret modification of the fabric has been completed. After the modification, compile it through the compilation method mentioned above, and then test it. If there are bugs, we will deal with them appropriately. When encountering problems and solving them, it is better to become familiar with the system. The way.

Ⅸ What is blockchain

Blockchain is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Simply put, blockchain is a decentralized distributed ledger database.


The meaning of data storage:

Data storage is a temporary file or processing process generated during the processing of data flow the information you need to find. Commonly used storage media are disks and tapes. How storage is organized varies depending on the storage medium. Data on the tape is only accessed in sequential file mode; on the disk, it can be accessed sequentially or directly according to the usage requirements.

The data storage method is closely related to the organization of data files. The key is to establish the correspondence between the logical and physical order of records and determine the storage address to improve the data access speed. Among the various connection methods between servers and storage, DAS was once considered an inefficient structure and inconvenient for data protection.

Direct-attached storage cannot be shared, so it often happens that a certain server has insufficient storage space, while other servers have a large amount of idle storage space that cannot be used.

X What does blockchain mean and what are its main uses

In recent years, a hot word has appeared frequently on the Internet, that is "blockchain". This word gives people It’s a very noble and powerful feeling, but many people don’t know what blockchain means? And what are the main uses of blockchain? Let’s take a look at the relevant content that has been issued.

Blockchain Blockchain is actually equivalent to a disintermediated database, which is composed of a string of rubber data blocks. Each of its data blocks contains information about a Bitcoin network transaction, which is used to verify the validity of the information and generate the next block. In other words, blockchain is essentially a decentralized database.

In a narrow sense, blockchain is a chain data structure that combines data blocks in a chronological order and is cryptographically guaranteed. Distributed ledger that cannot be tampered with or forged. Broadly speaking, blockchain is actually a distributed infrastructure and computing method that is used to ensure the security of data transmission and access.

In addition, the blockchain is composed of six infrastructures: data layer, network layer, consensus layer, incentive layer, contract layer and application layer. Regarding its role, blockchain is mainly used to solve the trust and security issues of transactions. The above is the relevant content about the meaning and function of blockchain. I hope it can help friends in need.

博客主人唯心底涂
男,单身,无聊上班族,闲着没事喜欢研究股票,无时无刻分享股票入门基础知识,资深技术宅。
  • 38687 文章总数
  • 3637394访问次数
  • 3087建站天数