Relationship between CouchDB, channels, org admins, and state values


(Sean Smith) #1

Hello,

Following the example (https://www.skcript.com/svr/setting-hyperledger-fabric-network-multiple-chaincodes-channels/), I have created a 3org, 3channel set up. But I am unsure as to how exactly by organizations, channels, and couchdbs are related.

Is it such that:
Org1 in channels 1 and 3 owns a CouchDb with partitions for channels 1 and 3 state info?

  - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
  - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984

Is this saying org1 will own couchdb0, which will contain the state ledger info of the relevant channels org1 is affiliated?

Can someone please clarify for me?

Thank you


(Varun Raj) #2

So it works like this.

Each organization has set of peers under their MSP, say, Peer0, Peer2

And each peer will have a state database which can be set to CouchDB. Thus if there is a network with 3 organization and 2 peers each org, there will be following.

  • Org 1
    • Peer 0 - CouchDB 0
    • Peer 1 - CouchDB 1
  • Org 2
    • Peer 0 - CouchDB 2
    • Peer 1 - CouchDB 3
  • Org 3
    • Peer 0 - CouchDB 4
    • Peer 1 - CouchDB 5