Where is the blockchain physically

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Where is the blockchain physically



just playing with Hyperledger Composer, and I'm wondering ,Where is the blockchain physically
I'mean is it binary file , text file ....?
is it portable ?



thank you all




4 Answers
4



There are two place which "store" data in Hyperledger Fabric (the underlying blockchain infrastructure used by Composer which is a runtime abstraction layer above it):



The ledger is the actual "blockchain". It is a file-based ledger which stores serialized blocks. Each block has one or more transactions. Each transaction contains a 'read-write set' which modifies one or more key/value pairs. The ledger is the definitive source of data and is immutable.



The state database (or 'World State') holds the last known committed value for any given key - an indexed view into the chain’s transaction log. It is populated when each peer validates and commits a transaction. The state database can always be rebuilt from re-processing the ledger (ie replaying the transactions that led to that state). There are currently two options for the state database: an embedded LevelDB or an external CouchDB.



As an aside, if you are familiar with Hyperledger Fabric 'channels', there is a separate ledger for each channel.



The chain is a transaction log, structured as hash-linked blocks, where each block contains a sequence of N transactions. The block header includes a hash of the block’s transactions, as well as a hash of the prior block’s header. In this way, all transactions on the ledger are sequenced and cryptographically linked together.



The state database is simply an indexed view into the chain’s transaction log, it can therefore be regenerated from the chain at any time.



Source: http://hyperledger-fabric.readthedocs.io/en/release/ledger.html



Suffice to say, Hyperledger Composer uses Fabric (as the blockchain infrastructure) to endorse/order/commit transactions to blocks on the ledger.





that's fascinating
– zied.hosni
Feb 13 at 14:03





@zied.hosni if you still want to see the physical location of these data you can go to /var/hyperledger/production in each peer container in your fabric network
– Alvin Zachariah
May 10 at 20:35





You should select this as the answer.
– Sahil
Jul 19 at 19:31





@AlvinZachariah 's comment is the exact answer to this question. Putting it as an answer will be helpful for others.
– Shalin LK
yesterday



Actually, the blockchain is a shared database, which is read-only and append-only. And it is distributed in every peers. So every peer has a copy of the shared database. Normally, LevelDB or CouchDB is used in HyperLedger Fabric.



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 fabric state.



Here is more information about HyperLedger Fabric Ledger (the blockchain)





thank you that's clear so technically this use some space in disk ? as a file ?
– zied.hosni
Feb 13 at 10:40



Blockchain is shared among all the peer to peer networks hosting it. So basically blockchain is stored in many HDD all around the world.



To see the physical location of these data you can go to /var/hyperledger/production in each peer container in your fabric network


/var/hyperledger/production






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

React Native Navigation and navigating to another Screen problem