Can anyone please guide me how can I add a new orderer from a new organisation to an already existing hyperledger fabric network. I have created all the certificates using fabric CA.
Orderer is an organization, So the process is almost same as adding a new organization.
The process is:
Prepare crypto material for new orderer
Add TLS certificate to System Channel
Fetch the latest configuration block for new orderer
Bring up new orderer container
Add new orderer end point to System Channel
Add TLS certificate to Application Channel
Add new orderer end point to Application Channel
We can find details on given link:
https://medium.com/#kctheservant/add-an-orderer-to-a-running-raft-based-orderer-cluster-b6a432da138c
Related
I am currently working at a blockchain project with Hyperledger Fabric, and I'm facing some issues.
The scenario I would like to achieve is the following:
three organizations (Org1, Org2, Org3) with one peer each
a private channel between Org1 and Org2, say channel12
a private channel between Org2 and Org3, say channel23
My problem is that I can't understand how to customize the provided Hyperledger Fabric test network, in order to achieve the described scenario.
How can I proceed?
You can customize the configuration of the test network in configtx.yaml (test-network/configtx/configtx.yaml). I would start by adding a definition for Org3, which you can model off the existing definitions for Org1 and Org2 under the Organizations section, then creating a new channel profile that includes (Org2, Org3) under the Profiles section.
If by private channel you mean:
There is a need to encapsulate all the attributes of a channel like the chaincode deployed and the peers on the channel. In this case, you can use the createChannel.sh script (test-network/scripts/createChannel.sh) to join Org1 and Org2 to a new channel, then use this script as a base for another script joining Org2 and Org3 to another channel, referencing the new channel profile created earlier.
There is a need to keep only the data within transactions private. In this case, a separate channel for Org2 and Org3 would be unnecessary. You can use the addOrg3 script to create and add Org3 to an existing channel between Org1 and Org2. You can then use private data to hide the data in transactions on the channel.
Here is where I am at the moment:
Fabric version 1.4.1
Using byfn.sh to create Org1, Org2, Orderer etc and bring the channel mychannel up
Language: Node using Typescript
I have followed the instructions in this tutorial to add a third org Org3 https://medium.com/#kctheservant/add-a-new-organization-on-existing-hyperledger-fabric-network-2c9e303955b2
This works great.
Now, I would like to add another Org but using the Fabric Node SDK. Is that possible?
Scenario is this:
A network admin logs into a custom UI being developed to manage a Fabric network.
The admin inputs details such as new Org name, MSP ID, peers info into the UI
The UI invokes a service layer which will
Invoke a Fabric Node SDK API to create crypto materials for the new
Org b.
Invoke Fabric Node SDK API to create the new Org and have it
join the channel mychannel
Install chaincode to the new Org's peers d.
Run some tests of invoke and query chaincode to ensure that the new Org can query and submit transactions
In the last step, I will save the new channel configuration and the new Org configuration to yaml or json files.
I have looked at the Node SDK and have seen the Organization and Channel methods. However, it seems like the Organization class is not exposed as a type for Typescript, so I am not sure how to use it.
It would help if someone could explain the methods I need to use to get to what I am trying to do.
I would appreciate any help.
Thanks in advance.
Actually, the title of the article is misleading. In the article, you are adding a new org in the existing channel not in the network.
Please take a look at the official documentation. The same tutorial.
Adding an Org to a Channel
For your requirement, yes we can do the same using the node sdk.
Check out this tutorial. update channel config
In the tutorial, they are updating the channel id to create a new channel with that id.
You can use the same steps to update the organizations.
You have to run shell command using either by shell.js or child-process.
Hope it will clear your doubts.
I have setup the hyper-ledger fabric with 2 organisation its working well and i have connected my organisation to hyper-ledger fabric block explorer everything is working well. My question is, In hyper-ledger block explorer how/where i can get the details of signer of transaction.
Eg: Let's assume, i have multiple user in organisation have write permission. if some send the transaction, how i can get the information about that particular user has signed the transaction in block explorer.
#fama,
I hope you have used oficial hyperledger fabric explorer https://github.com/hyperledger/blockchain-explorer
It's possible to see who the user proposed the transaction using R/W sets and you can see creator MSP and endorser organization MSP
From the hyperledger fabric explorer UI it seems not possible to see
Below are the details you can usee of a particular transaction from blockchain explorer
Transaction ID: 7229737c95cda5bd49c2b7bd37de3ead4c91ebbce9be13f22c99914435a8f48d
Validation Code: VALID
Payload Proposal Hash: ad3bbab0e42c5e48bb6283965c2141561b46ae8535ef9e4a8f7aad6025aea3a3
Creator MSP: org1MSP
Endoser: {"org1MSP","org1MSP"}
Chaincode Name: points
Type: ENDORSER_TRANSACTION
Time: 2019-11-27T07:42:31.871Z
Reads:
Writes:
I have a case where I have hyperledger fabric network two orgs with one endorser peers on each org. there is a write policy that says, 'both the orgs to sign the transaction to commit the ledger'. in this case how can a client app of one org send transaction request to both the orgs' endorsers? Can a client have identity info from both the orgs which I thing not suggestible.
Please suggest with resource links covered this case.
Hyperledger fabric has Service Discovery Api for it.
Service discovery helps render configurations dynamically which are required to propose transaction,execute chaincode on peer and get endorsement policy associated with chaincode.
Bellow are the links to help you over it.
read the docs explaination for discovery service
node.sdk discovery service tutorial
In hyperleder Fabric network with Two orgs ORG1, ORG2
In Org1- Peer1,
In Org2- Peer1
Using these peers new channel has been created, smart contract deployed then some transactions are already done on the channel.
After Some time, I'm adding the new org. Then adding one new peer to the old channel.
Org3- Peer1, is added to the channel. In this scenario I have some questions.
1) Will the new peer can view the old transactions happened on the channel.
2) If he is able to view the old transactions, how can we restrict it
If new org is on the same channel obviously it will sync up with the other nodes. You can restrict it by encryption which is available in fabric 1.1. If the new org peer doesnot have the key, it wont be able to read the data.