核心技术1、区块 + 链: core technology1, blocks+/span>: 从技术上来讲,区块是一种记录交易的数据结构,反映了一笔交易的资金流向。系统中已经达成的交易的区块连接在一起形成了一条主链,所有参与计算的节点都记录了主链或主链的一部分。 Technically, blocks are a data structure for recording transactions, reflecting the flow of funds for a transaction. Blocks of transactions entered into in the system are linked together into a chain, and all the nodes involved in the calculation are recorded as part of the main chain or chain. 每个区块由区块头和区块体组成,区块体只负责记录前一段时间内的所有交易信息,主要包括交易数量和交易详情;区块头则封装了当前的版本号、前一区块地址、时间戳(记录该区块产生的时间,精确到秒)、随机数(记录解密该区块相关数学题的答案的值)、当前区块的目标哈希值、Merkle数的根值等信息。从结构来看,区块链的大部分功能都由区块头实现。 Each block consists of blockheads and blocks, which are responsible only for recording all transaction information during the previous period, including mainly the number and details of the transaction; the head of the block covers the current version number, the address of the previous block, the time stamp (recording the time generated by the block, precise to seconds), random numbers (recording the value of the answer to the mathematical question relating to the block), the target of the current block, the root value of the Merkele number. Structure, most of the functions of the block chain are performed by the block head. 核心技术2、哈希函数: core technology 2, Hashi function: 哈希函数可将任意长度的资料经由Hash算法转换为一组固定长度的代码,原理是基于一种密码学上的单向哈希函数,这种函数很容易被验证,但是却很难破解。通常业界使用y=hash(x)的方式进行表示,该哈希函数实现对x进行运算计算出一个哈希值y。 The Hashi function, which converts any length of information through the Hash algorithm into a fixed-length code, is based on a cryptographic one-way Hashi function that is easy to verify but difficult to decipher. Usually the industry uses the y=hash(x), which calculates a Hashi value x. 常使用的哈希算法包括MD5、SHA-1、SHA-256、SHA-384及SHA-512等。以SHA256算法为例,将任何一串数据输入到SHA256将得到一个256位的Hash值(散列值)。其特点:相同的数据输入将得到相同的结果。输入数据只要稍有变化(比如一个1变成了0)则将得到一个完全不同的结果,且结果无法事先预知。正向计算(由数据计算其对应的Hash值)十分容易。逆向计算(破解)极其困难,在当前科技条件下被视作不可能。 The Hashi algorithms that are often used include MD5, SHA-1, SHA-256, SHA-384 and sha-512, , , , 核心技术3、Merkle树: core technology3,Menkletree:/span> Merkle树是一种哈希二叉树,使用它可以快速校验大规模数据的完整性。在区块链网络中,Merkle 树被用来归纳一个区块中的所有交易信息,最终生成这个区块所有交易信息的一个统一的哈希值,区块中任何一笔交易信息的改变都会使得Merkle 树改变。 In the block chain network, the tree Meckle is used to summarize all transactional information in a block, eventually generating a unified Hashi value for all transaction information in a block, and any change in transaction information in a block will result in a change in the tree Merkle. 核心技术4、非对称加密算法: core technology4, asymmetric encryption algorithm: 非对称加密算法是一种密钥的保密方法,需要两个密钥:公钥和私钥。公钥与私钥是一对,如果用公钥对数据进行加密,只有用对应的私钥才能解密,从而获取对应的数据价值;如果用私钥对数据进行签名,那么只有用对应的公钥才能验证签名,验证信息的发出者是私钥持有者。 asymmetric encryption algorithms are a key secret method that requires two keys: public and private keys. Public and private keys are a pair. If public keys are used to encrypt data, only the corresponding private key is used to decipher the corresponding data value; if private keys are used to sign the data, only public keys are used to verify the signature and the information is sent by private key holders. 因为加密和解密使用的是两个不同的密钥,所以这种算法叫做非对称加密算法,而对称加密在加密与解密的过程中使用的是同一把密钥。 , because encryption and declassification use two different keys, this algorithm is called asymmetric encryption algorithms, while encryption is described as using the same key during encryption and decryption. 区块链技术----网络层:实现记账节点的去中心化 block chain technology - network layer: decentralization of account nodes 核心技术5、P2P网络: core technology5,P2P network: P2P网络(对等网络),又称点对点技术,是没有中心服务器、依靠用户群交换信息的互联网体系。与有中心服务器的中央网络系统不同,对等网络的每个用户端既是一个节点,也有服务器的功能。国内的迅雷软件采用的就是P2P技术。P2P网络其具有去中心化与健壮性等特点。 P2P network (reciprocal network), also known as point-to-point technology, is an Internet system that does not have a central server and relies on user groups to exchange information. Unlike a central network system with a central server, each user end of each peer network is both a node and a server function. Mine-related software in the country uses technology such as P2P. P2P network has decentralised and robust features. 区块链技术----共识层:调配记账节点的任务负载 核心技术6、共识机制: core technology 6, consensus mechanism: 共识机制,就是所有记账节点之间如何达成共识,去认定一个记录的有效性,这既是认定的手段,也是防止篡改的手段。目前主要有四大类共识机制:PoW、PoS、DPoS和分布式一致性算法。 Consensus mechanism is how all bookkeeping nodes reach consensus to determine the validity of a record, both as a means of identification and as a means of preventing manipulation. There are four main types of consensus mechanism: PoW, PoS, DPoS and distributed consistency algorithms. PoW(Proofof Work,工作量证明):PoW机制,也就是像比特币的挖矿机制,矿工通过把网络尚未记录的现有交易打包到一个区块,然后不断遍历尝试来寻找一个随机数,使得新区块加上随机数的哈希值满足一定的难度条件。找到满足条件的随机数,就相当于确定了区块链最新的一个区块,也相当于获得了区块链的本轮记账权。矿工把满足挖矿难度条件的区块在网络中广播出去,全网其他节点在验证该区块满足挖矿难度条件,同时区块里的交易数据符合协议规范后,将各自把该区块链接到自己版本的区块链上,从而在全网形成对当前网络状态的共识。 PoW (ProofWork, workload proof: PoW mechanisms, like Bitcoin's mining mechanisms, by wrapping existing transactions that have not yet been recorded in the network into a block and then constantly trying to find a random number that will make it difficult for the new block to add a random number of Hashi values. Finding a random number that meets the conditions is equivalent to identifying the latest block in the block chain and obtaining the right of account in the block chain. PoS(Proofof Stake,权益证明):PoS机制,要求节点提供拥有一定数量的代币证明来获取竞争区块链记账权的一种分布式共识机制。如果单纯依靠代币余额来决定记账者必然使得富有者胜出,导致记账权的中心化,降低共识的公正性,因此不同的PoS机制在权益证明的基础上,采用不同方式来增加记账权的随机性来避免中心化。例如点点币(Peer Coin)PoS机制中,拥有最多链龄长的比特币获得记账权的几率就越大。NXT和Blackcoin则采用一个公式来预测下一记账的节点。拥有多的代币被选为记账节点的概率就会大。未来以太坊也会从目前的PoW机制转换到PoS机制,从目前看到的资料看,以太坊的PoS机制将采用节点下赌注来赌下一个区块,赌中者有额外以太币奖,赌不中者会被扣以太币的方式来达成下一区块的共识。 PoS (ProofMake, certificate of interest): The mechanism PoS, which requires nodes to provide a distributed consensus mechanism with a certain amount of token proof to obtain rights to account in the competitive area. If the balance of a coin is used to determine that the account keeper must win the rich, centralizes the right to account, lowers the fairness of the consensus, so that the different mechanism DPoS(DelegatedProof-Of-Stake,股份授权证明):DPoS很容易理解,类似于现代企业董事会制度。比特股采用的DPoS机制是由持股者投票选出一定数量的见证人,每个见证人按序有两秒的权限时间生成区块,若见证人在给定的时间片不能生成区块,区块生成权限交给下一个时间片对应的见证人。持股人可以随时通过投票更换这些见证人。DPoS的这种设计使得区块的生成更为快速,也更加节能。 DPoS(DelegatedProof-of-Stake, share-authorization certificate: DPoS, easy to understand, similar to the modern enterprise board system. The mechanism adopted by the Bits Unit DPpan>DPoS is for shareholders to vote to select a certain number of witnesses, each witness to produce blocks with two seconds of authority in order to produce them, and if the witness does not generate a given block in a given piece of time, the block to produce the block is given to the next witness. The holder can replace these witnesses at any time by voting. 分布式一致性算法:分布式一致性算法是基于传统的分布式一致性技术。其中有分为解决拜占庭将军问题的拜占庭容错算法,如PBFT(拜占庭容错算法)。另外解决非拜占庭问题的分布式一致性算法(Pasox、Raft),详细算法本文不做说明。该类算法目前是联盟链和私有链场景中常用的共识机制。 Distributed Consistency algorithms: Distributed Consistency algorithms are based on traditional distributed consistency techniques. Among these are Byzantine miscalculation algorithms that resolve the issue of Byzantine generals, such as PBFT (Bizant Absorption algorithms). The Distributed Consistency algorithms that resolve the non-Bizant issue (Pasox, RaftRaft) which are not described in the detailed algorithms. 综合来看, POW适合应用于公链,如果搭建私链,因为不存在验证节点的信任问题,可以采用POS比较合适;而联盟链由于存在不可信局部节点,采用DPOS比较合适。 On balance, POW is suitable for use in public chains, and if there is no question of trust in certification nodes, POS is more appropriate; and the Alliance nodes, because of their untrustworthy local nodes, are more appropriate to use DPOS. 区块链技术----激励层:制定记账节点的'薪酬体系' block chain technology - incentive layer: ' remuneration system for bookkeeping nodes 核心技术7、发行机制和激励机制: Core technology 7, distribution mechanisms and incentives: 以比特币为例。比特币最开始由系统奖励给那些创建新区块的矿工,该奖励大约每四年减半。刚开始每记录一个新区块,奖励矿工50个比特币,该奖励大约每四年减半。依次类推,到公元2140年左右,新创建区块就没有系统所给予的奖励了。届时比特币全量约为2100万个,这就是比特币的总量,所以不会无限增加下去。 By way of example, Bitcoin is the first system to reward miners who create new blocks, which is roughly halved every four years. At the start of each new block, it rewards miners 50 2140 /span > > /span > >, which is the sum of bitcoins, so it would not increase indefinitely. > > 另外一个激励的来源则是交易费。新创建区块没有系统的奖励时,矿工的收益会由系统奖励变为收取交易手续费。例如,你在转账时可以指定其中1%作为手续费支付给记录区块的矿工。如果某笔交易的输出值小于输入值,那么差额就是交易费,该交易费将被增加到该区块的激励中。只要既定数量的电子货币已经进入流通,那么激励机制就可以逐渐转换为完全依靠交易费,那么就不必再发行新的货币。 Another source of incentive is the transaction fee. When there is no systematic incentive for the newly created block, the miners' earnings change from a system incentive to a transaction fee. For example, when you transfer, you can assign 1% of this fee to the miners who record the block. If the output of a transaction is less than the input value, the difference is the transaction fee, which will be increased to the incentive of the block. As long as an established amount of electronic currency is in circulation, the incentive mechanism can gradually be converted to completely dependent on the transaction fee, there will be no need to issue a new currency. /span> 区块链技术----合约层:赋予账本可编程的特性 block chain technology - contract layer: assigns programmable properties to the account book 核心技术8、智能合约: core technology 8>span>, smart contracts: 智能合约是一组情景应对型的程序化规则和逻辑,是通过部署在区块链上的去中心化、可信共享的脚本代码实现的。通常情况下,智能合约经各方签署后,以程序代码的形式附着在区块链数据上,经P2P网络传播和节点验证后记入区块链的特定区块中。智能合约封装了预定义的若干状态及转换规则、触发合约执行的情景、特定情景下的应对行动等。区块链可实时监控智能合约的状态,并通过核查外部数据源、确认满足特定触发条件后激活并执行合约。 Smart contracts are a set of scenario-responsive procedural rules and logic that are achieved through decentralised and crediblely shared script codes deployed on block chains. Usually, smart contracts are signed by the parties, attached to block chain data in the form of program codes, and placed in a specific block chain through P2P network dissemination and nodes verification. Smart contracts encapsulate predefined status and conversion rules, scenarios triggering contract execution, response actions under a given scenario. Block chains monitor the status of smart contracts in real time and activate and implement contracts by verifying external data sources, confirming that specific trigger conditions are met. |
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论