Pool
Pool

Reputation: 101

How is Blockchain Ledger implemented/ stored in a peer

In Hyperledger Fabric the ledger consists of two distinct, though related, parts – a “blockchain” and the “state database”, also known as “world state”. The blockchain is immutable whereas the world state data can be modified or deleted.

The world state is physically implemented as a database using CouchDB or LevelDB. If so, how is the immutable blockchain implemented - as plain text, json or any other storage forms?

Upvotes: 0

Views: 113

Answers (1)

Yadhukrishna
Yadhukrishna

Reputation: 842

It's internally stored in each of the peer in a data serialization form called protocol buffer.

If you use the bash access to the peer docker service, you can find them at /var/hyperledger/production/.

These can be converted to json format using configtxlator tool

  • configtxlator proto_decode --input fabric_block.pb --type common.Block

Refer docs for more info.

Upvotes: 3

Related Questions