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
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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…