Gurveer
Gurveer

Reputation: 127

Hyperledger Fabric 1.4 CouchDB Txn logs

I have created Hyperledger Fabric network with 2 Orgs and 1 solo orderer. On the peer I configured CouchDB as state database and launched the peer(After creating channel and joining). I can see CouchDB is creating databases:

mychannel_
mychannel_mycc
mychannel_lscc

I installed and initiated "chain-code_example02" Go chain-code on mychannel. I can successfully query and invoke commands on peer end. CouchDB gets updated on invoke command and mychannel_mycc updates field "revpos", but I cant see transaction logs anywhere like I saw in many tutorials. Where can I see the history of transaction logs with ID? mychannel_mycc database only have data for A and B key but not the values I transferred from A to B with Transaction details like how much I transfer and value.

Upvotes: 0

Views: 181

Answers (1)

kekomal
kekomal

Reputation: 2200

CouchDB only saves the state, not the transactions.

Transactions (and events...) are ordered in blocks and added to the chain, which is saved in files under /var/hyperledger/production in your joined peers.

You can see the logs in the peer container...

docker logs -f --tail 100 mypeercontainer

...or use the client SDK to inspect your channel's chain elements: https://hyperledger.github.io/fabric-sdk-node/release-1.4/Channel.html.

Upvotes: 1

Related Questions