concept setting in category hyperledger

appears as: settings, settings, setting
Programming Hyperledger Fabric: Creating Permissioned Blockchains

This is an excerpt from Manning's book Programming Hyperledger Fabric: Creating Permissioned Blockchains.

In above, we only create identities for 1 user, 1 peer and 1 orderer node. It is possible to create identities for more users and nodes by modifying the crypto-config.yaml file but note that the settings have to be specified in advance. Thus cryptogen assumes you know a-priori how many users you have. In practice, your client application - the website or mobile app your users will use - will have a user registration section and it will generate crypto material for new users as they register on-demand in real-time using the Fabric (or another) CA server.

The command to start a peer node is peer node start. We will show how to bootstrap a peer node for Biotor and leave it as exercise for the user to bootstrap peer nodes for other organizations in the consortium. Just like the orderer reads configuration settings from orderer.yaml, the peer reads them from core.yaml. Just like we used environment variables to override the settings in orderer.yaml, we can do the same with core.yaml. Now, run the command in Listing 4.16 from the $/three-org-network directory with the settings in Table 4.4.

Listing 4.16. Command to run peer node
$ peer node start
Table 4.4. Settings to start Biotor peer
Setting Value Explanation
FABRIC_CFG_PATH $PWD All peer commands require a core.yaml file under FABRIC_CFG_PATH
CORE_CHAINCODE_MODE dev Dev mode is useful in development phase of the project when you want to be able to debug etc.
CORE_PEER_ID peer0.biotor.com Name of the peer
CORE_PEER_ADDRESS The address by which this peer is known to other peers in the same organization. Since we don’t have other peers in same organization we can set this to empty string.
CORE_PEER_LISTENADDRESS 0.0.0.0:8051 Address and port at which peer will listen for communication from other peers and applications but not the chaincode
CORE_PEER_GOSSIP_BOOTSTRAP A list of other peers in the same org that this peer reaches out to at startup to initialize the gossip protocol. As we don’t have any other peer in same org, we can set this to be empty.
CORE_PEER_GOSSIP_EXTERNALENDPOINT 127.0.0.1:8051 The address by which this peer is known to peers of other organizations.
CORE_PEER_CHAINCODEADDRESS We don’t need to set chaincode address in dev mode. So you can set it to empty or skip the setting.
CORE_PEER_CHAINCODELISTENADDRESS 0.0.0.0:8052 Address and port at which peer will listen for messages from chaincode.
CORE_PEER_LOCALMSPID BiotorMSP Must match with what you declared in configtx.yaml
CORE_PEER_MSPCONFIGPATH $PWD/crypto-config/peerOrganizations/biotor.com/peers/peer0.biotor.com/msp Directory containing the identity of the peer.
CORE_PEER_TLS_ENABLED false TLS must be disabled in dev mode according to Fabric docs.
CORE_PEER_TLS_CLIENTAUTHREQUIRED false
CORE_PEER_FILESYSTEMPATH $PWD/peer0.biotor.com Directory where peer will store all its data.
CORE_LEDGER_STATE_STATEDATABASE CouchDB We use CouchDB for the world state. That way we can inspect the world state independently using a UI or CLI that comes with CouchDB.
CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS 127.0.0.1:17055 Address and port where the CouchDB can be reached.
CORE_OPERATIONS_LISTENADDRESS 0.0.0.0:9433 The operations service can be considered as a black-box but we do need to provide a unique address for it.
GODEBUG netdns=go Use Go’s library for DNS name resolution instead of relying on C library routines.