Reputation: 1753
I can modify Hyperledger's endorsement policy at instantiate time as described in the docs here. However, is there some guideline on how many peers should endorse a transaction?
I understand that not all peers need to be endorsing peers but generally, what would be the minimum acceptable number in terms of total number of peers? Of course it varies from application to application, but would be nice to have some guideline/insights.
Upvotes: 1
Views: 507
Reputation: 5140
what would be the minimum acceptable number in terms of total number of peers?
The number of peers is of lesser significance than the number of organizations.
The idea behind the endorsement policy, is that the peer block processing logic wants to be able to "know" that the transaction contains a write set (values that mutate the world state) which was executed "correctly".
Now, imagine that you have a chaincode which 3 organizations use. You would not want to have an endorsement policy of "Org1.member or org2.member or org3.member" because that would mean that if any of the organizations (1,2,3) is malicious, it could dictate anything it wants, and completely ignore the chaincode business rules.
So, ideally you would want to have an endorsement policy that proves that a majority of the organizations agree to a certain execution result, and therefore set it to something like "2 of the 3 organizations".
Next - comes a notion of number of peers. If you have i.e 10 peers and you are afraid that someone would hack into one or more of them, you could set the endorsement policy to reflect that.
Upvotes: 3