How to retrieve the database in hyperledger fabric? - hyperledger-fabric

I have one doubt on hyperledger fabric where the ledger database will save please let me know. How to restore the ledger data when we lost the device.
Thanks in advance.

CouchDB or LevelDB is used as a state store, which stores the latest data only and does not have the entire ledger data. So, although you could retrieve the latest data from them, I'm afraid you can't use them for recovery of the entire ledger, including history.
As far as I can see, the best way to restore the data would be to abandon the peer, create a new one and get synchronized from other peers.
To accomplish that, you must have two peers in advance; once a peer is down, create a new one and participate it to the network. That way, the new peer will receive the data from the sane peer.

Related

How organizations can communicate privately with each other on same channel without sharing the data in Hyperledger Fabric?

Lets say there are 100 banks on the street, they trade each other but they also don't want to share the data with the other banks who is not the part of the transaction. so basically in that case they will have to create a dedicated channel for each possible combination, so assuming 100 banks each trading with each other 100 x 9 = 900. If i put them in same channel they will get to see the data for the transaction they are not part of, so only option i have left is to keep them on a separate channel but is there any scalability issue with having too many participants in the network. how is really going to scale in Hyperledger Fabric or How can we manage this type of use case in Hyperledger Fabric ?
Seems like you duplicate the question
I have answered in your previous question
How to prevent third party to seeing the data on same channel in Hyperledger Fabric?
There is one very important feature provided by the Hyper-ledger fabric for scenarios like these. Its called Private Data. A set of Organizations in a consortium can hide the data from other organizations using this feature, and avoid creating a new channel altogether.
Please see below link for detailed explanation. It has everything , including an use case which will help in understanding the practical usage of private data.
Private Data in Hyperledger fabric

Is it posssible in hyperledger fabric remove some transactions from blockchain?

Please advise if it is possible to somehow remove old blocks from hyperledger fabric ?
I understand that it must be immutable, but what if we do not want to store years old data?
There is no "Archive" feature in Fabric at the moment, but there is an "Epic" in the jira system for an Archive feature. It has been around for quite a while but it now looks like a high priority.
Here are the details.
No, you can not remove transaction from the chain itself. Since otherwise you would destroy the whole thing (merkle tree properties).
But only 'recent' data will be stored in the StateDBs. This is data which is labeled as not deleted. Deleted data will be moved out of this DB. So you could actually think of this as a cache where you can 'quickly' access up to date data. (maybe read docs about StateDB and Ledger etc in Fabric to get more insights on this)

How to implement distibuted DB on Hyperledger Fabric (GDPR)

We are building a solution and we are modeling a network using Fabric and Composer
Regarding "not" storing any personal data (GDPR complience) on the blockchain, we would like to hash/map the personal data so that a GUID och Hash is stored in the Ledger instead (Anonymized data)
Does Hyperledger provide any solution to solve this kind of issues (ie a distributed DB that is around the ledger peers for example?)
Or is this something that is needed to be implemented outside the Hypeledger network topology?
Prior to Fabric v1.1, you would need to provide the database yourself and then just write the hashes to the blockchain as normal transactions. There are people who do this today for database records as well as for documents (store the document outside and just write the hash and metadata to the blockchain).
In Fabric v1.1, there is an experimental featured known as "private data". With this feature, the actual state is kept local to the peers in a private state database and is not included in the actual blockchain itself. The ledger actually contains hashes of the key and value.
There are new chaincode APIs (Get/PutPrivateData) which are used to do this automatically for you. You can then either delete the data manually or use the DeletePrivateState function in chaincode to delete the actual records (the hash will stay on the channel ledger).
This feature is experimental in v1.1 so you will need to build the peer from source with -tags experimental.
Since this feature is experimental, it is not currently supported in Composer.
We will be hardening the feature as part of the 1.2 release which is under development

Where is the transactions stored in IBM Blockchain Marble's Demo?

I am running blockchain demo which is provided by IBM mentioned in below link :
https://github.com/IBM-Blockchain/marbles
I have run Hyper ledger Fabric network on one linux system and 3 more clients on another 3 virtual instance on which my marbles client is running. It is working proper.
If we do any transactions then it will affect all the 3 client,
So, now if I want to see the all the transactions details, from where I can see it?
Is there any database or any files on client side?
Please provide me answer or reference link if any.
Thanks in advance.
When using the Marbles tutorial, there is a “Story Mode” option that will display more details about the transaction process. See point 10 under the “Use Marbles” heading.
Transactions are stored on a ledger which is associated with each peer. Refer to the Hyperledger Fabric documentation on the ledger. The linked Transaction Flow section might also be helpful. The ledger itself is not propagated to a client-side application. However, queries initiated from client applications can be run against the ledger to return information.
The Hyperledger Fabric Writing Your First Application documentation topic could also help to explain how querying the ledger works.
The marbles demo starts and uses a CouchDB docker container. You might be able to query it, but I don't know how the image was built. See line 187 in docker-compose-marblesv3.yaml.
It's easy to install CouchDB. You tell the peers about their CouchDB in the core.yaml file. But I don't see anything in the docker-compose-marblesv3.yaml so it is probable set in the image.

hyperledger fabric v0.6 modify Data in RockDB or Database

Since the concept of blockchain is not support modification. All data that being write to Ledger will not support changing. I want to test on changing data value that store in Ledger. I try to find ways around on how to change data, but I couldn't an exact one. I know that Hyperledger Fabric v0.6, Data is stored in RockDB.
Really Appreciate if someone could help to figure out that part. Because I also want to know that it really support un-modification.
Also Auditor will involve in checking Data changing. I also still cannot get clear answer on What's Auditor?
How to configure Auditor in Fabric v0.6?
If you have access to a peer or hack into a peer, you can tamper with the data. The power of blockchain is not that the data on a single peer is unmodifiable, it's that modification can be detected since the hash chain and signatures would not be correct if the data was tampered. This peer would not be able to change other peers, or convince other peers of the accuracy of the modified data. The integrity of the overall blockchain would remain.

Resources