2016-11-16 8 views
0

私のチームと私はBluemix Blockchainサービスを使用してアプリケーションを開発しています。Bluemix 1.0アップデート(Hyperledger 0.6)の後にIBMブロックチェーンサービスを使用できません

{ 
"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バージョンを使用している:我々は、しかし、我々はRESTを経由して、それを展開しようとしていると我々はまだエラーを取得し、それはIBM-blockchain.jsライブラリーに関連したエラーであると考えていました。 我々はまた、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チェーンコードを引き続き使用する方法があるかどうかは誰にも分かりますか?

+0

Bluemixとローカル環境でのエラーは同じではありません。最初の問題はhttps://github.com/IBM-Blockchain/ibm-blockchain-issues/issues/29に関連していますが、ローカル環境ではFabricがパッケージを見つけることができません。チェーンコードをローカルに配布するためにどのようなコマンドを使用しますか? –

+0

我々はポストマンで局所的にRESTコマンドを使用している: '{ "JSONRPC": "2.0"、 "方法": "展開"、 "のparamsは":{ "タイプ":1、 "chaincodeID" を:{ "パス": "https://github.com/VitorSousaCode/chaincodes/final" }、 "ctorMsg":{ "機能": "INIT"、 "引数":[ "99" ] }、 "secureContext": "user_type1_xxxxxxxxx" }、 "ID":1 } ' 最初の問題に関しては、我々は見ていきます。 – Mumumurilo

答えて

3

bluemixサービスは2016年11月10日前にHyperledgerファブリックの古いバージョンV0.5を使用していました。このバージョンは古い構文を使用すなわちshim.ChaincodeStub

bluemix service status pageは示している2016年10月11日ファブリック上バージョンは、v0.6.1に更新されました。この新しいバージョンでは、新しい構文、つまりshim.ChaincodeStubInterfaceを使用する必要があります。

チェーンコードの構文とファブリックのバージョンが一致していないため、展開トランザクションが失敗しています。

  • あなたが使用している場合は、あなたのchaincodeがshim.ChaincodeStub構文

  • で正常にビルドことを確認した後、生地のV0.5のバージョンとbluemixサービスを使用している場合v0.6を使用するチェーンコードの例は、chaincode_example02 v0.6 chaincode

  • を参照してください。
関連する問題