fabric-smart-client
fabric-smart-client copied to clipboard
Allow successful queries if one of the configured peers is down
When doing a fabric.ChaincodeQuery with WithEndorsersFromMyOrg, the FSC queries all configured peers of the own organization. On any query, it validates if all responses match:
https://github.com/hyperledger-labs/fabric-smart-client/blob/110f6327f420c5dc08dbaceea3fd000ed1055115/platform/fabric/core/generic/chaincode/invoke.go#L119
In some situations this may be important (i.e. querying other orgs, not trusting all own peers). But sometimes availibility should be considered more important than the integrity. For example: I have three peers in my organization and I want to update one. The client should still be able to query (and invoke).
Perhaps it would be worthwhile to have a flag to 'trust any response' and it would just take the first of all the responses that has a valid payload?