[英]Hyperledger fabric nodejs sdk returns success message even if orderers are down
I am using Hyperledger Fabric node.js sdk. 我正在使用Hyperledger Fabric node.js sdk。 I did an experiment on the network and sdk. 我在网络和SDK上进行了实验。 I put all the orderers down and performed a write operation using sdk. 我放下所有订购者,并使用sdk执行写操作。
It returned a success response with the payload. 它使用有效负载返回了成功响应。 I was shocked. 我感到震惊。 The orderers were down. 订购者不满。 I verified the couchdb and there was not any record that I was trying to write neither the block contains that record. 我验证了沙发数据库,没有任何记录要写入,也不包含该记录。 My question is why it gave me success response while it should give me an error response. 我的问题是,为什么它给了我成功的响应而却给了我一个错误响应。
Any explaination?? 任何解释吗?
Thanks 谢谢
First you should know the process of a write operation
. 首先,您应该了解write operation
的过程。
A Fabric write transaction usually happens in two steps: Fabric写事务通常分为两个步骤:
Fabric SDK will send your request to peers during endorse step, this is done by SDK api Channel.sendTransactionProposal
, and peer will exec the transaction and response R&W set and signatures. Fabric SDK将在背书步骤中将您的请求发送给对等方,这是通过SDK api Channel.sendTransactionProposal
完成的,对等方将执行事务并响应R&W设置和签名。 By now Fabric will not commit your transaction to ledger or state db. 到目前为止,Fabric不会将您的事务提交到分类帐或状态db。
After SDK get all success responses, SDK will gather all the endorsement response as well the endorsement proposal, send them to the orderer. SDK收到所有成功响应后,SDK将收集所有背书响应以及背书建议,并将其发送给订购者。 this is done by SDK channel api Channel.sendTransaction
, this step did commit the transaction to the ledger and state db. 这是通过SDK通道api Channel.sendTransaction
,此步骤确实将事务提交到分类帐和状态db。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.