0 votes
1 view
in Blockchain by (11.8k points)

Sorry for the long question but Hyperledger is a fairly complex system.

Reading the Blockchain network In the section Generating and accepting transactions

In contrast to peer nodes, which always host a copy of the ledger, we see that there are two different kinds of peer nodes; those which host smart contracts and those which do not. In our network, every peer hosts a copy of the smart contract, but in larger networks, there will be many more peer nodes that do not host a copy of the smart contract

How to design the blockchain network and to decide how many peers should have smart contracts and how many should not? Are there any design rules or patterns?

When we have multiple organizations, should every organization has an endorsing peer, or they all can have only one within one organization and all others can call it?

1 Answer

0 votes
by (27.7k points)

I'll go over your questions one by one,

  • you first think about the endorsement policy, and then you install the chaincode on peers that belong to organizations that are in the endorsement policy. Then, you can also optionally install the chaincode for query-only transactions (that don't get into the Blockchain) on peers of organizations regardless of their involvements in the endorsement policy or not, because it makes sense that a client would want to query its own organization (since it trusts it the most). The only corner case is that sometimes the code of the chaincode is not known and the organizations of the endorsement policy, do not want to share it.
  • It depends on the use case. Some organizations have clients only, and some organizations have peers only, or only orderers. Whether an organization is an endorser for a chaincode, usually depends on the endorsement policy.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...