Hyperledger through a business perspective - hyperledger-fabric

If a third party provides a set of organizations with a Hyperledger network using which those organizations can perform a certain set of transactions in a collaborative way with trust.
Then what are the ways in which the third party can earn money?
If the third party wants to take a commission on the transactions taking place between the different organizations then does it always need to be part of all the different channels?

Your question seems pretty unclear and out of context.
Hyperledger Network is a Permissioned Blockchain Network so, any third person cannot easily join the network, they need to be authorized by certain peers.
Also, About "commission on the transaction", Hyperledger Network is formed by the consortium of organizations so, why would there be commission on transactions.? Think About it! However, You can configure the Network however you like it.

Related

hyperledger for uncentralized database

I am trying to implement a tamper proof uncentralized database of some records. these record are static and they cannot be transferred between participants, i.e, not like some currency or a stock. i just want them to be stored as they are. Identity is an important thing with my project. only certain people can add blocks to the chain, rest of them should be only there to verify the chain. Can i implement a blockchain for this usecase? if it is possible should i use an ethereum chain or hyperledger fabric?
According to your use case which is, certain people, add records and certain query records. A typical normal access control application and the database can solve your issue but,
If you deal with untrusted people and need complete transparency with identity-based access control and equal rights of all participants then hyperledger fabric is best.

Decentralisation and Smart contract installation in Hyperledger fabric

Please help me if my conceptualization is incorrect ---
Setup:
I am trying to understand how to achieve decentralization in Hyperledger Fabric - smart contracts. Assume Org 1 and Org 2 are in the same channel. Each of these Org have peers and endorsers. The endorsement policy is 100% of Org 1 and Org 2
Question:
In my understanding the SAME SMART CONTRACT needs to be installed in both Org 1 and Org 2 peer. In other words, So when a incoming transaction is sent to Org 1 and Org 2, the same smart contract is executed by both peers.
Is this understanding correct?
REF: https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/smartcontract.html
In the PaperNet network, the smart contract is shared by the different network participants, such as MagnetoCorp and DigiBank. The same version of the smart contract must be used by all applications connected to the network so that they jointly implement the same shared business processes and data.
If it is correct, the smart contract code must have been written by some developer (Possible Org 1 who originated the blockchain network),How is this decentralization?
I my understanding, In a decentralized environment, should not be there a way where ORG 2 can separately create its own smart contract and install and use that to validate / commit?
If this is possible, any articles / blogs that show how to do this?
As you can see te question is nothing to do with endorsement policies etc.
thanks in advance and please feel free to correct me if my basic understanding of decentralization is incorrect
Regards
VJ
Hyperledger fabric is a DLT(decentralized ledger technology) platform. As from the word DLT, you may understand here ledger is decentralized. So, yes your basic understanding is wrong.
Smart Contract:
Its similar like to real world contract between multiple parties, on which all parties has been agreed(Like a property deed on which both parties i.e. seller and buyer will agree). Similar here in Hyperledger fabric, a smart contract is business logic, on which all parties(all participating organization, in particular channel) have to agree. So, you may say a smart contract will be written by some developer of any organization and all other organization can review the source code and will agree to use that smart contract.
How it is decentralized:
So, in every DLT, ledger is decentralized, i.e. each party will be having their own copy of transactional data.In Hyperledger fabric, each organization is having a peer that contains transactional data and world state.

Hyperledger Fabric design

I am new to the area of DLTs or "blockchain" and I am trying to create an application on top of Hyperledger Fabric. Before I describe my use case, I need to mention that due to my use case's nature I need a private & permissioned "blockchain" which justifies the choice of Fabric (I am aware of other platforms e.g. Corda, private Ethereum, but Fabric seems to match my use case better).
Use Case
My use case consists of two different types of participants. A number of organizations (which upload and share information about individuals on the distributed ledger) and a client who can query information about an individual.
The client should not be able to see the transactions uploaded by the organizations and will not have write rights on the DL. He has read-only rights. Moreover, the organizations trust each other and there is also a level of trust between them and the client.
Design thoughts
Based on what I've read, I was thinking of creating a DL network that includes all of these parties and use channels which, based on the documentation, can be used to create a grouping among a number of participants (the organizations in my case) thus "hiding" the transactions from the parties which are not included in this group (the client in my case).
However, later I read about chaincode (a.k.a. smart contracts) which:
can be invoked by an application external to the blockchain when that
application needs to interact with the ledger
which confused me since if the "blockchain" can be queried from an external entity, that probably means that the client should not be included in the trusted network.
Am I headed in the wrong direction (design-wise)?
Based on your description, Hyperledger Fabric channels sound like a good solution. You should also familiarise yourself with private data collections, as this is another way of hiding some of the data from some peers. Which option is best for your scenario will depend on how your datasets are structured, and whether you also need to keep the data private from the orderer.
Clients are not part of the network. They query the blockchain by connecting to a peer and then requesting data from that peer. They can then only access the data visible to that peer (which is stored locally by that peer). So, it is not possible for a client to access more data than is available to the peer the client is connected to.
In your example, you would have a "client" organisation, with at least one peer. This peer would be part of the network, and your client application would then connect to it for access to data on the ledger (typically using the Hyperledger Fabric Node SDK).
There are two types of chaincode in Hyperledger Fabric.
User Chaincode (often just referred to as "chaincode") is used to update the ledger for a channel, and is only installed on those peers which require it (i.e. endorsing peers). Since your "client" peer would not be an endorsing peer, it would not have access to the user chaincode for the channel.
System Chaincode which all peers have access to, provides (among other things) an interface to allow queries to be run against the ledger.

How would Hyperledger Composer work?

I am new to composer, and now practicing some of the tutorials and examples. But while doing this I can not understand some of the features, so here are the questions which I do not clearly understand:
Are queries restricted by .acl file (when, for example, we use them in rest server)?
Do the rules written in the .acl restrict some of the transactions which are allowed for certain participant to submit? (For example, for participantA it is not allowed to CREATE new participants, but what happens if participantA submits the transaction(which is allowed for him to submit)which creates another participant, will this transaction fail?
Could cards be created by rest api server?(I know that participants could be created using JS api, but is it possible to create and issue the identity for those participants through RestServerApi?)
What happens when PeerAdmin upgrade certain node to a new version? How do other nodes act in this case? Do they upgrade themself automaticly?(Also found that upgrade takes a lot of time(2-4 minutes) when deployed locally, whereas in browser for local connection it takes 3-4 seconds)
Does Hyperledger fabric allow some of the ledger data be stored in one private network, whereas other network connected to the private one would not store this part of ledger( or the data will be simply crypted)? The same question regarding the transactions: will the be executed on outer networks?
Yes Composer Queries (and therein, results) are subject to ACL restrictions or filters.
It will still fail due to ACL rule restriction. Once denied to create, always denied as that is the final operation (in this scenario). The actual transaction would fail.
Yes of course use POST /system/identities/issue REST endpoint (eg http://localhost:3001/api/system/identities/issue) - see an example here -> https://medium.com/#CazChurchUk/developing-multi-user-application-using-the-hyperledger-composer-rest-server-b3b88e857ccc
An administrator with PeerAdmin capability has responsibility to install new version on his peers (in his Org). The other Org peer Admins are responsible for theirs, that's how a blockchain consortium with different Orgs will work. They will agree the 'what' and when but will need to install the new version on own Org's peers, so the new version can be started on the same channel. Of course, there will be a difference between a Fabric infrastructure response time, and that of a web connection using local storage.
Channels in Fabric implement privacy. You can have one or more business networks on that channel (ledger), therefore transactions in that business network are private to that ledger. It is the client's responsibility to encrypt data or not. Hyperledger Composer can allow call one business network from another, on the same channel, or if permitted to do so, on different channels too - see https://hyperledger.github.io/composer/latest/tutorials/invoke-composer-network

When to create an organization in hyperledger fabric network?

Hyperledger enables you to create participants (via chaincode) as well as Organisations (via fabric setup). In a supply chain or any process, how do you decide which one is an Organisation and which one is a participant.
From my understanding, all participants of same category should fall under one organisation.
But then I have another issue, will buyers also gonna have their own organizations?
Organizations on Hyperledger works like a Board of Directors, they vote in consensus inside your network, if you are the only one org then everything is auto approved by you, Ex. An upgrade in chaincode with new model.
Use case: Think about if we build a blockchain network for Banks, every institution will be an org and the participants are their respective clients.
It all depends on security and privacy factors.
let consider Maersk, If the network is setup within Maersk what's the purpose of hiding data within themselves ? untill and unless there is no trust within.
So if Data Availabilty > Data privacy, i'd go on creating Maersk as one Organization and all sub entity under them are Peers and one channel so that they can share data within and between them.
Now, what if someone other than Maersk entity needs to be involved? like fleet, shipping, delivery, Manufacturer etc, they are the separate Orgs as these Organizations don't need to share every data flowing in and out, they only require what they want to serve for Maersk.
There might be a case where each entity works separate and has their own rules and interaction with multiple other parties under a main entity. Then again you need to decide based on the data sharing ,Transparency, Availability between parties. if data is just available between one or two entity where does DLT concept comes in ? and how/where does consensus fit in ?!!
You need to keep all these factors over use case and decide upon creation of Org and Peer.
Correct me if i'm wrong

Resources