Skip to content

Commit fdb823c

Browse files
joe-alewineJoe Alewine
joe-alewine
authored and
Joe Alewine
committedMar 26, 2018
[FAB-9083] Add Anchor Peer to Gossip doc
Staged here: http://joestaging-fabric.readthedocs.io/en/latest/gossip.html Questions about anchor peers are common. Adding this description. [ci-skip] Change-Id: I9e9795a39878f2b755db5df9613c15272a3f5df4 Signed-off-by: joe-alewine <Joe.Alewine@ibm.com>
1 parent c5aa104 commit fdb823c

File tree

1 file changed

+41
-29
lines changed

1 file changed

+41
-29
lines changed
 

‎docs/source/gossip.rst

+41-29
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
Gossip data dissemination protocol
22
==================================
33

4-
Hyperledger Fabric optimizes blockchain network performance, security
4+
Hyperledger Fabric optimizes blockchain network performance, security,
55
and scalability by dividing workload across transaction execution
66
(endorsing and committing) peers and transaction ordering nodes. This
77
decoupling of network operations requires a secure, reliable and
88
scalable data dissemination protocol to ensure data integrity and
9-
consistency. To meet these requirements, Hyperledger Fabric implements a
9+
consistency. To meet these requirements, Fabric implements a
1010
**gossip data dissemination protocol**.
1111

1212
Gossip protocol
1313
---------------
1414

1515
Peers leverage gossip to broadcast ledger and channel data in a scalable fashion.
1616
Gossip messaging is continuous, and each peer on a channel is
17-
constantly receiving current and consistent ledger data, from multiple
17+
constantly receiving current and consistent ledger data from multiple
1818
peers. Each gossiped message is signed, thereby allowing Byzantine participants
1919
sending faked messages to be easily identified and the distribution of the
2020
message(s) to unwanted targets to be prevented. Peers affected by delays, network
21-
partitions or other causations resulting in missed blocks, will eventually be
21+
partitions, or other causes resulting in missed blocks will eventually be
2222
synced up to the current ledger state by contacting peers in possession of these
2323
missing blocks.
2424

2525
The gossip-based data dissemination protocol performs three primary functions on
26-
a Hyperledger Fabric network:
26+
a Fabric network:
2727

2828
1. Manages peer discovery and channel membership, by continually
2929
identifying available member peers, and eventually detecting peers that have
@@ -36,12 +36,13 @@ a Hyperledger Fabric network:
3636

3737
Gossip-based broadcasting operates by peers receiving messages from
3838
other peers on the channel, and then forwarding these messages to a number of
39-
randomly-selected peers on the channel, where this number is a configurable
40-
constant. Peers can also exercise a pull mechanism, rather than waiting for
41-
delivery of a message. This cycle repeats, with the result of channel
39+
randomly selected peers on the channel, where this number is a configurable
40+
constant. Peers can also exercise a pull mechanism rather than waiting for
41+
delivery of a message. This cycle repeats, with the result of channel
4242
membership, ledger and state information continually being kept current and in
4343
sync. For dissemination of new blocks, the **leader** peer on the channel pulls
44-
the data from the ordering service and initiates gossip dissemination to peers.
44+
the data from the ordering service and initiates gossip dissemination to peers
45+
in its own organization.
4546

4647
Leader election
4748
---------------
@@ -52,11 +53,11 @@ newly arrived blocks across peers of its own organization. Leveraging leader ele
5253
provides system with ability to efficiently utilize bandwidth of the ordering
5354
service. There are two possible operation modes for leader election module:
5455

55-
1. **Static** - system administrator manually configures one peer in the organization
56+
1. **Static** -- system administrator manually configures one peer in the organization
5657
to be the leader, e.g. one to maintain open connection with the ordering service.
57-
2. **Dynamic** - peers execute a leader election procedure to select one peer in an
58+
2. **Dynamic** -- peers execute a leader election procedure to select one peer in an
5859
organization to become leader, pull blocks from the ordering service, and disseminate
59-
blocks to the other peers in the organization..
60+
blocks to the other peers in the organization.
6061

6162
Static leader election
6263
~~~~~~~~~~~~~~~~~~~~~~
@@ -75,18 +76,17 @@ within the section of ``core.yaml``:
7576
useLeaderElection: false
7677
orgLeader: true
7778

78-
Alternatively these parameters could be configured and overrided with environmental variables:
79+
Alternatively these parameters could be configured and overridden with environmental variables:
7980

8081
::
8182

8283
export CORE_PEER_GOSSIP_USELEADERELECTION=false
8384
export CORE_PEER_GOSSIP_ORGLEADER=true
8485

8586

86-
| **Note:**
87+
.. note:: The following configuration will keep peer in **stand-by** mode, i.e.
88+
peer will not try to become a leader:
8789

88-
1. Following configuration will keep peer in **stand-by** mode, i.e. peer will not try
89-
to become a leader:
9090
::
9191

9292
export CORE_PEER_GOSSIP_USELEADERELECTION=false
@@ -136,13 +136,26 @@ within ``core.yaml``:
136136
useLeaderElection: true
137137
orgLeader: false
138138

139-
Alternatively these parameters could be configured and overrided with environmental variables:
139+
Alternatively these parameters could be configured and overridden with environmental variables:
140140

141141
::
142142

143143
export CORE_PEER_GOSSIP_USELEADERELECTION=true
144144
export CORE_PEER_GOSSIP_ORGLEADER=false
145145

146+
Anchor peers
147+
------------
148+
149+
Anchor peers are used to facilitate gossip communication between peers from
150+
**different** organizations. In order for cross-org gossip to work, peers from one
151+
org need to know at least one address of a peer from other orgs (from this peer,
152+
it can find out about all of the peers in that org). This address is the anchor
153+
peer, and it's defined in the channel configuration.
154+
155+
Each organization that has a peer will have at least one of its peers (though it
156+
can be more than one) defined in the channel configuration as the anchor peer.
157+
Note that the anchor peer does not need to be the same peer as the leader peer.
158+
146159

147160
Gossip messaging
148161
----------------
@@ -170,18 +183,17 @@ to multiple channels, partitioned messaging prevents blocks from being dissemina
170183
to peers that are not in the channel by applying message routing policies based
171184
on peers' channel subscriptions.
172185

173-
| **Notes:**
174-
| 1. Security of point-to-point messages are handled by the peer TLS layer, and do
175-
not require signatures. Peers are authenticated by their certificates,
176-
which are assigned by a CA. Although TLS certs are also used, it is
177-
the peer certificates that are authenticated in the gossip layer. Ledger blocks
178-
are signed by the ordering service, and then delivered to the leader peers on a channel.
179-
2. Authentication is governed by the membership service provider for the
180-
peer. When the peer connects to the channel for the first time, the
181-
TLS session binds with the membership identity. This essentially
182-
authenticates each peer to the connecting peer, with respect to
183-
membership in the network and channel.
186+
.. note:: 1. Security of point-to-point messages are handled by the peer TLS layer, and do
187+
not require signatures. Peers are authenticated by their certificates,
188+
which are assigned by a CA. Although TLS certs are also used, it is
189+
the peer certificates that are authenticated in the gossip layer. Ledger blocks
190+
are signed by the ordering service, and then delivered to the leader peers on a channel.
191+
192+
2. Authentication is governed by the membership service provider for the
193+
peer. When the peer connects to the channel for the first time, the
194+
TLS session binds with the membership identity. This essentially
195+
authenticates each peer to the connecting peer, with respect to
196+
membership in the network and channel.
184197

185198
.. Licensed under Creative Commons Attribution 4.0 International License
186199
https://creativecommons.org/licenses/by/4.0/
187-

0 commit comments

Comments
 (0)
Please sign in to comment.