Hyperledger Fabric: Error: could not assemble transaction: ProposalResponsePayloads do not match

折月煮酒 提交于 2020-05-24 04:50:13

问题


what are the steps to troubleshoot below error when trying to invoke a chaincode?

Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response:<status:200 payload:"[\"00000\"]" > ...

we get this error when trying to invoke a chaincode using peer chaincode invoke


回答1:


Check that you have installed the chaincode on all the peers your peer chaincode invoke command is targetting. That is the most likely cause of this error.

Other ways this error can occur:

  • You modified your chaincode and instead of installing a new version and upgrading the chaincode, you tried to be smart and overwrite the chaincode with the new file thinking that Fabric would not notice.

  • It can also happen if there is no chaincode container running on target peer and Docker daemon cannot be found on the peer node when it tries to instantiate a container or instantiation fails for some other reason

  • Another reason why this error can happen is if some peer nodes are using LevelDB and others are using CouchDB

The error itself originates from here. The first step to debug this error is to invoke the chaincode individually one-by-one on one peer node at a time.




回答2:


@morpheus: Has answered it excellently:

So i taught i will add to the above list of possible reasons:

I had my mistake added something like get the current timestamp, and was using this for capturing the event date. This led to the different transaction responses by the endorsers , thus leading to the Response Payload not matching.

So use ctx.GetStub().GetTxTimestamp() for capturing the event time. This is the time when the transaction began and it will be constant across the endorser executions



来源:https://stackoverflow.com/questions/55289283/hyperledger-fabric-error-could-not-assemble-transaction-proposalresponsepaylo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!