Re: error: [DiscoveryHandler]: compareProposalResponseResults[undefined] - read/writes result sets do not match index=1 #hyperledger-fabric #fabric-endorser #fabric-peer

Mark Lewis

This means that the simulation of the transaction on different peers yielded different results. Several things could cause this situation, including non-deterministic chaincode implementations, which can be non-obvious factors such as JSON strings being constructed without a well-defined ordering of object properties. I think the most likely cause is that multiple transactions are updating the same ledger keys, so the version of those ledger values is different at different peers depending on the block height of the peer at the point they simulated the transaction.

For example, if two "CreateAsset" transactions are submitted at similar times, both creating an asset with the same ID, you may see inconsistent proposal results as some peers see the ledger state before an asset is created, and other peers see the ledger state after the first "CreateAsset" transaction has been committed.

You might need to be careful with your data model and transaction design, or transaction invocation patterns, to minimise the chance of conflicts. Or include retry code in your application to try transactions again if unavoidable conflicts occur.

Join to automatically receive all group messages.