0

I deleted a file from my Ethereum 'Chaindata' directory, the blockchain got reset and all the accounts and mined blocks were gone. Also, I could add random text into one of the log files.

How does this justify the immutability feature of Blockchain?

Is there any way I can prevent deletion of the file from the Chaindata directory?

  • Is it a private blockchain or the public one? – Teleporting Goat May 15 '18 at 12:02
  • It is a private blockchain. – Akhil Kintali May 15 '18 at 12:50
  • It doesn't change my answer. If you have a private blockchain you can do anything you want with it. A blockchain with only one node and one miner is neither safe nor immutable. – Teleporting Goat May 15 '18 at 12:52
3

A blockchain is based on consensus. If you change data from your local node, it doesn't change the data of the whole distributed blockchain. You'll just have a different blockchain than everyone else.

If you mine it, it will be basically equivalent to a fork or a private blockchain. A blockchain is strong and secure because it's shared by every node of the network, if it's different on your node, well it's just different on your node.

2

You have a private blockchain, but you need to understand the public Ethereum blockchain to understand its immutability.

The Ethereum blockchain is a Decentralized Application (Dapp). Unless you are running a private blockchain on just one computer, you don't have an Ethereum blockchain on your computer. You have a copy of it. The Ethereum blockchain is actually copied across thousands and thousands of computers spread around the entire world. If you want to know where the actual blockchain is, it is on 51% (or more) of the computers running Ethereum blockchain nodes, but never on 49% or less, or even on one of the computers.

As a Dapp, the Ethereum blockchain maintains its immutability by spreading itself over too many computers in too many locations to be maliciously altered. You can think of the blockchain as a collective experience. However, it is backed by a lot of mathematical expertise and advanced Dapp research.

Ethereum blockchain immutability is guaranteed because of the number of miners (and soon forgers) keeping track of the blockchain's ledger. The ledger is that data in your chaindata directory. You can change the files in chaindata on one of the nodes, meaning your computer or computers, but the other nodes on the blockchain will know that you have a different version of the blockchain and ignore your node's version. So, the blockchain cannot be altered by modifying the chaindata on one computer.

If your chaindata is altered, it will not sync properly with the actual Ethereum blockchain. In that case, just delete the chaindata completely and re-sync. If your connection to the Internet is good enough and you have a really good SSD in your computer, you should be able to re-sync a full node within a day.

If you are running a private blockchain for a company, you need at least three very secure nodes hosted on three separate servers to maintain a minimum immutability. That is because (as I mentioned above) your blockchain exists on 51% or more of your computers. As you introduce more nodes into your private Ethereum blockchain, you introduce more security and immutability. However, it is unlikely that you will reach the level of security and immutability of the public blockchain.

If you just need a private blockchain for development and testing purposes, then one node on one server will work. Just remember, one node on one server is not in anyway a dapp, so cannot be secure or immutable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.