0
votes

I have a question regarding using CouchDB as world state DB in Hyperledger Fabric. When I setup CouchDB as my state DB, I can see the database collection with the name same as my channel name, and I can see all transactions executed among my chain-code.

Where (if that is possible) can I see the individual values for asset created within chain-code transactions? Are they stored within CouchDB?

For example when I try to instantiate new marbles in example explained here: https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#using-couchdb , I am able to see my transactions within CouchDB, but I cannot see the individual values for created mrbles.

Thank you for the answers.

1

1 Answers

1
votes

Value stored in state DB prefixed with chaincode name, e.g. for example key1 for chaincode mycc will look in DB as following: mycc%00key1. In order to query for key value you can do it by simply running curl command as following:

curl -X GET "http://localhost:5984/mychannel/mycc%00key1?attachments=true"

You can see more information about how to read values from CouchDB here.