1
区块链独特的数据结构
The unique data structure of blockchain
区块链这个名字自身就比较独特,由区块和链构成。在形式上,类似于我们的微信朋友圈,每一条朋友圈都是一个区块,串起来的整个朋友圈,就像一条链,而左边的时间标志就像区块链里的时间戳,什么时候发的朋友圈会有记录,不过时间戳会精确到几分几秒。
The name of the blockchain itself is relatively unique, consisting of blocks and chains. Basically, it's similar to our WeChat Friends Moments, each moment is a block, which is linked together as a whole Moments. It's like a chain; the time mark on the left is like the timestamp in the blockchain, there will be records in the Moments posted, but the timestamp will be accurate in minutes and seconds.
需要注意的是,朋友圈按时间顺序记录和存储信息的结构仅仅是与区块链的结构相似,并不是说朋友圈就等同于区块链了。不同的是,朋友圈发的内容比较纷杂,而区块链里的每一个区块内容相对比较固定。
It should be noted that the structure of Moments to record and store information in chronological order is only similar to the structure of blockchain, not that Moments is equivalent to the blockchain. The difference is that the content sent in Moments is quite complicated, while the content of each block in the blockchain is relatively similar.
一般都是一些数据记录:区块头里面上一区块的哈希值、该区块的最终随机数、区块的体积大小、交易的具体信息,如交易双方及其数字签名、交易额等等。
Generally, there are some data records: the hash value of the previous block in the block header, the final random number of the block, the block size, and the specific information of the transaction, such as the two parties information, their digital signatures, and transaction amount, etc. .
每个区块头包含的哈希值就像是上一个区块所有数据的“数字指纹”,因此每个区块之间就有了一种环环相扣的“关系”,这层关系形成了一个链条,让旧的区块链数据一旦任何一个字符被改动,后面所有的哈希值都会发生变动。这样的一个结构和内容构成了整个区块链。
The hash value contained in each block header is like the "digital fingerprint" of all data in the previous block, so there is an interlocking "relationship" between each block, and this relation is formed to a chain so that once any character of the old blockchain data is changed, all subsequent hash values will change. Its structure and content constitute the entire blockchain.
2
分布式存储
Distributed storage
在了解了区块链的大概内容和形式之后,我们会想,既然只是这样一种简单的方式记录东西而已,有什么新奇的呢?其实区块链最吸引人的是其分布式存储的机制,即去中心化的思想。
After understanding the general concept and form of blockchain, we will have to think that since it is just such a simple way to record things, why would it be impressive? In fact, the most astonishing thing about blockchain is its distributed storage mechanism, that is, the idea of decentralization.
区块链中每一个区块上的信息记录,都是由参与记账的每一个电脑,即节点竞争记录的,并背后并没有任何企业、公司来管理。
The information recording on each block in the blockchain are recorded by each computer engaging in bookkeeping, that is, the node competition records, and there is no company or company behind it to take control.
为了防止某些恶意节点来搞破坏,对于采用 PoW 共识机制的区块链中的新数据,需要得到大部分节点的一致确认和同意,至少也需要有 51%的节点同意,因此某个节点想篡改数据是很难的。
In order to prevent some malicious nodes from sabotaging, the new data in the blockchain adopting the PoW consensus mechanism requires the unanimous confirmation and consent of most nodes, and at least 51% of the nodes need to agree, so a single node wants to tamper with the data is not easy.
3
密码学
Cryptography
作为一个可以传输价值的区块链,如果安全仅靠节点数取胜,当然令人难以置信,因此区块链运用了一个杀手锏——密码学。密码学中的非对称加密技术是保障安全的重要部分。
As a blockchain that can transfer value, if the security only relies on the number of nodes, it is definitely unbelievable, so the blockchain applys a "killer"-cryptography. Asymmetric encryption technology in cryptography is an important part to ensure security.
对称加密就相当于开门和锁门用了同一把钥匙,非对称加密则相当于开门锁门用了两把不同的钥匙,一个叫公钥,一个叫私钥,公钥锁门,只有私钥可以开,而用私钥锁门,也只有公钥可以开门。
Symmetric encryption is equivalent to using the same key to open and lock the door. Asymmetric encryption is equivalent to using a key to lock door but try to use another key to open the door. One is called the public key and the other is the private key. The public key locks the door, only the private key can open it. If it's locked by private key, then it can be opened by public key only.
这两种密钥一般都存储在钱包里,私钥一旦丢失,资产也荡然无存。在区块链中,公钥和私钥的形成都经过哈希算法和椭圆曲线算法等多重转化而成的,字符都比较长和复杂,因此比较安全。
These two keys are generally stored in a wallet. Once the private key is lost, the assets are also gone. In blockchain, the formation of public and private keys are multiple transformations through hash algorithms and elliptic curve algorithms. The characters are relatively long and complex, hence it's safer.
4
共识机制
Consensus mechanism
为了保证节点愿意主动去记账,区块链形成了一个重要的共识机制,这种共识机制也被称为区块链的灵魂。PoW (算法机制)是最初的一种共识机制,所有参与的节点通过比拼计算能力来竞争记账权。
In order to ensure that nodes are proactive to keep accounts, blockchain has formed a crucial consensus mechanism. This consensus mechanism is also called the soul of the blockchain. PoW (Algorithm Mechanism) is an original consensus mechanism. All nodes compete for the privilege to bookkeeping by competing for computing power.
这是相对比较公平和去中心化的一种方式,但是所有人都参与,却只能选一个节点,会浪费大量资源和时间成本。因此,后面又出现了 PoS(权益证明机制) 共识机制,持有数字货币时间越长,持有的资产越多,就越有可能获得记账权和奖励。
This is a relatively fair and decentralized approch; however everyone is involved, but only one node can be selected, which will waste a lot of resources and time. Therefore, the PoS (Proof of Stake) consensus mechanism came out later. The longer the digital currency is held, the more assets are held, the more likely it is to obtain bookkeeping rights and rewards.
节省了时间,但有人说这违背了去中心化的初衷,再后来出现了 DPoS(委托权益证明机制),节点选出代表节点来代理验证和记账,更加简单高效,但也有人说这也在一定程度上牺牲了一些去中心化。
It saves time, but some people say that this is contrary to the original intention of decentralization, and then DPoS (Delegated Proof-of-Stake Mechanism) came out. It is simpler and more efficient for nodes to select represent node to carry out delegated verification and bookkeeping. However, some people also consider that it sacrifices decentralization more or less.
以上就是区块链的核心技术,当然区块链还运用到了别的很多学科和技术,如数学、经济学、计算机学科等等,它们共同构建了区块链这项神奇的技术。
The content above is all about the major technologies of blockchain. Indeed, blockchain also leverage the advancements from many other fields and technologies, such as mathematics, economics, computer science, etc., and they jointly build the magic technology of blockchain.
|
|