简体   繁体   English

Hyperledger Fabric Node.js SDK返回成功消息,即使订购者已关闭

[英]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写事务通常分为两个步骤:

  1. endorse 拥护
  2. commit 承诺

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.

相关问题 在 Hyperledger 结构中的 peer 和 orderers 的连接配置文件中配置 grpc 超时 - Configure grpc timeout in connection profile for peers and orderers in Hyperledger fabric Hyperledger Fabric NodeJS SDK:用户注册。 联盟永远是空的 - Hyperledger Fabric NodeJS SDK: User Register. Affiliation is always empty Hyperledger Fabric Nodejs SDK Eventhub已关闭 - Hyperledger Fabric Nodejs SDK Eventhub has been shutdown Hyperledger Fabric使用Node.js SDK添加新的对等节点 - Hyperledger Fabric add new peer nodes with nodejs SDK Hyperledger Fabric 节点 SDK - Hyperledger Fabric Node SDK Hyperledger Fabric NodeJS Shim-getHistoryForKey - Hyperledger Fabric NodeJS Shim - getHistoryForKey Hyperledger Fabric Nodejs SDK需要时间来获取投标结果(大约5秒) - Hyperledger Fabric Nodejs SDK taking time for getting proposal result (5 seconds approx) nodejs 中的 Hyperledger Fabric nodejs 链代码单元测试, - Hyperledger Fabric nodejs chaincode unit testing in nodejs, IdentityService 的删除 function 在 Hyperledger Fabric 节点 SDK 中返回 {“code”:56,“message”:“Identity removal is disabled”} - IdentityService's delete function returning {“code”:56,“message”:“Identity removal is disabled”} in Hyperledger Fabric Node SDK 如何在Hyperledger Fabric中使用Node JS SDK? - how to use node js SDK in hyperledger Fabric?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM