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.
Related
I'm currently looking to securely replicate hundreds of Gbs of data across a few hundred hosts. I was looking at hyperledger-fabric private blockchain because of its use of TLS and peer to peer gossip protocol for data transmission, plus of course the security of the blockchain itself.
Is it reasonable for me to be considering using blockchain as a way to securely do data replication? I have not seen this in any blockchain use case, but from what I've read it seems reasonable even though everything I've read seems to indicate storing data in the blockchain is a bad idea. Usually the arguments are that it costs too much and the data has to be replicated across all the peers in the system. Cost isn't a concern in this case because its a private blockchain and for my use case the data replication (if it can be done efficiently) is what I'm looking for.
I could use ipfs, swift, S3, etc. to store the data, but that would add operational burden, especially if hyperledger-fabric can do the job on its own.
Also, if I use hyperledger private data collections, how much control over purging do I have? For my use cases, I can't just purge the oldest data as in some cases older data needs to be preserved for a long time and in some cases newer data can be purged fairly quickly.
On the subject of data replication:
TL;DR; Not a blockchain solution
Here's my thinking behind that.
Storing large amounts of data isn't a good idea as you've mentioned. Yes there's the replication side of the data across. (but that's a side-effect needed in this case). But also there's the signing and validation etc that nees to take place across all that data. So the costs in terms of processing would mean it would inefficient.
Definition of securely.. You don't say what quality of service would constitute 'secure'. For example
Access Control for users to access the data?
Assurance that the data has been replicated and is on disk at remote locations without corruption?
Encryption of data to protect it in transit and at rest.
Blockchain, and I'm thinking Hyperledger Fabric here, would offer you the assurance. But there's no encryption in transit, you'd need to add that. And access control, the primitives are there but required you to implement and use them.
I would tend to think of the use of Blockchain in this scenario would be to provide the audit trail of how the data was replicated between hosts, with some other protocol.
On the subject of private data collection purging:
Currently this is implemented by purging data when the peer reaches a certain block height. i.e. purge after 42 blocks. But we're working on a feature to allow 'purge-on-demand' based on a call from the chaincode.
I have a problem with understanding why Hyperledger Fabric (HLF) uses blockchain structure.
I know that in Bitcoin blockchain structure ensures big security due to PoW algorithm and longest chain rule, but what are advantages of using a blockchain structure in HLF?
It seems to me that in Hyperledger Fabric, instead of the blockchain structure, there could be one transaction history log and network could work in the same way - I bet I'm wrong, but I haven't been able to find an explanation yet.
I would be grateful for the clarification of this issue.
I think a lot of questions you have in your mind comes from the overlapped definitions of DLT and blockchain.
DLT:
A DLT is simply a decentralized database that is managed by various participants. There is no central authority that acts as an arbitrator or monitor. As a distributed log of records, there is greater transparency – making fraud and manipulation more difficult – and it is more complicated to hack the system.
All of this could well be familiar because it’s written about the features of blockchain as well.
Blockchain:
Blockchain is nothing else but a DLT with a specific set of features. It is also a shared database – a log of records – but in this case shared by means of blocks that, as the name indicates, form a chain. The blocks are closed by a type of cryptographic signature called a ‘hash’; the next block begins with that same ‘hash’, a kind of wax seal. That is how it is verified that the encrypted information has not been manipulated and that it can’t be manipulated.
DLT platforms that are not blockchain provide immutability too, but it's just the way Hyperledger Fabric provides this characteristic which makes it a blockchain framework.
Every blockchain framework, be it the Ethereum, Bitcoin, etc all store the transaction information in blocks, where each block is linked to its predecessor by a hash and provides immutability.
Corda is very much similar to Hyperledger Fabric, but it is said to be both a blockchain and not a blockchain. Architecturally, it's very much similar to Hyperleder Fabric, but with only a key difference which makes Hyperledger Fabric a blockchain framework, and Corda a DLT.
I'll try to answer your question by emphasizing on the point that why Corda is not a blockchain.
Why is Corda a blockchain, and not a blockchain?
A Transaction in Corda is cryptographically linked (chained) to the transactions it depends on. Just like Bitcoin, but the range of concepts that can be expressed is far wider.
Transactions in Corda are processed by having each participant in the transaction execute the same code deterministically to verify the proposed updates to the ledger. Just like Ethereum, but the languages you can use are high-level and productive, like Java, rather than obscure ones like Solidity.
Transactions in Corda are shared only with those who have a need to know. Just like channels in Fabric but designed in from day one and fully integrated into the programming model.
Transactions in Corda are confirmed through a process of consensus forming using one of a range of algorithms, including Byzantine Fault Tolerant algorithms. Just like any other blockchain, but with the unique features that a Corda network can support multiple different consensus pools using different algorithms.
So, for all intents and purposes, Corda is a blockchain. And yet… there’s also an utterly critical difference.
Unlike the platforms mentioned above, Corda does not periodically batch up transactions needing confirmation — into a block — and confirm them in one go. Instead, Corda confirms each transaction in real-time. No need to wait for a bunch of other transactions to come along. No need to wait for a “block interval”. Each transaction is confirmed as we go.
Now coming onto your question why Hyperledger Fabric (HLF) uses blockchain structure? The answer is simply because they chose to.
References:
https://www.bbva.com/en/difference-dlt-blockchain/
https://cointelegraph.com/news/what-is-the-difference-between-blockchain-and-dlt
https://www.corda.net/blog/corda-top-ten-facts-7-both-a-blockchain-and-not-a-blockchain/
To keep the record immutable, Hyperledger Fabric uses blockchain structure. So by using Hyperledger Fabric, you can get an immutable record of all the transactions which is tough to temper with fraudulent activities.
Suppose you buy an valuable asset and you are the current owner of that asset. Now it is very hard for others to temper that records or change your ownership without your permission as Hyperledger Fabric uses blockchain structure to keep the record immutable.
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)
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.
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