0 votes
1 view
in Blockchain by (4.1k points)

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


      - 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


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.

1 Answer

0 votes
by (14.4k points)

Gossip is something that is used between peers or nodes in the same organization or between peers or nodes of different organizations. When communication between peers is facilitated within a single organization, one peer is basically the leader and delivers to other blocks within the organization. Missing blocks can be obtained when peers connect within an organizational level. And when peers between different organizations communicate, gossip is used to distribute private data among peers in organizations at endorsement time, find missing blocks from other peers that are already committed, and fetch missing data at commit time. 

However, gossip can work only when it will be able to obtain endpoint information for peers across related organizations. 

CORE_PEER_GOSSIP_BOOTSTRAP is mostly leveraged to bootstrap gossip within an organization. While using gossip, users configure all peers in the org to point to an initial set of peers for bootstrap. Peers can bootstrap from different peers as well, but in that case they need to make sure that there is a bootstrap path across all peers. Endpoint info is passed when peers contact the bootstrap peer and further gossip is used to distribute the info about all the peers in the organization.

The "anchor peers" setting in the channel configuration allows peers who have joined a channel to discover other peers on the channel. But, peer in on organization at an initial level will only know about the anchor peers in their organization. If users need to make other peers in their organization known to other organizations, then you need to set the CORE_PEER_GOSSIP_EXTERNALENDPOINT property.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !