hyperledger-archives / fabric

THIS IS A READ-ONLY historic repository. Current development is at https://gerrit.hyperledger.org/r/#/admin/projects/fabric . pull requests not accepted

Home Page:https://gerrit.hyperledger.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chaincode that was deployed using NodeSDK Becomes Unusable

ratnakar-asara opened this issue · comments

Description

Chaincode that was deployed using NodeSDK becomes unusable. This occurs after you deploy/invoke/query the chaincode with the Node SDK. The next step is the user takes the chaincode id and does a query using the REST API with a different enrolled user. The query fails using the REST API. If you then go back to the Node SDK using this chaincode ID, it fails doing invokes and queries as well.

How to Reproduce

  1. setup a 4-peer network with pbft-batch, security and privacy enabled
  2. Registered test_user0 and test_user1 and Deployed chaincode_example02, with values a=100 and b=200, using nodesdk apis (attached node program used to test this scenario)
  3. Once deploy is successful through NodeSdk , Register test_user2 and use chaincodeID from previous deployment and make a REST call to Query on A , using PostMan (Or any REST Client)

It fails with below error:

'Error:Failed to execute transaction or query(Timeout expired while executing transaction)'
  1. Now this time, try to Query chaincode from the node program, this time it fails too with a different error
"Error:Failed to launch chaincode spec(Could not get deployment transaction for 9c5ceb563bbb5240450f4c0ae77bc6c4b6c069f976433dce6b78cc95651494ab - LedgerError - ResourceNotFound: ledger: resource not found)

NOTE:

  • Logs of all peers attached for reference.
    logs.zip
  • Node program used for testing. (rename it to helloblockchain.js)
    helloblockchain.txt
  • Logs from node program execution,
    node_logs.txt
  • PostMan Rest client screenshots,
    postman_query
    postman_registrar

@ratnakar-asara please transfer this to Jira. Thanks!

transfered issue to Jira JIRA https://jira.hyperledger.org/browse/FAB-191.
Closing this issue