How can we connect a single Fabric - node/peer to different Fabric
networks?
A company called ABC is part of 2 networks and hosting 2 different nodes.
Can we create a network of networks where a single node can be part of many networks?
First of All,
In hyperledger fabric, we called network as a consortium
The consortium has a group of organizations, each organization can have (n) of orderers and peers
Coming to your question, yes peer can be part of multiple consortium as long as peer-organization is a member of that consortium
Related
Do you have any idea how am I going to connect 2 existing organizations from different machines using the existing channel of 1 organizations. Here is what I have as of now, Org1 is running in VM1 and Org2 is running in VM2 with both have there own chaincode installed. What I am trying to do is to connect Org2 to Org1 to a channel of Org1. I don't have any idea how am I going to do it since currently the only example that I have is only using the same VM. Thank you.
You can connect them through the channel.
Suppose that you have already all the url exposed of each components (peer, orderer ..) and that org1 hold the channel. You simply need give to org2 the right to join the existing channel.
Here a guide:
https://hyperledger-fabric.readthedocs.io/en/release-1.2/channel_update_tutorial.html
based on what you said, you should start the tutorial from the section "Generate the Org3 Crypto Material".
To connect organizations on different hosts, you'll need to create a Docker Swarm. Once you have all the hosts joined to docker swarm, you'll need to create an overlay network and make your containers join this overlay network.
You can start following this blog that describes a simple configuration for multiple hosts. For further reference, you can refer to this SO answer.
For deployment using Kubernetes, you can refer to this medium blog.
We've a below network setup for hyperledger fabric:
3 Ordering Service nodes, 4 Kafka brokers and 3 Organizations (2 peers in each organization)
Requirement is - we need to make sure leader peer from each organization is receiving blocks via deliver RPC from a "specific" ordering service node.
How can we configure a specific ordering service node for peers in fabric?
There's no "magic" way to configure something like this in Fabric. The orderer endpoint information is stored in the system channel so normally all 3 of the Ordering Service endpoints would be in their so that any peer from any organization is aware of all the endpoints (for fault tolerance).
With the current Kafka-based ordering service, you might be able to achieve what you want by only setting a single endpoint in the orderer addresses section and then making sure that each organization resolved that DNS name to the specific endpoint desired.
P2P has two different structures.
one is unstructured P2P and the other one is structured P2P.
I know fabric use hybrid-P2P.
And is it use strutured P2P?
Hyperledger Fabric really uses "structured" peer to peer communication.
Peers communicate with ordering service nodes and with other peer nodes.
Channels form the basis of the peer to peer communication (meaning that communication is scoped on a per channel basis).
For peer to orderer communication, this is structured based on channel definitions .... when a peer joins a channel, the channel definition is contained in the block passed via the JoinChannel API. This is a special type of block known as a config block and it contains the information about the ordering service endpoints, membership for the channel and optionally the endpoints of peers from other organizations (anchor peers).
Peers which belong to the same organization can also "gossip" and this is configured by setting a bootstrap peer when a peer starts up. From this, the peers within an org will "discover" each other.
If an organization chooses to expose public endpoints from multiple peers, peers from other organizations will discover these peers by connecting the to anchor peer for the other org for a given a channel.
This question is about orderers in different organizations. Is there any communication happens between two orderers of two different organizations? If so, how can we configure that and how does the consensus work?
(OR)
Is every organization has its own ordering service with multiple orderer nodes isolated from other organizations?
Any help understanding this would be appreciated.
There is only 1 ordering 'service'. This service is composed of several orderers. Usually just 3 or 5. All orderers communicate with the Kafka cluster which tells all the orderers what is included in a block. The orderers then send the new blocks to the peers. Peers may use any of the orderers. It is recommended to have all orderers within one Org. But I have run a configuration with 2 orderers in 1 org and 1 orderer in another org and it works fine.
In HyperLedger Fabric is it possible to create a channel between peers that belong to the same organization / MSP? If so, how can this be configured in crypto-config.yaml and configtx.yaml?
Just specify a single organization in the configtx.yaml
However, you have to include some orderer in the channel too.
The orderer can also be in the same organization as the peers.