Pandit
Pandit

Reputation: 748

does channel maintains separate ledger?

If there one ledger per channel. does that mean all the peer nodes arose different organisation have to be one channel.

Suppose, A sells 10 chicken shawarma to B in 80$ and A sells 10 chicken shawarma to C in 90$ and A wants to hide price details.

How would admin party now if A total amount in sales if A maintaining a separate ledger for sales to different peers if they are on separate channel.

Upvotes: 0

Views: 739

Answers (1)

Nitish Bhardwaj
Nitish Bhardwaj

Reputation: 1187

You define channels for the organizations which are interested to trade with each other. Each organization would have their own set of peers. Some would be endorser, committer or anchor peer. Each peer would have a copy of the ledger.

Now, you would be instantiating the chaincode to a particular endorser peer for a given organization. For an instance, suppose there are 4 organizations A,B,C and D. All these are connected with one specific channel(channel1) where everyone can see all the transaction details. Now, A and B do have a special requirement where they don't want to share their buying a specific product transaction details with other organizations.

Therefore, A and B would have a new channel(channel2) having an endorser peer(could be the same one which is there for channel1 having 2 chaincode installed) which would take care of their specific contract. The data will be replicated to all the peers of only A and B.

Since C and D isn't the part of this special channel, this specific transaction will not be logged on their peers. They can just see whatever is logged by channel 1.

How an admin would know about these? Well, a network admin would always knows this as he would be the one who is defining this network. He would be defining the channel and instanciating the chaincode over it. So, as per the design, an admin would always have an insight of who can see what and what data could be stored over different ledgers.

Hope this helps.

Upvotes: 2

Related Questions