Where is Hyperledger fabric chaincode store locati

2019-08-19 10:04发布

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条回答
虎瘦雄心在
2楼-- · 2019-08-19 10:33

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.

查看更多
登录 后发表回答