区块链的本质和原理
一个公开透明的去中心化账本
An open and transparent decentralised account book.
它是基于一些密码学原理。比如说哈希算法、公钥、私钥、数字签名等技术来实现。它不需要基于信用和第三方中介的参与,由分布式网络中的节点来共同维护的。
It is based on a number of cryptography principles. Technologies such as Hashi algorithms, public keys, private keys, digital signatures do not need to be based on credit and the involvement of third-party intermediaries xff0c; it is maintained jointly by nodes in distributed networks.
其原理如下:
as xff1a;
1.当分布式系统中一个节点进行一笔进行交易时,该节点会输入交易的编号,交易的数量,然后用自己的私钥生成数字签名,写上接收方的地址,最后发送整个分布式网络;
2.在分布式的p2p网络中,一个消息会辐射式从周边节点扩散,这样所有的节点都能知道新的交易的产生;
3.当其他节点收到交易内容后就对交易的数目和签名进行校验,确认签名无误并且发送者的确拥有足够多的资产,则会将该交易信息纳入一个区块中;
1. xff0c when a node in the distribution system is engaged in a transaction; xff0c; xff0c; ff0c; xff0c; xff0c; xff0c; xff0c; xff0c;
4.每个节点都尝试在自己的区块中找到一个具有足够难度的工作量证明,这个工作量证明就是区块链中的共识机制之一,这个过程通常称之为挖矿;
4.当一个区块找到了一个工作量证明后,该节点就能得到一定的报酬,类似于劳动所得,这个劳动主要是指计算机的计算和消耗的电费,而报酬一般是电子货币,比如在比特币系统中报酬就是一定数量的比特币,同时它向全网进行广播;
5.当且仅当包含在该区块中的所有交易都是有效的且之前未存在过的,其他节点才认同该区块的有效性;
4. Each node has tried to find a sufficiently difficult proof of workload in its own block, which is one of the consensus mechanisms in the block chain xff0c; this process is commonly referred to as mining xff1b;
6.其他节点表示他们接受该区块,而表示接受的方法,则是在跟随该区块的末尾,制造新的区块以延长该链条,而将被接受区块的随机散列值视为先于新区快的随机散列值。
节点始终都将最长的链条视为正确的链条,并持续工作和延长它。如果有两个节点同时广播不同版本的新区块,那么其他节点在接收到该区块的时间上将存在先后差别。当此情形,他们将在率先收到的区块基础上进行工作,但也会保留另外一个链条,以防后者变成最长的链条。该僵局的打破要等到下一个工作量证明被发现,而其中的一条链条被证实为是较长的一条,那么在另一条分支链条上工作的节点将转换阵营,开始在较长的链条上工作。在交易中也会扣除少量比例的数额作为手续费发送给挖矿者,
Other nodes indicate that they accept the block xff0c; the method of acceptance xff0c; xff0c at the end of the block xff0c; the creation of new blocks to extend the chain xff0c; instead, random hash values of the received block will be considered as fast hash values ahead of the new zone.
nodes will always see the longest chain as the correct xff0c; and continue to work and extend it. If two nodes broadcast different versions of the new block xff0c; other nodes will be differentiated in the time they receive the block. When this case xff0c; they will work on the basis of the first received block xff0c; but they will also retain another chain xff0c; the latter will not become the longest chain.
打个比方来说。存在这样一个小镇,这个小镇上没有银行(去中心化),但小镇上的每一个人都有一个匿名账号和一本小镇所有记录的账本(所有的账本可以自动同步),两个人之间进行交易可以直接进行,无需通过第三方机构,这叫去信任。
For example, there is such a town as xff0c; there is no bank in this town (decentralized) xff0c; but everyone in the town has an anonymous account number and a copy of all records of the town (all books can be synchronized automatically) xff0c; transactions between two people can be carried out directly xff0c; there is no need to go through a third-party agency xff0c; this is called trust.
匿名账号只有拥有才能使用该财产,镇上的交易可以通过这些匿名账号进行的。而且因为是匿名的,所以拥有者的个人隐私不会被泄漏。(匿名性)
An anonymous account can only use the property xff0c; transactions in the town can be made through these anonymous accounts. And because it is anonymous xff0c; the owner’s personal privacy will not be compromised. xff08; anonymous xff09;
当镇上的张三想把他的一部分资产转移到李四那里,他会把需要转的这部分资产打包起来并用李四给他的锁把资产全部锁住。这样,除了拥有钥匙的李四之外其他人都打不开。然后,张三登录他的匿名账户在这个包裹上进行签名和标记资产数量,并写明是转移给李四的匿名账户上。完成后就通过广播把这个交易发送给镇上所有人。
When Zhang San wants to transfer part of his assets to Li Xff0c, he will wrap up the part of his assets that needs to be transferred and lock them all in the locks that Li X X ff 0c; so xff0c; no one can open them except Li Qi, who has the key. Then xff0c; 3 log into his anonymous account to sign and mark the number of assets on this package xff0c; and specify that it is transferred to Li Qi's anonymous account.
这样每个人都知道了这笔交易,以后想否认也不可能。(不可撤销)
So everyone knows about the deal; it's impossible to deny it later. #xff08; irrevocably #xff09;
知道消息后其他人得来验证,第一验证这个签名是否有效,有效是指确实由张三的匿名账户发出,第二会从公开账本上验证张三的匿名账户上是否拥有该部分资产。当验证ok后,就将这笔交易记录到公开账本上。而进行这些操作的那个人也会得到一定数量的奖励。
Others have to verify & #xff0c when they know; first, whether the signature is valid & #xff0c; third, if it is actually sent by the anonymous account & #xff0c; and second, whether the anonymous account of three has assets on the open account. When the check is done & #xff0c; then the transaction is recorded in the open account. The person who does these operations will also receive a certain amount of incentive.
经过这些步骤后,张三的这部分资产实际上已经转移到李四那里了。当李四需要的时候就可以用他唯一的钥匙打开这部分资产。
After these steps xff0c; Zhang San's part of the asset has actually been transferred to Li Qi. Li can open it with his only key when he needs it.
因为账本是所有人共同维护的,而且公开透明的,任何人想要知道某个账号上有什么财产上,都可以在这个账本上查到,任何人想在账本上做手脚也不太可能,广大人民群众的眼睛是雪亮的,细微的改动都能被发现。
Because the books are shared by all xff0c; and are open and transparent xff0c; anyone who wants to know what xff0c is on an account number; xff0c can be found on this account; anyone who wants to do something about the books is unlikely to be able to xff0c; the public's eyes are bright xff0c; and minor changes can be discovered.
在比特币系统中的共识机制是工作量证明,但在工作量证明的计算中有很大一部分会被抛弃,造成严重浪费,所以在以太坊中,还引入了另一种共识机制叫做权益证明。它类似于股东机制,拥有股份越多的人越容易获取记账权。此机制不需要大量的计算,而是通过保证金(数字货币、资产等具备价值属性的物品)来证明,收益为抵押资本的利息和交易服务费。提供证明的保证金越多,则获得记账权的概率就越大。
The consensus mechanism in the Bitcoin system is workload proof & #xff0c; but a large part of the calculation of workload certification will be abandoned & #xff0c; it causes serious waste & #xff0c; so another consensus mechanism has been introduced called proof of interest. It is similar to the shareholder mechanism & #xff0c; the easier it is to obtain rights of account for those with more shares. The mechanism does not require a large amount of calculation & #xff0c; it does not need a guarantee #xff08; #xff09; xff0c; interest on proceeds as collateral capital and transaction services; and the greater the probability of obtaining rights of accountkeeping.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论