Hyperledger Fabric Channel Provider

Description:

The Hyperledger Fabric Channel provider holds the configuration to reconstruct a Hyperledger Fabric Channel on the client side. Other components can refer to the provider by name to gain access to the Channel. For example, Hyperledger Fabric Services use the Channel to execute transactions or make queries, and the Hyperledger Fabric listener uses the Channel to listen for events coming from the event hubs. Multiple components can share the same provider safely.

This provider can be created within the server tab of the console by clicking on the Fabric Channel Provider link in the left menu.

Parameters:

The following tables list and describe the parameters for the Hyperledger Fabric Channel provider.

User

Parameter                    Description

User Name

The user must have been previously registered and enrolled in fabric-ca (or an equivalent member service).

MSPID

Membership service provider identifier.

Enrollment Certificate

Path to the enrollment certificate for that user, see:

$FABRIC_CA_CLIENT_HOME/msp/signcerts/cert.pem

Enrollment Private Key

Path to the enrollment private key in PEM format for that user, see:

$FABRIC_CA_CLIENT_HOME/msp/keystore/key.pem

The User group of parameters define the user credentials. The MSPID is chosen when the user is registered with Fabric CA (Certificate Authority), or an equivalent member service. The MSPID is usually an organization name, such that all users of a single organization share the same MSPID. The certificate and private key are generated when the user is enrolled. The provider requires the certificate and private key to be stored in PEM files. This is the same format produced by the command line utility fabric-ca-client when enrolling a user.

Fabric

Parameter                    Description

Channel Name

The name of the channel.

Peer Endpoints

Comma separated list of peer definitions in the form peerName@url. For example:

peer0@grpc://host:7051

Orderer Endpoints

Comma separated list of orderer definitions in the form ordererName@url. For example:

orderer0@grpc://localhost:7050

Event Hub Endpoints

Comma separated list of event hub definitions in the form eventHubName@url. For example:

peer0@grpc://localhost:7053

Transaction Wait Time

Transaction wait time, which uses the format of [xxh][xxm]xx[s]. For example, 1m30s is 90 seconds.

The Fabric group of parameters define the channel. If a list of endpoints becomes large, it might be more convenient to store it in a file and load it with the _FILE(filepath) function. In this case, each endpoint can appear on a separate line. Inside the file, a line starting with the # character is a comment and is ignored to the end of line.

Example:

The following example shows the parameter values that are used to reconstruct the channel in the End2endIT sample of the Hyperledger Fabric Java SDK. Replace host.com with the actual host name.

Parameter

Value

User Name

user1

MSPID

Org1MSP

Enrollment Certificate

user1/cert.pem

Enrollment Private Key

user1/key.pem

Channel Name

foo

Peer Endpoints

peer0@grpc://host.com:7051

Orderer Endpoints

orderer0@grpc://host.com:7050

Event Hub Endpoints

peer0@grpc://host.com:7053

Transaction Wait Time

20

In the example above, the file path user1/cert.pem must point to a file that contains the enrollment certificate for user1 as generated by the Membership Services Provider (i.e. fabric-ca). This is a sample enrollment certificate file:

-----BEGIN CERTIFICATE-----
MIIB8TCCAZegAwIBAgIUYe9xCEzh9YwhriG1YZnj4V9rYYMwCgYIKoZIzj0EAwIw
czELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh
biBGcmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMT
E2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNzI0MTYwNjAwWhcNMTgwNzI0MTYw
NjAwWjAQMQ4wDAYDVQQDEwV1c2VyMTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA
BFq/22WC5z/yNt3GMyUVFLeQr4YsSMe4gnSbpUItTVjHLnz77kOmbdmgMQSoIZNm
jKL/gb3+j5fBfSe3A2TEwP+jbDBqMA4GA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8E
AjAAMB0GA1UdDgQWBBQMTqi2/YZgcz40dDqj74aBGTsNODArBgNVHSMEJDAigCD8
93awKgVgBAjQvp2XUq/Fn2SVC3IcrLNjtblaD+piFjAKBggqhkjOPQQDAgNIADBF
AiEArZi+gu56MY/VoKhXUOAhQ3qI8EO7KjduZEKi+C3LA+8CIDLcPlnFzuZ2jNnF
+GiSAA2BE6qc8kd0YHWNSnf8GrEd
-----END CERTIFICATE-----

In the example above, the file path user1/key.pem must point to a file that contains the private key for user1 as generated by the Membership Services Provider (for example, fabric-ca). The following is a sample private key file:

-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIHMjJth72UerCb2S6UH2IyDcF7T4ZszKeA9+uGXGAEXxoAoGCCqGSM49
AwEHoUQDQgAEWr/bZYLnP/I23cYzJRUUt5CvhixIx7iCdJulQi1NWMcufPvuQ6Zt
2aAxBKghk2aMov+Bvf6Pl8F9J7cDZMTA/w==
-----END EC PRIVATE KEY-----