TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Is Git a Block Chain?

126 pointsby argonabout 10 years ago

16 comments

ntonozziabout 10 years ago
Both git repositories and bitcoin are specialized Merkle trees. Merkle trees are incredibly useful and general; they are used in many kinds of verification, especially of large chunks of data.<p><a href="http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Merkle_tree" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Merkle_tree</a>
评论 #9437300 未加载
评论 #9437188 未加载
jscottmillerabout 10 years ago
&quot;Blockchain&quot; is generally used to refer to systems that either 1) use the sequence of blocks to model changes in custodianship or 2) (more generally) enforce a set of rules governing the correctness of a given block.<p>That is, a block in the bitcoin blockchain is valid not only if its hash matches what one would expect given the included transactions, but that those transactions adhere to the rules of bitcoin. (No double-spends, no dust transactions, etc).<p>While there are data structures in a git commit that must be present and&#x2F;or follow a particular set of semantics, git does not enforce anything about the _contents_ of those commits.<p>Another key distinction: blockchains seek consensus, whereas divergent forks in git repos are by design.<p>EDIT: I should probably not distinguish too much between consensus and rule enforcement, as those two are obviously intertwined. :)
sadgitabout 10 years ago
No, its not. Its just a chain. There&#x27;s no block. The block in a blockchain is everything to do with distributed &#x2F; trustless conscensus.
评论 #9437095 未加载
评论 #9437344 未加载
wmfabout 10 years ago
Consensus seems like an essential property that distinguishes a blockchain from a Merkle tree, and git does not provide consensus.
评论 #9440144 未加载
评论 #9438128 未加载
joeframbachabout 10 years ago
Related is the Gitcoin mining challenge from Stripe&#x27;s Capture The Flag 3.<p>Here&#x27;s a writeup: <a href="https:&#x2F;&#x2F;github.com&#x2F;ctfs&#x2F;write-ups-2014&#x2F;tree&#x2F;master&#x2F;stripe-ctf3&#x2F;level1" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ctfs&#x2F;write-ups-2014&#x2F;tree&#x2F;master&#x2F;stripe-ct...</a><p>A Gitcoin miner updates the ledger (a text file in the repo), and &quot;mines&quot; the next-smaller hash.<p>It doesn&#x27;t have consensus, but it does give a neat programming challenge.
nebulous1about 10 years ago
Not sure I get it. Appears to be technically correct assuming we view the term &quot;block chain&quot; as a basic combination of the words as opposed to a term of art, but without the PoW it seems to be missing the point.
oleganzaabout 10 years ago
I&#x27;ll quote myself (<a href="http:&#x2F;&#x2F;blog.oleganza.com&#x2F;post&#x2F;85111558553&#x2F;bitcoin-is-like" rel="nofollow">http:&#x2F;&#x2F;blog.oleganza.com&#x2F;post&#x2F;85111558553&#x2F;bitcoin-is-like</a>):<p>Bitcoin is like Git: in Git (a distributed version control system) all your changes are organized in a chain protected by cryptographic hashes. If you trust the latest hash, you can get all the previous information (or any part of it) from any source and still verify that it is what you expect. Similarly, in Bitcoin, all transactions are organized in a chain (the blockchain) and once validated, no matter where they are stored, you can always trust any piece of blockchain by checking a chain of hashes that link to a hash you already trust. This naturally enables distributed storage and easy integrity checks.<p>Bitcoin is unlike Git in a way that everyone strives to work on a single branch. In Git everyone may have several branches and fork and merge them all day long. In Bitcoin one cannot “merge” forks. Blockchain is a actually a tree of transaction histories, but there is always one biggest branch (which has the value) and some accidental mini-branches (no more than one-two blocks long) that have no value at all. In Git content matters (regardless of the branch), in Bitcoin consensus matters (regardless of the content).
zkhaliqueabout 10 years ago
Yes they are Merkle trees. But the missing part of a blockchain is the incentive part. Obviously you don&#x27;t even need git or anything so complicated for a blockchain. All you need is a network of computers that would periodically:<p><pre><code> * receive all the transactions (or their hashes) that occurred * sign this with some HMAC, and publish it * then we know that the transactions occurred by X time </code></pre> of course, the question is how do we know transaction A really occurred after X time? Perhaps some will claim it occurred before X, but just wasn&#x27;t included by anyone in the network for X because they are discriminating against that transaction&#x27;s participants, or something.<p>And what if it was included by some in the network but not others? How do we know some are not cheating?<p>That&#x27;s where proof-of-work comes in. You can also have proof-of-stake and other mechanisms, by which to solve the Byzantine Generals problem. How do we know that the signers aren&#x27;t cheating? Who watches the watchers?
评论 #9437740 未加载
c0achmcguirkabout 10 years ago
The strength of bitcoin is the blockchain. It prevents you from going back and rewriting history--you can only append to the current block.<p>In Git you can change history. So I don&#x27;t think Git can be called a blockchain, although it shares the sames concepts, like the merkle tree.
评论 #9437208 未加载
kangabout 10 years ago
Here is how a website can implement git in a decentralised blockchain-like consensus.<p>Launch Gitcoin.com. The company&#x27;s shares are called gitcoins which is a premined cryptocurrency by gitcoin.com. The aim of the company is to balance the distribution of shares according to their value, to maximize its own value. Parties who support this company&#x27;s cause or want to gain a monetary incentive out of the value that gitcoin would gain would mine gitcoins or buy them in exchanges.<p>Authors publish the meta data about their content hashed with any private key they want. Each of these private key is a separate logical &#x27;view&#x27; for showcasing the Authors content. For eg, one private key each for friends, business and everyone, so that one category cannot view the contents of the other, and the share the respective public keys with concerned parties using any medium. The aim would be to earn gitcoins and go and sell them at an exchange to earn a living wage.<p>The consumers of code would pay for the code they want to view to the public key, which is also a gitcoin address, which they already have! This automatically sends gitcoins to the author.<p>All code is open to everyone. If you have a public key you can view its associated code and change it, by sending money to it. Gitcoin.com takes a cut in providing this service.<p>This website also invents two brand new features in a website - no password and no captcha!<p>- No Password because you can view any code if you send money to it. Authors will keep the rates very high and share a new private category&#x27;s public key to people they wanna give discount to. You can have as many identities you like and can club, fork and terminate them.<p>- No Captcha because captchas were invented to prevent robots. But robots are not always bad. So we want people to build helpful reddit-like robots but not bad ones. Gotcon.com solves this by allowing all robots according to an economic incentive motive. For ex, a user can build a good robot that shows the issues list corresponding to a gitcoin address. People pay this robot in gitcoins and so this robot has enough gitcoins to open the community desired code. But if a bad robot tries to spam this good robot, people will simply create a new address and copy all previous data and move to it, all of this at a click of &#x27;block&#x27; button.<p>So basically, by changing the behavior of block button to create a decentralised copy of gitcoin.com itself and then moving to it eliminates the bad actor immediately and making it yet expensive for him to keep paying to see the code.
EazyCabout 10 years ago
As others have mentioned, the one main distinguishing factor between blockchains and git (at least in practice because bitcoin&#x27;s POW makes rewriting the chain expensive) is the consensus among its general users and in inability to actually change the history of the blockchain. Mathematically they are very similar, but git repos aren&#x27;t &quot;secure&quot; in the same way. That&#x27;s why I would argue against the author that git isn&#x27;t the most valuable blockchain in use today although it could very well be the biggest.
spaceprophetabout 10 years ago
Is this list of comments a block chain?
评论 #9437229 未加载
LukeHoerstenabout 10 years ago
I think so:<p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;LukeHoersten&#x2F;status&#x2F;588725182489067520" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;LukeHoersten&#x2F;status&#x2F;588725182489067520</a>
aequitasabout 10 years ago
Would this qualify ZFS as a blockchain as well?
Inndyabout 10 years ago
but SHA-1 is considered not secure, so you can&#x27;t just trust commit-id
ThomPeteabout 10 years ago
no but wikipedia kind of is