first, fabric network structure (temporarily excluding CA)
As shown in the figure above, in the Fabric network, o indicates that ORDERER,P represents PEER,EP representative endorsing Peer (endorser), CC represents Chaincode, and client, Channel, Ledger, Transaction, which makes up the entire network, describes each of these elements:
Clients: A client installed at a node (Peer) can initiate a request to build a channel, or create and initiate a transaction (transaction), it cannot directly manipulate Chaincode, and must pass Peer.
Peer: Gets the blocks from the orderer to maintain the current state and store the local ledger (ledger).
Transaction: The deployment Transaction (Deploy Transaction) is used to generate a new Chaincode; the wake-up transaction (Invoke Transaction) is used to perform an operation through Chaincode.
Endorsing Peer: A special node that needs to define a list of standby nodes when deploying Chaincode within channel, and simulates the execution of the transaction on the standby node and returns the response when the client initiates the transaction.
Orderer: Responsible for the maintenance of multiple Channgel in the network, responsible for receiving the client through the standby policy after the transaction message, sorted the transaction into the block, and then passed to the channel all peer.
Channel: A subnet consisting of several nodes in a network used to isolate communication and information sharing between subnets and other nodes, peer can belong to different Channel.
Orderer System Channel: Is the first channel,channel created in the network can have multiple, but Orderer System Channel has and can only have one, it is based on the configuration file created, it has Read permission to see all the generated Channel, it is not recommended to run any applications in the channel.
Chaincode: is a program running on peer to read and write to the current state or book.
Ledger: An orderly, tamper-proof record of the execution results of all transactions in channel.
Anchor Peer: A node that belongs to more than one channel.
Leading peer:channel the node in charge of communicating with Orderer. Second, the network construction process system when the deployment begins, the Orderer system channel is automatically generated according to the channel configuration file, which is orderer on the first Channel,channel node in the network; Client sends CreateChannel message knot a orderer to create a channel,order a configuration template after multiple authentication and sends a config transaction with this new channel configuration to Orderer system Channel Client through the Orderer polling channel whether the creation of success, if successful, through the channel Send Joinchannel message invite the appropriate node to join the channel; Client call Installchaincode will Chaincode source storage location and related information to inform channel all nodes; Chaincode instantiation: The client sends the SENDINSTANTIATEPROPOSAL message to the Reserve book node through the channel, and decides whether to pass through the channel's preparation policy; The client encapsulates the signature of the reserve book node in the transaction message. Sent to Orderer, the Orderer is packaged into block and sent to other nodes, the other nodes after receiving the block to determine the validity of the transaction, if valid, the completion of the instantiation.
(5,6 's execution and transaction process are exactly the same, as detailed in the next article)