Where is Hyperledger fabric chaincode store location?

安稳与你 提交于 2019-12-24 19:55:28

问题


I used peer commond in cli container on chancode install.
chaincode name + varsion file was made on peer containers.
(location is /var/hyperledger/production/chaincodes)

What is this? chaincode?
I am looking for chaincode after install.


回答1:


The chaincode package which is installed on the peer is technically the serialized bytes of a protobuf message. The protobuf in a ChainDeploymentSpec message, which is defined in the "github.com/hyperledger/fabric/protos/peer" package:

message ChaincodeDeploymentSpec {

    enum ExecutionEnvironment {
        DOCKER = 0;
        SYSTEM = 1;
    }

    ChaincodeSpec chaincode_spec = 1;
    // Controls when the chaincode becomes executable.
    google.protobuf.Timestamp effective_date = 2;
    bytes code_package = 3;
    ExecutionEnvironment exec_env=  4;

}

The actual chaincode source files are stored in a serialized archive file stored in the code_package field of the ChainDeploymentSpec.



来源:https://stackoverflow.com/questions/48455268/where-is-hyperledger-fabric-chaincode-store-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!