Why is Git not considered a "block chain"?

39,588

Solution 1

The question reads: Why is Git not considered a “block chain”? So this is asserting that there is a wide-spread opinion that Git is not a blockchain (an assertion that is illustrated and corroborated by the answers preceding mine on this page) and asking for the reason of the prevalence of this opinion. This is a good question.

Taking the question literally, the answer could be that the blockchain term and concept gained popularity as part of the digital currency operation called “Bitcoin”, and hence came to be associated with how Bitcoin does things: which is by using a lot of computing power to calculate a specific hash including a nonce to meet certain arbitrary requirements, which is by allegedly having no central authority, which is by being “independent”, maybe even “democratic”, and the rest of the kool aid; and as these things are not seen in Git, well, Git cannot be a blockchain, right? And so the question would be answered literally.

Hidden behind this prima facie question is another question: What is a block chain? Now you could look up a definition somehwere and copy it over here, but I didn't do that as I have made up my mind years ago, when listening to a podcast about Bitcoin that strove to explain the new concept of a blockchain, that a blockchain works like Git and I don't intend to let my precious understanding be misled by random claims on the internet.

So what is a blockchain? What's in the word?

Nothing in the term “blockchain” presupposes the requirement to include a nonce in the content so as to come up with a hash of so and so many leading zeros. (This requirement is only there to be able to control the blockchain by computing power and so, ultimately, by money.)

Nothing in the term “blockchain” presupposes the existence of a network, let alone a decentralized one.

Nothing in the term “blockchain” presupposes any “independence” from “central authority”.

The term “block chain” only presupposes blocks (of data) chained together. Now what is a chain? Is it just a link? No, it is a strong link designed to hold things together by force.

A simple linked list doesn't qualify as a blockchain because the contents of the chunks of data in the list could be altered while the list would continue to link back and forth just fine. This is not how a chain works.

To make a link of blocks of data into a chain of blocks of data, the contents of the blocks need to be checksummed (digested) in one way or another and this checksum (digest) must be part of the link, making it a strong link protecting the content, preventing it from being altered. This is a blockchain.

And this is what Git does, and hence Git is a blockchain, or works as one, if you prefer.

To close the circle, let's ask again: Why is Git not considered a “block chain”? It could be because many people, perhaps even a large majority, do not focus on the essence of a concept but on blinking accidents.

Solution 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.

Solution 3

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.

Solution 4

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.

Solution 5

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

Share:
39,588

Related videos on Youtube

Paebbels
Author by

Paebbels

Patrick Lehmann studied computer science at Technische Universität Dresden, Germany. His professional career already found its foundation here when he was already teaching as a tutor computer engineering and computer architecture Later on, he specialized in digital design, FPGA technology, and high-speed communication solutions like Serial-ATA, Gigabit Ethernet, or PCI Express. He was sharing his gained knowledge in labs, research articles, and on social platforms. The focus of his research work is was on in-memory database systems, the Serial-ATA protocol implementation, and embedding FPGAs into a Cloud infrastructure. Since 2017, Patrick Lehmann is working for PLC2 GmbH as a instructor in the topics of VHDL, OSVVM, FPGA technology as well as high-speed communication. As a consultant and “fire fighter” he helps critical projects to bring on track. In cooperation with PLC2 Design GmbH, he is a senior system architect for FPGA-based solutions, team leader in FPGA design projects, and technical project advisor. Mr. Lehmann is one of the developers and maintainers of the PoC-Library, a platform and vendor independent open source IP core library. He is a contributor to the GHDL project as well, a free VHDL simulator and synthesis tool. In 2016, he started an initiative called "Open Source VHDL Group", whose aim is a free collection of VHDL packages. As a maintainer of more than 40 open source repositories and owner of several GitHub organizations, he is one of circa 20 people worldwide driving the open source community for EDA related tooling. Furthermore, Mr. Lehmann is very active in the IEEE P1076 "VHDL Analysis and Standardization Group" since 2014. He detailed and wrote major parts of the language changes for the current VHDL-2019 revision. In 2017, he became an IEEE Standards Association member and was announced vice-chair of the IEEE P1076 working group. He managed to register VHDL as an open source pilot project. In cooperation with IEEE SA, the working group successfully publishes all VHDL language packages as the first open-source standard in the history of IEEE. In 2021, the IEEE P1076 working group for VHDL-2025 was approved. One of its main goals is to create a new collaborative and open-source publishing flow at IEEE SA, so the whole standard might become open source.

Updated on May 13, 2022

Comments

  • Paebbels
    Paebbels about 2 years

    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 and 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?

    • Leon
      Leon almost 7 years
      Git is not listed as an example of block chains When I first tried to learn what a blockchain was, I was referred to git as the most prominent example (I don't have the exact link now, but it was from the top of the list returned by Google search for "blockchain")
    • poke
      poke almost 7 years
      Both Git and blockchain are using merkle trees as their fundamental underlying data structure. But that alone does not make Git a blockchain, or the other way around. – If you do know Git (and its internals), you do know merkle trees though, which can be a very helpful revelation to understand how blockchains work.
    • v.oddou
      v.oddou over 6 years
      It's your opinion that "it is NOT considered..." bitcoin.stackexchange.com/a/43627/77469
    • poke
      poke over 6 years
      @v.oddou Merkle trees exist since 1979. Just because two technologies are using Merkle trees prominently as part of their concept, that does not make them the same. It is incorrect to reduce either Git or block chains to just merkle trees as neither of them are merkle trees. They only use them. That makes the linked post completely irrelevant since it is actually talking about merkle trees, and not block chains.
    • v.oddou
      v.oddou over 6 years
      @poke it's talking about blockchains and a 91 paper. If the linked post was talking about Merkle trees, it'd be talking about Merkle trees and the 79 paper. It seems that you are trying to navigate the debate to the direction where we'd need to accept that blockchains are wonderful and new. But git is a blockchain by all definitions. And if you want to say that trustless consensus is way more than that, then we agree, though that is not blockchain related.
    • Alexander Arendar
      Alexander Arendar about 6 years
      @v.oddou post your answer separately and I will upvote it because I completely agree with you that blockchain is a data structure the Git implements. And all the other things like consensus, peer network, etc - are not a part of this data structure.
    • Jannis Ioannou
      Jannis Ioannou about 6 years
      Can you cite the statement: "git is not considered a block chain"?
    • Paebbels
      Paebbels about 6 years
      @JannisIoannou ?? I don't need to cite it.... You have lots of answers and comments that you can read here.
    • ctrl-alt-delor
      ctrl-alt-delor about 6 years
      If block chains agree to have one branch, and will all agree to forget additional branches (not mutate, just forget). Then this is the same as git history rewrite.
    • Raja
      Raja over 3 years
      This 1 hour video describes the various things you would need to add to Git, to make it operate like a cryptocurrency blockchain. Git as Blockchain - Michael Perry (NDC Conference Sydney).
    • iconoclast
      iconoclast about 3 years
      @v.oddou: no it is not the OP's opinion. It is a FACT that many people consider the blockchain to have been created for Bitcoin: en.wikipedia.org/wiki/Blockchain . It is a fact that many people have that opinion. OP did not ask for opinions, OP asked for facts which explain why so many people do not classify Git as using blockchain technology. Closing a question because it peripherally mentions an opinion is really unhelpful. OP is not asking "what's the best programming language/compiler/OS/editor/etc.?"
    • xr280xr
      xr280xr over 2 years
      @JannisIoannou See Argument from ignorance
  • v.oddou
    v.oddou over 6 years
    I'm sorry but nowhere blockchains bring anything more than git does. blockchains are exactly as stupid as git. If you don't believe so, you are overhyped. The peer network and the consensus systems are a separate thing.
  • Munhitsu
    Munhitsu over 6 years
    private ledgers (blockchains) are conceptually identical to git
  • allo
    allo about 6 years
    Why do you consider a trustless consensus system as part of a block chain? There are many ways to create trust in a block chain, for git it is just that you know that everything in your local copy cannot be removed by the next pull and you specifiy that you want the changes in the remote copy. You only need trustless consensus when it would otherwise be unclear what's right. In git multiple branches can be "right" and get eventuell merged together.
  • Miguel Mota
    Miguel Mota about 6 years
    @allo GitHub is typically used as the central source of truth but what's stopping an admin from force pushing and overriding history? If there was no GitHub and you pulled from your peers then how do you handle merge conflicts? How do you determine whose right?
  • allo
    allo about 6 years
    Nothing stops you from force pushing. But like a blockchain guarantees me, I can detect it because my chain cannot verify these commits as being based on it. That's the point with a blockchain, not the decentral consent. And in git I explicitely do not want to have a consent protocol for what I merge (development is not a democracy), but I actually read the new commits when merging them into my chain. So my copy is right, because it consists of stuff I already have and thus can verify (i.e. by seeing merge conflicts) and stuff I review and then accept into it.
  • Miguel Mota
    Miguel Mota about 6 years
    @allo you're correct in that regard, however I stated in the answer "cryptocurrency blockchains", not blockchains in general, but I now that I think about it my answer doesn't really seem to fit the question being asked because I was thinking about the system as a whole rather than the underlying data structures
  • allo
    allo about 6 years
    You're completely right about the difference of the block chains used in git and cryptocurrencies. It is just not an answer to the question why (or if) git is not considered a block chain, when using the term rigorouly. Even the currently accepted answer is similar to your answer. I still prefer the answer which got the bounty.
  • herman
    herman about 4 years
    Typically, in a git repository there is one root commit but there can be any number of branches. If you see the last commit in a branch as a root commit and the parents as children, you have a tree with many roots that grow... I think it's just a variation on the Merkle tree where parent references are in the contents instead of child references. There can be multiple parents and children so it isn't even a tree.
  • Janus Troelsen
    Janus Troelsen over 3 years
    Without specifying what "distributed consensus" exactly requires, this distinction is irrelevant. If the PoW threshold is low, anybody can overwrite your blockchain.
  • Janus Troelsen
    Janus Troelsen over 3 years
    Using this definition, "permissioned blockchain" makes no sense since they do in fact have a central authority. So your definition is contradicting actual usage of the word. See e.g. semi-centralised (federated) blockchains like Liquid.
  • Daniel Vartanov
    Daniel Vartanov over 3 years
    @JanusTroelsen "permissioned blockchain" (or "private blockchain") is an oxymoron and indeed makes absolutely zero sense, so called centralised blockchains don't have a single difference from a functionality of regular servers or regular P2P networks. These terms (private/permissioned/centralised blockchain) are used only outside of the professional community.
  • Janus Troelsen
    Janus Troelsen over 3 years
    But R3 is a professional company and they use it: r3.com/blog/…
  • Daniel Vartanov
    Daniel Vartanov over 3 years
    R3 had been ridiculed in the community exactly for abusing the word 'blockchain' to market their software which could easily exist even if the initial paper was not published back in 2008. Reference to the authority of R3 is not valid I'm afraid.
  • Lumi
    Lumi about 3 years
    Git is a blockchain. Objections such as requiring "a highly decentralized system" are implementation details.
  • Lumi
    Lumi about 3 years
    The irrational and unnecessary cipher requirements in Bitcoin are only there so that block chaining requires computing power and thus can be dominated by purchasing computing power, and thus by financial power.
  • Lumi
    Lumi about 3 years
    The central authority in a blockchain such as Bitcoin which requires unnecessary and irrational computing is simply the party assembling the most computing power.
  • iconoclast
    iconoclast about 3 years
    I agree with you (or at least I do not disagree) that Git should be considered a blockchain. But for corroborating evidence (beyond the other answers here) that many others think differently, see wikipedia: en.wikipedia.org/wiki/Blockchain
  • Yasushi Shoji
    Yasushi Shoji over 2 years
    So, what this answer is trying to say is that Git is not a block chain because blockchains usually also means having a highly decentralized system on a block level.? This answer doesn't seem to describe why, except having this one "example" which many people considered false. What am I missing?
  • user253751
    user253751 over 2 years
    Git is a highly decentralized system, anyway. Not sure what "on the block level" means. Full Bitcoin nodes store a full copy of the Bitcoin blockchain and git users store a full copy of the Git repo. And new blocks in both cases can come from anywhere.
  • Bergi
    Bergi over 2 years
    "blockchains usually also means having a highly decentralized system, and not all blocks need to be in the same place" - so does Git? You can do shallow or partial clones.
  • stevegt
    stevegt over 2 years
    Fantastic summary.