Explore Courses Blog Tutorials Interview Questions
0 votes
in Blockchain by (4.1k points)

I have started learning hyperledger. Became familiarised with it by creating a sample app using the composer playground. My doubt is regarding the decentralized storage using hyperledger. I have read some few docs which mentions about :

  • Saving the hash of the data within the blockchain to ensure the immutability.

  • Saving the image within the blockchain(as an asset) through the base64 string.

Some of the things were clear but a large portion still remains uncertain. They are :

  • Where is the data stored within the blockchain? Is it in couchdb ?
  • Suppose the data is stored within the couchdb and via multipeer a new peer gets added to the channel, then does it mean that all the couchdb's of the peers get synced ?

Any resources/tutorials that mention about data storage with the blockchain, decentralized storage etc. would be very helpful.


1 Answer

0 votes
by (14.4k points)
edited by

The blockchain ledger is stored as a physical file, and it contains linked blocks, each of which consists of a set of transactions. Also, every state change is stored in those blocks. In contrast, the world state pertains to the current state of every asset because that is what applications exactly need.

The world state is implemented as a database (CouchDB is one of the best options). There is a simpler one available but that one offers much less in terms of querying capability. Of course, this means that the world state can be easily recreated from the ledger at any point in time. when a new peer gets added to a channel, its own world state is created from the ledger.

Know more about Blockchain in detail. Enroll in IBM Blockchain Certification now to take that first step.

Browse Categories