fabric的原子广播

属于orderer模块的内容

提供两个服务Broadcast 和 Deliver

以下是proto的部分定义(fabric\protos\orderer\ab.proto)

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) {}
}

  • Broadcast :接收来自客户端已经收集好的背书结果,进行排序,共识等过程写入区块。
    Broadcast 请求消息包括链码的实例化、调用;通道的创建、更新。
  • Deliver:peer从orderer获取block的过程。请求是一个类别是DELIVER_SEEK_INFO ,内容是json的(应该是指json.Marshal),会返回一个或者多个块信息。

这两个服务都是peer与orderer之间的

fabric源码解析23——Orderer服务

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值