我和我的团队正在开发使用Bluemix Blockchain服务的应用程序,并且我们在1.0更新之前使用该应用程序就好了。我们认为这可能是相关的IBM-blockchain.js库是错误的,但我们试图通过REST部署它,我们仍然得到错误:在Bluemix 1.0更新(Hyperledger 0.6)之后无法使用IBM Blockchain服务
{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "Deployment failure",
"data": "Error when deploying chaincode: Error getting chaincode package bytes: Error getting code 'go get' failed with error: 'exit status 2'\n# github.com/ibm-blockchain/learn-chaincode/finished\n/go/_usercode_/493306176/src/github.com/ibm-blockchain/learn-chaincode/finished/chaincode_finished.go:38: undefined: shim.ChaincodeStubInterface\n/go/_usercode_/493306176/src/github.com/ibm-blockchain/learn-chaincode/finished/chaincode_finished.go:52: undefined: shim.ChaincodeStubInterface\n/go/_usercode_/493306176/src/github.com/ibm-blockchain/learn-chaincode/finished/chaincode_finished.go:67: undefined: shim.ChaincodeStubInterface\n/go/_usercode_/493306176/src/github.com/ibm-blockchain/learn-chaincode/finished/chaincode_finished.go:80: undefined: shim.ChaincodeStubInterface\n/go/_usercode_/493306176/src/github.com/ibm-blockchain/learn-chaincode/finished/chaincode_finished.go:99: undefined: shim.ChaincodeStubInterface\n"
},
"id": 1
}
我们的服务依然采用了0.5版本。 我们还更新了本地版本为1.0,并试图看看错误是一样一样的,现在看来似乎是:
12:16:55.666 [devops] getChaincodeBytes -> ERRO 034 Error getting chaincode package bytes: Error getting code 'go get' failed with error: "exit status 1"
package github.com/VitorSousaCode/chaincodes/tree/master/final: cannot find package "github.com/VitorSousaCode/chaincodes/tree/master/final" in any of:
/opt/go/src/github.com/VitorSousaCode/chaincodes/tree/master/final (from $GOROOT)
/opt/gopath/_usercode_/796234422/src/github.com/VitorSousaCode/chaincodes/tree/master/final (from $GOPATH)
/opt/gopath/src/github.com/VitorSousaCode/chaincodes/tree/master/final
12:16:55.671 [devops] Deploy -> ERRO 035 Error deploying chaincode spec: type:GOLANG chaincodeID:<path:"https://github.com/VitorSousaCode/chaincodes/tree/master/final" > ctorMsg:<args:"init" > secureContext:"user_type1_xxxxxxxxx"
任何人都经历了类似的话?是否有人知道我们是否有任何方式继续使用我们以前开发的Go代码,而不应用重大更改?
Bluemix和本地环境中的错误并不相同。第一个问题可能与https://github.com/IBM-Blockchain/ibm-blockchain-issues/issues/29有关,但在本地环境中,Fabric找不到该包,您使用什么命令在本地部署链接代码? –
我们在本地使用REST命令邮差: '{ “jsonrpc”: “2.0”, “方法”: “部署”, “PARAMS”:{ “类型”:1, “chaincodeID” :{ “路径”: “https://github.com/VitorSousaCode/chaincodes/final” }, “ctorMsg”:{ “功能”: “初始化”, “ARGS”:[ “99” ] }, “secureContext”: “user_type1_xxxxxxxxx” }, “ID”:1 }' 至于第一个问题,我们来看看。 – Mumumurilo