How to connect two instances of Hyperledger Fabric?

0 votes

I have an instance of Hyperledger Fabric running on Ubuntu and another running on Windows. What changes i have to make on both machines so that these two share their public ledger together? And where do i need to make these changes?

Jun 11, 2018 in Blockchain by Perry
• 17,010 points
57 views

1 answer to this question.

0 votes

Before getting on with your question, let me first tell you about the Hyperledger Fabric network entities:

  1. Network peer - used to maintain chaincodes (smart contracts), keeps replicated copy of the the ledger and most recent status update.

  2. Ordering service/ Consensus - key objective of it is to specify total order on incoming transactions and cut the block, which will be distributed among all peers.

In your case, I'd assume two instances simply means that you have two different organizations. So what you need to do is to:

  1. Define/decide where you would like to run ordering service which will take care of transactions order.

  2. Define a channel with two organizations

  3. In configtx.yaml you need to specify the address of the ordering service.

  4. Create a channel to generate genesis block

  5. Join all peers for both organization using the genesis block

Now since ordering service endpoint is endcoded in configuration transaction each organization will elect one peer to open connection to the ordering service to pull new blocks. Finally this leader will distribute blocks inside its own organization.
So, to make two "instance" (here I assume independent set of peers) connected you need to make them connected to same channel moreover you need to make sure they will be connected to same ordering service.
answered Jun 11, 2018 by Christine
• 15,790 points

Related Questions In Blockchain

0 votes
1 answer

How to connect channels of different systems in Hyperledger Fabric?

When you create a channel, you will ...READ MORE

answered Nov 20, 2018 in Blockchain by Omkar
• 67,290 points
60 views
0 votes
1 answer

How to control visibility of assets in Hyperledger Fabric?

you can use proof of Authority consensus ...READ MORE

answered Jul 10, 2018 in Blockchain by digger
• 27,630 points
96 views
0 votes
1 answer
0 votes
1 answer

Docker: How to connect Node.js in container to Hyperledger Fabric?

You need to map ~/.composer/cards of your Docker host ...READ MORE

answered Oct 31, 2018 in Blockchain by Omkar
• 67,290 points
81 views
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 27,630 points
58 views
+1 vote
1 answer
+15 votes
5 answers
0 votes
1 answer

How to register a user in Hyperledger Fabric?

Best practice would be to leverage an ...READ MORE

answered Sep 5, 2018 in Blockchain by Christine
• 15,790 points
394 views