-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to invoke transaction that interacts with a PDC using fabric-gateway #3328
Comments
The gateway is doing the right thing here, it's the node sdk 2.2 use that wasn't. Because the endorsement policy was the default one and it was a 2 org network, the node sdk is by default sending to both orgs and thus able to satisfy the endorsement policy but means that it's sending potentially sensitive data to an org that shouldn't. The gateway is protecting against this (as the data is passed in the transient field) which results in the message seen (although if possible it would be nice for the gateway to say why it couldn't satisfy, ie it won't send to an org that shouldn't see the info). The above collections-config should be used and in fact suggests that collections-config should be explicit about the required endorsement policy otherwise the chaincode endorsement policy may not be what is required. |
When transient data is passed to the gateway in a transaction submit, the gateway is more cautious about which orgs it will select to endorse. It alters the ChaincodeInterest to only allow orgs that are in the distribution policy for the PDCs written to by the chaincode. This commit doesn’t change the behaviour, but gives a more helpful error message if this layer of protection caused the submit to fail due to the lack of endorsing orgs. This will help to diagnose issues such as hyperledger#3328 which took a long time to resolve because of the generic error message. Signed-off-by: andrew-coleman <[email protected]>
When transient data is passed to the gateway in a transaction submit, the gateway is more cautious about which orgs it will select to endorse. It alters the ChaincodeInterest to only allow orgs that are in the distribution policy for the PDCs written to by the chaincode. This commit doesn’t change the behaviour, but gives a more helpful error message if this layer of protection caused the submit to fail due to the lack of endorsing orgs. This will help to diagnose issues such as #3328 which took a long time to resolve because of the generic error message. Signed-off-by: andrew-coleman <[email protected]>
When transient data is passed to the gateway in a transaction submit, the gateway is more cautious about which orgs it will select to endorse. It alters the ChaincodeInterest to only allow orgs that are in the distribution policy for the PDCs written to by the chaincode. This commit doesn’t change the behaviour, but gives a more helpful error message if this layer of protection caused the submit to fail due to the lack of endorsing orgs. This will help to diagnose issues such as #3328 which took a long time to resolve because of the generic error message. Signed-off-by: andrew-coleman <[email protected]> (cherry picked from commit 807c6de)
When transient data is passed to the gateway in a transaction submit, the gateway is more cautious about which orgs it will select to endorse. It alters the ChaincodeInterest to only allow orgs that are in the distribution policy for the PDCs written to by the chaincode. This commit doesn’t change the behaviour, but gives a more helpful error message if this layer of protection caused the submit to fail due to the lack of endorsing orgs. This will help to diagnose issues such as #3328 which took a long time to resolve because of the generic error message. Signed-off-by: andrew-coleman <[email protected]> (cherry picked from commit 807c6de)
I have a simple chaincode setup which writes to a single PDC. The collections config is defined as follows
And the chaincode method is
using the 2.2 node sdk I can submit a transaction and it get's committed without issue. However when I perform the same using the fabric-gateway it performs the initial endorse without any problem but then returns the following error message
turning on gateway debug doesn't provide any further detail in the peer logs
A workaround is to explicitly set the endorsement policy in the collections-config file as follows
endorsementPolicy is optional however so should work without having to specify
The text was updated successfully, but these errors were encountered: