Hyperledger Fabric GOSSIP_BOOTSTRAP & GOSSIP_EXTERNALENDPOINTS

后端 未结 1 1367
一整个雨季
一整个雨季 2020-12-14 12:35

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

environment:
      - CORE_PEER_ID         


        
相关标签:
1条回答
  • 2020-12-14 13:02

    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) 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) Communication between peers in different organizations

    • 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 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.

    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.

    0 讨论(0)
提交回复
热议问题