-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-1913] Connect to anchor peers at join Channel
When the peer joins a channel it gets a list of anchor peers. We need the gossip layer to reach out to these anchor peers and connect to them. - Added 2 tests (one in the discovery module and one in the gossip module) I tested this using the following setup: used docs/docker-compose-channel.yml And added another peer, and didn't give that peer a bootstrap peer, so both peers don't know of each other at startup. Then I created an anchorPeer file with the ip address (172.21.0.4) and port of one of the peers. After that, I created a channel with that anchor peer file, and made the other peer to join the channel. The peer tried contacting the anchor peer (looked at the gossip communication logs) and tried authentication with it: Sending tag:EMPTY signature:"[xxx]" conn:<pkiID:"172.21.0.4:7051" cert:"[yyyyy]" > to 172.21.0.4:53637 WARN 213 Remote endpoint claims to be a different peer, expected [PEM FILE] but got [fake PKI-ID I use until MSP is integrated with gossip] This proves that when joinChannel is called upon a peer with suitable anchor peer configuration, the peers try to connect to one another. Signed-off-by: Yacov Manevich <yacovm@il.ibm.com> Change-Id: Ia033f81eeaf38cb53cb65dc06a01dca07342386b
- Loading branch information
Showing
5 changed files
with
129 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters