Hyperledger 交易如何在一个区块中排序?

How are Hyperledger transactions ordered in a block?

在比特币区块链中,node/peer 将对交易进行排序,创建一个区块,进行 PoW 和 "announces" 这个区块给其他矿工。

一旦其他矿工同意(通过散列区块+通知+等...)该区块是有效的,它就是区块链的一部分。

但是在 Hyperledger 中(据我所知)VPs 不进行挖掘(因此不传播挖掘的区块)。那么个人 VPs 如何对它们进行排序,以便所有 VPs 具有相同顺序的区块交易?

对于 Fabric 实现,目标是 (link):

Consensus is a method for validating the order of network requests, or transactions (deploy and invoke), on a blockchain network. The correct ordering of transactions is critical, because many types of network transactions have a dependency on one or more prior transactions (account debits often have a dependency on prior credits, for example). On a blockchain network, there is no single authority that determines the transaction order; instead, each blockchain node (or peer) has an equal say in establishing the order, by implementing the network consensus protocol. Consensus, therefore, ensures that a quorum of nodes agree on the order in which transactions are appended to the shared ledger. By resolving any discrepancies in the proposed transaction order, consensus guarantees that all network nodes are operating on an identical blockchain. In other words, consensus guarantees the integrity and consistency of blockchain network transactions.

尽管如此,在当前版本中有一个领导者(验证节点之一)负责在交易被其他节点执行之前对交易进行排序。

在下一个 Fabric 版本中,可以更改此行为 (Next Consensus Architecture Proposal):

A peer communicates with the consensus service and maintain the blockchain state and the ledger. Such peers receive ordered state updates from the consensus service and apply them to the locally held state

Peers are clients of the consensus service, to which the consensus service provides a shared communication channel offering a broadcast service for messages containing transactions. Peers connect to the channel and may send and receive messages on the channel. The channel supports atomic delivery of all messages, that is, message communication with total-order delivery and (implementation specific) reliability. In other words, the channel outputs the same messages to all connected peers and outputs them to all peers in the same logical order. This atomic communication guarantee is also called total-order broadcast, atomic broadcast, or consensus in the context of distributed systems. The communicated messages are the candidate transactions for inclusion in the blockchain state.