I'm trying to understand how data is stored for private channels on Hyperledger fabric. I've read some of the documentation and watched a couple of videos but, I think either data is on the main ledger or it isn't and it kind of defeats the purpose of ledgers. I've two questions
If a private channel's state changes, is that state change stored in the main ledger's blocks?
If they aren't, is consensus still a thing for channels with few users?
The private data is stored only in the private data collections of the peers that have access to those private data collections, and is replicated directly between those peers so is not visible to anyone else. A hash of the private data is stored in the main ledger (channel state) as part of the transaction that updated the private data. See here for details:
https://hyperledger-fabric.readthedocs.io/en/release-2.2/private-data/private-data.html