本文介绍了Hyperledger Fabric GOSSIP_BOOTSTRAP& GOSSIP_EXTERNALENDPOINTS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看docker配置文件,并在对等环境中找到了两个参数,如下所示:

I was looking into the docker configuration files and found two parameters in peer environment as shown below:

environment:
      - CORE_PEER_ID=peer0.org1.example.com
      - CORE_PEER_ADDRESS=peer0.org1.example.com:7051
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
      - CORE_PEER_LOCALMSPID=Org1MSP 

谁能解释两个变量 CORE_PEER_GOSSIP_BOOTSTRAP & CORE_PEER_GOSSIP_EXTERNALENDPOINT 有效.在对等体数目为奇数的情况下如何配置它们.

Can anyone explain what there two variables CORE_PEER_GOSSIP_BOOTSTRAP & CORE_PEER_GOSSIP_EXTERNALENDPOINT works. How they can be configured in case of odd number of peers.

详细的解释将不胜感激.

A detailed explanation would be really appreciated.

推荐答案

八卦只能在同一组织的同级之间或不同组织的同级之间使用.它始终限于特定渠道.

Gossip can be used just between peers in the same organization or between peers in different organizations. It is always scoped to specific channels.

1)单个组织中的同级之间的通信

1) Communication between the peers in a single organization

  • 一个对等方可能是领导者,可以连接到订购服务,并向其自己组织中的其他对等方交付商品块

  • One peer may be the leader and connect to the ordering service and deliver blocks to other peers in its own organization

一个对等方可以连接到其组织中的其他对等方以获取丢失的数据块

A peer can connect to other peers in its organization to obtain missing blocks

2)不同组织的同级之间的通信

2) Communication between peers in different organizations

  • 在v1.2中,使用私有数据功能时,八卦用于在认可时将私有数据分发给组织中的其他对等方

  • In v1.2 when using the private data feature, gossip is used to distribute the private data to other peers in the org at endorsement time

对等方可以从其他组织的对等方中获取已经提交的丢失的块

Peers can get missing blocks that have been already committed, from peers in other organizations

对等方可以在提交时从其他组织的对等方中丢失私有数据

Peers can get missing private data from peers in other organizations at commit time

为了使八卦切实可行,它需要能够为自己组织中的对等方以及从其他组织中的对等方获取终结点信息.

In order for gossip to actually work, it needs to be able to obtain the endpoint information for peers in its own organization as well as from peers in other organizations.

CORE_PEER_GOSSIP_BOOTSTRAP 用于引导组织中的八卦.如果您使用闲话,通常会在组织中配置所有对等点,以指向用于引导的一组初始对等点(您可以指定一个用空格分隔的对等点列表).当然,偏离路线的对等方也可以从不同的对等方进行引导,但是在这种情况下,您只需要确保所有对等方之间都存在引导路径即可.组织内的同位体通常将在其内部端点上进行通信(这意味着您不必公开公开组织中的所有同位体).当对等方联系引导对等方时,它将传递其端点信息,然后使用流言s语将有关组织中所有对等方的信息分发给组织中的对等方.

CORE_PEER_GOSSIP_BOOTSTRAP is used to bootstrap gossip within an organization. If you are using gossip, you will typically configure all the peers in your org to point to an initial set of peers for bootstrap (you can specific a space-separated list of peers). Off course peers can bootstrap from different peers as well, but in that case you just need to make sure that there's a bootstrap path across all peers. Peers within an organization will typically communicate on their internal endpoints (meaning you do not have to expose all the peers in an org publicly). When the peer contacts the bootstrap peer, it passes it's endpoint info and then gossip is used to distribute the info about all the peers in the organization among the peers in the organization.

为了使对等点能够在组织之间进行通信,再次需要某种类型的引导程序信息.初始的跨组织引导信息是通过通道配置中的锚点"设置提供的.这使加入频道的对等方也可以发现该频道上的其他对等方.但是很明显,最初,组织中的对等方将只知道那里组织的锚点对等体.如果要使组织中的其他对等对象与其他组织一起使用,则需要设置 CORE_PEER_GOSSIP_EXTERNALENDPOINT 属性.如果未设置,那么有关对等方的终结点信息将不会广播给其他组织中的对等方,实际上-该对等方只会被其自己的组织所了解.

In order for peers to communicate across organizations, again some type of bootstrap information is required. The initial cross-organization bootstrap information is provided via the "anchor peers" setting in the channel configuration. This allows peers who have joined a channel to discover other peers on the channel as well. But clearly initially a peer in on organization will only know about the anchor peers for there organizations. If you want to make other peers in your organization known to other organizations, then you need to set the CORE_PEER_GOSSIP_EXTERNALENDPOINT property. If this is not set, then the endpoint information about the peer will not be broadcast to peers in other organizations, and in fact - that peer will only be known to its own organization.

这篇关于Hyperledger Fabric GOSSIP_BOOTSTRAP& GOSSIP_EXTERNALENDPOINTS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 23:44