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?
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.
We provide four commands to manage a chaincode's lifecycle: package , install , instantiate , and upgrade .
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With