1
1
Gossip data dissemination protocol
2
2
==================================
3
3
4
- Hyperledger Fabric optimizes blockchain network performance, security
4
+ Hyperledger Fabric optimizes blockchain network performance, security,
5
5
and scalability by dividing workload across transaction execution
6
6
(endorsing and committing) peers and transaction ordering nodes. This
7
7
decoupling of network operations requires a secure, reliable and
8
8
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
10
10
**gossip data dissemination protocol **.
11
11
12
12
Gossip protocol
13
13
---------------
14
14
15
15
Peers leverage gossip to broadcast ledger and channel data in a scalable fashion.
16
16
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
18
18
peers. Each gossiped message is signed, thereby allowing Byzantine participants
19
19
sending faked messages to be easily identified and the distribution of the
20
20
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
22
22
synced up to the current ledger state by contacting peers in possession of these
23
23
missing blocks.
24
24
25
25
The gossip-based data dissemination protocol performs three primary functions on
26
- a Hyperledger Fabric network:
26
+ a Fabric network:
27
27
28
28
1. Manages peer discovery and channel membership, by continually
29
29
identifying available member peers, and eventually detecting peers that have
@@ -36,12 +36,13 @@ a Hyperledger Fabric network:
36
36
37
37
Gossip-based broadcasting operates by peers receiving messages from
38
38
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
42
42
membership, ledger and state information continually being kept current and in
43
43
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.
45
46
46
47
Leader election
47
48
---------------
@@ -52,11 +53,11 @@ newly arrived blocks across peers of its own organization. Leveraging leader ele
52
53
provides system with ability to efficiently utilize bandwidth of the ordering
53
54
service. There are two possible operation modes for leader election module:
54
55
55
- 1. **Static ** - system administrator manually configures one peer in the organization
56
+ 1. **Static ** -- system administrator manually configures one peer in the organization
56
57
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
58
59
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.
60
61
61
62
Static leader election
62
63
~~~~~~~~~~~~~~~~~~~~~~
@@ -75,18 +76,17 @@ within the section of ``core.yaml``:
75
76
useLeaderElection: false
76
77
orgLeader: true
77
78
78
- Alternatively these parameters could be configured and overrided with environmental variables:
79
+ Alternatively these parameters could be configured and overridden with environmental variables:
79
80
80
81
::
81
82
82
83
export CORE_PEER_GOSSIP_USELEADERELECTION=false
83
84
export CORE_PEER_GOSSIP_ORGLEADER=true
84
85
85
86
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:
87
89
88
- 1. Following configuration will keep peer in **stand-by ** mode, i.e. peer will not try
89
- to become a leader:
90
90
::
91
91
92
92
export CORE_PEER_GOSSIP_USELEADERELECTION=false
@@ -136,13 +136,26 @@ within ``core.yaml``:
136
136
useLeaderElection: true
137
137
orgLeader: false
138
138
139
- Alternatively these parameters could be configured and overrided with environmental variables:
139
+ Alternatively these parameters could be configured and overridden with environmental variables:
140
140
141
141
::
142
142
143
143
export CORE_PEER_GOSSIP_USELEADERELECTION=true
144
144
export CORE_PEER_GOSSIP_ORGLEADER=false
145
145
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
+
146
159
147
160
Gossip messaging
148
161
----------------
@@ -170,18 +183,17 @@ to multiple channels, partitioned messaging prevents blocks from being dissemina
170
183
to peers that are not in the channel by applying message routing policies based
171
184
on peers' channel subscriptions.
172
185
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.
184
197
185
198
.. Licensed under Creative Commons Attribution 4.0 International License
186
199
https://creativecommons.org/licenses/by/4.0/
187
-
0 commit comments