本文介绍了为什么Git不被视为“区块链"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Git的内部数据结构是一棵数据对象树,其中每个对象仅指向其前身.每个数据块都经过哈希处理.当保存的哈希值与实际哈希值发生偏差时,将注意到修改(位错误或攻击)中间块.

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.

这个概念与区块链有什么不同?
Git并未作为块链的示例列出,但至少在摘要中,这两种数据结构的描述看起来都是相似的:数据块,单向反向链接,散列...).

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, ...).

那么Git不叫做区块链又有什么区别呢?

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

推荐答案

git并非出于以下几个原因的区块链技术示例(这些是第一个想到的):

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

  1. 在区块链实现中,每个区块在添加到区块链之前都要经过多次独立验证.这确实是区块链技术最重要的事情之一,也是确保其不可破解性"的原因.另一方面,许多git项目不需要独立的验证,而当他们需要时,它们只需要一个人在更改提交到存储库之前就对其进行签名.因此,通过最多必须信任的一个验证点,git打破了区块链技术的核心宗旨之一.

  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.

git存储库不一定在许多服务器上都重复.您可以在本地的git存储库中工作,如果本地磁盘已损坏,则将丢失所有内容.区块链技术意味着可以在服务器之间复制分类帐.

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.

您可以重写git历史记录.将<branch>设置为比<remote>处的状态更早的状态的git push <remote> <branch> --force将重写历史记录.在区块链中,分类帐是一成不变的历史.

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.

这篇关于为什么Git不被视为“区块链"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 04:00
查看更多