1

I have created a network composed by two nodes using this tutorial: Multiple Machine.

In the node with orderer and ca installed, I can use the composer-playground to interact with the blockchain. Instead, analysing the logs of the docker on the second node, I am able to see the communication between the nodes but I am not able to access the data.

How can I access data on the second machine?

It is a simple node connect to the first node (where is installed the orderer and the ca).

Thanks,

petezurich
  • 9,280
  • 9
  • 43
  • 57
Auron
  • 51
  • 5

2 Answers2

1

The Playground will connect to the Fabric based on the connection profile (connection.json) for the Business Network Cards you have. If you want to specifically connect to second node you could modify a card.

But remember that Playground is a development and test tool not a production tool so you shouldn't worry too much about hitting different containers with it - particularly as the data will be the same replicated across Peers.

R Thatcher
  • 5,550
  • 1
  • 7
  • 15
  • Thanks for the information. I know that the playground is only a development tool, but how can i access to the data on the second machine? If the second peer want to read and write data, how can i do it? Thanks – Auron Apr 16 '18 at 15:19
1

What do you mean by accessing the data?

In Hyperledger Fabric the ledger data is composed of two components i.e. World State and Transaction History Log (the blockchain).

Here World state refers to the most recent (current) state of the assets you have and Transaction History log refers to the transaction executed on these assets. Assets or Key Value set when using CouchDB as the World State allows you to have KeyValue with Value as JSON documents.

The World State by default is stored in levelDB or couchDB, if you have docker containerized network the World State levelDB is stored on the peer container while using couchDB sets up its own couchDB container associated with each peer. The couchdb for each peer can be accessed from host machine using http://couchdbIp:port

The Transaction log get's stored in the underlying file system as blockFiles somewhere under location /var/hyperledger/ledgerdata or something in the peer container.

When you mention Orderer, which is another component like peer, is a docker container assigned the role of making sure that transactions are properly ordered and verified that their endorsement are valid. This gets complicated as you go to having multiple ordering service nodes and requires Kafka implementation rather than the default SOLO implementation. You can read about each of these implementations in Hyperledger Fabric official documentation.

Also CA is associated with each organization responsible for establishing chain of trust is another component of Hyperledger Fabric that signs certificates of network components like organization peers, client and participants following PKI.

user2009750
  • 3,169
  • 5
  • 35
  • 58
  • I created a network consisting of an organization, an orderer, a CA and two peers. My goal is to install a peer on a remote machine, so my network consists of a machine (machine1) that installed the CA, orderer and peer0 and a machine (machine2) where I installed peer1. By analyzing the logs of the peer1, I can see that it receives the locks from the machine1. My goal is to access this data, and make transactions on the network. But not having access to the composer-playground or API (as they are on machine1) how can I access and interact with the data? thank you very much – Auron Apr 19 '18 at 16:44