Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

world state persistence in hyperledger fabric

In hyperledger fabric World State is the collection of variables containing the results of executed transactions . Is the world state persisted somewhere in disk or it will be in primary memory?

What if the peer was restarted?

like image 204
Max_dev Avatar asked Nov 11 '16 02:11

Max_dev


People also ask

What is world State in Hyperledger fabric?

In Hyperledger Fabric, a ledger consists of two distinct, though related, parts – a world state and a blockchain. Each of these represents a set of facts about a set of business objects. Firstly, there's a world state – a database that holds current values of a set of ledger states.

What are the four stages of Chaincode life cycle?

We provide four commands to manage a chaincode's lifecycle: package , install , instantiate , and upgrade .

How is data stored in a ledger in Hyperledger?

The ledger is comprised of a blockchain ('chain') to store the immutable, sequenced record in blocks, as well as a state database to maintain current state. There is one ledger per channel. Each peer maintains a copy of the ledger for each channel of which they are a member.


1 Answers

The world state is persisted to disk in each peer at /var/hyperledger/production. The hyperledger fabric makes use of Rocksdb as a persistent key value store to store/retrieve the world state. So even if the peer goes down, and is brought back up the world state will still be intact.

like image 57
Clyde D'Cruz Avatar answered Dec 11 '22 09:12

Clyde D'Cruz