最近在区块链这个怪圈里无论是会议还是区块链项目都在聊“区块链共识”打造“共识机制”那到底什么是区块链共识呢? What is the consensus in the block chain that has recently been talking about the “block chain consensus” building “consensus mechanisms” in the circle of blocks, both in meetings and in the block chain project? 什么是共识?从字面上来理解,就是“共同的认识”。 What's consensus? It's literally a common understanding. 人与人是不同的,这种不同不仅体现在身材、长相、能力,更体现在文化、观点、想法、利益诉求等等方面。而共识,在这里的意思就是一个群体的成员在某一方面达成的一致意见。 People are different, not only in their size, appearance, abilities, culture, opinions, ideas, claims of interest, etc. and consensus here means that members of a group agree on a certain aspect. 有朋友会问:共识是因为区块链才存在的吗? A friend would ask, "Does the consensus exist because of the block chain? 不是的,共识只是因为区块链的火爆才引起大家再次的关注,但是共识本身就存在于我们生活的方方面面,只是我们传统的共识都是来源于“中心化”。 No, consensus is only a matter of renewed concern because of the fire in the block chain, but consensus itself exists in every aspect of our lives, except that our traditional consensus is based on “centralization”. 例如我们现在离不开的支付方式,支付宝和微信。首先他们都是中心化的,其次为什么大家可以在上面实现转账,实现日常的消费支付,其最大的原因是来自大家对支付宝和微信的共识,认为他们是足够安全的,可以随时提现。 For example, the way we're going to make payments, payment treasures, and micro-letters. First of all, they're all centralized, and second, why you can make transfers and make day-to-day consumer payments, most of all because of the consensus on payment treasures and micro-letters that they are safe enough to be available at any time. 而区块链共识呢,提供的是一种全新的达成共识的方式,而这种新的共识机制使得不依靠中心化的权威,大规模的高效协作依然能够完成。 The block chain consensus provided a completely new way of reaching consensus, and this new consensus mechanism allowed large-scale and efficient collaboration to be accomplished without relying on centralized authority. 我们想一下,共识是目标,因为有共识我们才能让身处不同地方的交易畅通无阻;但传统共识,权威是方式。虽然它看起来是靠谱、高效的方式,但最大的风险就是如果交易基数太大,中心系统运转不过来或者权威中心倒了,建立起来的城堡也随之倒塌;并且所有的规则都是权威中心制定的,用户只能无条件的服从、服从、服从! We think that consensus is the goal, because there is consensus that we can keep transactions in different places open; but the traditional consensus is that authority is the way. While it seems to be a sound and efficient way, the greatest risk is that if the trading base is too large, the central system will not work or the central authority will collapse and the castle will collapse; and all the rules are set by the authority centre and users will only be able to obey, obey, obey and obey unconditionally! 如果我们找到一种不同于源自权威的共识机制,我们就可能获得一种新型的组织形式。此时的区块链共识,就是一种完全区别于权威共识的“去中心化”的共识;也称为“区块链共识”。 If we find a mechanism of consensus that is different from that derived from authority, we may acquire a new form of organization. At this point, the block chain consensus is a “decentralized” consensus that is entirely different from the authoritative consensus; it is also called the “block chain consensus”. 区块链共识机制解读: Interpretation of the block chain consensus mechanism: 1、分布式账本,就是交易记账由分布在不同地方的多个节点共同完成,而且每一个节点都记录的是完整的账目,因此它们都可以参与监督交易合法性,同时也可以共同为其作证。 1, a distributed account book, is a transaction book that is carried out by multiple nodes located in different locations, and each node records a complete account, so that they can participate in monitoring the legitimacy of the transaction and can testify against it together. 跟传统的分布式存储有所不同,区块链的分布式存储的独特性主要体现在两个方面:一是区块链每个节点都按照块链式结构存储完整的数据,而传统分布式存储一般是将数据按照一定的规则分成多份进行存储。 Unlike traditional distributed storage, the uniqueness of the distributed storage of block chains can be found mainly in two aspects: first, that each node of the block chain stores complete data according to a block chain structure, while traditional distributed storage typically divides data into multiple parts according to certain rules. 二是区块链每个节点存储都是独立的、地位等同的,依靠共识机制保证存储的一致性,而传统分布式存储一般是通过中心节点往其他备份节点同步数据。 The second is that each node of the block chain is stored independently and in the same position, relying on a consensus mechanism to ensure consistency in storage, while traditional distributed storage generally synchronizes data with other back-up nodes through a central node. 其中最大的特点是没有任何一个节点可以单独记录账本数据,从而避免了单一记账人被控制或者被贿赂而记假账的可能性。也由于记账节点足够多,理论上讲除非所有的节点被破坏,否则账目就不会丢失,从而保证了账目数据的安全性。 The biggest feature is that there is no single node to record book data separately, thus avoiding the possibility of a single account keeper being controlled or bribed to keep a false account. Also, because of the large number of nodes, the accounts are theoretically not lost unless all nodes are destroyed, thereby ensuring the security of account data. 2、非对称加密和授权技术,存储在区块链上的交易信息是公开的,但是账户身份信息是高度加密的,只有在数据拥有者授权的情况下才能访问到,从而保证了数据的安全和个人的隐私。 2. The asymmetric encryption and authorization technology of 3、区块链共识机制,就是所有记账节点之间怎么达成共识,去认定一个记录的有效性,这既是认定的手段,也是防止篡改的手段。区块链提出了四种不同的共识机制,适用于不同的应用场景,在效率和安全性之间取得平衡。 3. The 4、智能合约,是基于这些可信的不可篡改的数据,可以自动化的执行一些预先定义好的规则和条款。以租房为例,如果房东和租客之间通过智能合约达成租房合同,房主要求租客每月8号交房租;如果租房某个月并未在8号之前交付房租,智能合约可自动执行,将房屋的使用权收回。 4. Smart contracts are based on these credible and indeterminable data and allow for automated implementation of predefined rules and provisions. For example, if a rental contract is concluded between the landlord and the tenant through a smart contract, the landlord requires the tenant to pay the rent on the 8th of a month; if the rent is not paid before the 8th month, the smart contract is automatically enforced and the right to use the house is recovered. 简单点来讲区块链就是一个公共账本、公开的数据库,同时也是一个点对点的协作网络。协作方(节点)共同维护数据,每个节点都有一份完整的数据备份,所有节点的数据内容必须完全一致,每个节点都可以在本地查找交易记录,每个节点也可以在本地添加交易。 Simplely speaking, the block chain is a public account, an open database, and a point-to-point collaboration network. The collaborators (nodes) maintain the data together, each node has a complete data backup, all nodes have to be identical in content, each node can search the transaction record locally, and each node can add a transaction locally. 因为没有一个中心来指挥、协调,要完成这个协作,区块链就必须有一个共识机制,这个机制必须解决两个基本问题:1.谁能记账;2,数据如何同步。 Since there is no centre for command and coordination, the completion of this collaboration requires a consensus mechanism in the block chain, which must address two basic issues: 1. Who can account for it; and 2. How the data are synchronized. 数据写入(区块添加)的过程是这样的:有权打包交易的节点,将打包的交易(区块)放在既有的数据库(区块链)上,并向全网广播,其他节点收到信息,验证区块无误,就会同步这个新打包的交易。每个打包的交易叫作一个区块,区块不断叠加,延长区块链。 The process of data writing (block addition) is as follows: each packaged transaction is called a block, and the block is added up, extending the block chain by placing the packaged transaction (block) on an established database (block chain) and broadcasting it to the whole network. The other nodes receive information and verify the block is correct. 同步数据有一个问题,就是如何对在一定时间段内发生的交易的先后顺序达成一致? A question about synchronizing data is how to agree on the order of transactions that take place over a certain period of time. 由于各个节点都在自发地记账或者同步,在点对点相互通信下的情况下存在较高的网络延迟,因此各个节点收到数据的先后顺序是不一致的。你记你的,我记我的,如何保证每个节点副本数据的一致性? Since each node is automatically recorded or synchronized and there are high network delays when point-to-point communications take place, the order in which data are received at each node is inconsistent. Remember, I remember mine. How do you ensure that each node copy data is consistent? 区块链的共识机制是:以最长链作为主链,即每个节点总是选择并尝试延长主链,也就是各节点都以区块最多的那条链作为自己添加、更新区块的选择,这样多节点就能同步一个权威的公共账本了。 The consensus mechanism for the 而第一个问题,谁有权能记账,我们把这个记账的称之为矿工;而矿工的工作原理目前有三种:POW,POS,DPOS。 And the first question, who has the right to keep the books, we call them miners; the working principles of miners are currently threefold: Pow, POS, DPOS. “遇见区块链,遇见更美好的未来”。 仁和联盟社区陪同大家一起学习了解最新区块链动向,相关问题可留言或加入社群一起交流探讨! “See blocks chain, see a better future.” |
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论