Why is Git not considered a “block chain”?

2019-03-07 17:18发布

问题:

Git's internal data structure is a tree of data objects, wherein each objects only points to its predecessor. Each data block is hashed. Modifying (bit error or attack) an intermediate block will be noticed when the saved hash und the actual hash deviate.

How is this concept different from block chain?
Git is not listed as an example of block chains, but at least in summaries, both data structure descriptions look alike: data block, single direction reverse linking, hashes, ...).

So where is the difference, that Git isn't called a block chain?

回答1:

git is not an example of blockchain technology for several reasons (these were the first that came to mind):

  1. In a blockchain implementation, every block is verified independently multiple times before it is added to the blockchain. This is indeed one of the most important things about blockchain technology and is what ensures its "unhackability." On the other hand, many git projects do not require independent verification and, when they do, they only require one person to sign off on a change before it is committed to the repository. Hence, with at most one point of validation that you must trust, git breaks one of the core tenets of blockchain technology.

  2. A git repository is not necessarily duplicated on many servers. You can work from a git repository locally and if your local disk were corrupted, you would lose everything. Blockchain technology implies the reproduction of the ledger across servers.

  3. You can rewrite git history. A git push <remote> <branch> --force where <branch> is set to a previous state than that at <remote> would rewrite the history. In blockchains, the ledger is an immutable history.



回答2:

The reason why Git and blockchains appear similar is because they are both using merkle trees as their underlying data structure. A merkle tree is a tree where each node is labeled with the cryptographic hash value of their contents, which includes the labels of its children.

Git’s directed acyclic graph is exactly that, a merkle tree where each node (tag, commit, tree, or blob object) is labeled with the hash of its content and the label of its “child”. Note that for commits, the “child” term conflicts a bit with Git’s understanding of parents: Parent commits are the children of commits, you just need to look at the graph as a tree that keeps growing by re-rooting it.

Blockchains are very similar to this, since they also keep growing that way, and they are also using its merkle tree property to ensure data integrity. But usually, blockchains are understood as way more than just merkle trees which is where they are separating from the “stupid content tracker” Git. For example, blockchains usually also means having a highly decentralized system on a block level (not all blocks need to be in the same place).

Understanding blockchains is kind of difficult (personally, I’m still far away from understanding everything about it), but I consider understanding Git internals as a good way to understand merkle trees which definitely helps understanding a fundamental part about blockchains.



回答3:

Cyber Currencies like Bitcoin, use a distributed consensuses cryptographic chain of blocks (merkle tree). Common usage has shortened this to 'blockchain'

While git uses a chain of blocks (merkle tree), it lacks the distributed consensuses cryptographic components that common usage of the term 'BlockChain' imply.



回答4:

Unlike cryptocurrency blockchains; git doesn't have a p2p trustless consensus mechanism.



回答5:

Blockchain is not just any chain of any blocks.

Blockchain is when there is a way of determining the main chain when two or more are diverted, and when no central authority is needed for that determination.