在 Hyperledger Fabric 中,客户端是向所有订单发送交易还是只向一个排序节点发送交易?

In Hyperledger Fabric, does a client send a transaction to all orders or only to one orderer node?

当客户订购交易时,他是将其发送给所有订购者(如在 PBFT 中)还是仅发送给 one/few 订购者?

答案是:"It depends".

在 Fabric 中,共识机制是可插入的,因此 - 任何人都可以实现自己的排序服务,只要它实现了 AtomicBroadcast gRPC API:

service AtomicBroadcast {
    // broadcast receives a reply of Acknowledgement for each common.Envelope in order, indicating success or type of failure
    rpc Broadcast(stream common.Envelope) returns (stream BroadcastResponse) {}

    // deliver first requires an Envelope of type DELIVER_SEEK_INFO with Payload data as a mashaled SeekInfo message, then a stream of block replies is received.
    rpc Deliver(stream common.Envelope) returns (stream DeliverResponse) {}
}

如果共识服务是 CFT 类型的,例如 Kafka 或 Raft - 那么客户端只需要将交易发送给单个排序者。

但是,那里有 unofficial implementations 的 Hyperledger Fabric 拜占庭容错共识服务,在这些实现中,客户端不能假设选定的排序者会诚实地包含其交易,因此它需要发送PBFT 论文中对所有节点的请求。

当 Fabric 将有一个正式的 BFT 排序器时,客户端将需要进行适当的配置。