什么是区块链核心技术

资讯 2024-06-27 阅读:97 评论:0
展开全文...

核心技术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.

常使用的哈希算法包括MD5SHA-1SHA-256SHA-384SHA-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, , , , , , , as an example, enter any data into

核心技术3Merkle树:

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

核心技术5P2P网络:

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.

区块链技术----共识层:调配记账节点的任务负载

block chain technology -consensus layer: assignment load for booking nodes

核心技术6、共识机制:

core technology 6, consensus mechanism:

共识机制,就是所有记账节点之间如何达成共识,去认定一个记录的有效性,这既是认定的手段,也是防止篡改的手段。目前主要有四大类共识机制:PoWPoSDPoS和分布式一致性算法。

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.

PoWProofof 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.

PoSProofof Stake,权益证明):PoS机制,要求节点提供拥有一定数量的代币证明来获取竞争区块链记账权的一种分布式共识机制。如果单纯依靠代币余额来决定记账者必然使得富有者胜出,导致记账权的中心化,降低共识的公正性,因此不同的PoS机制在权益证明的基础上,采用不同方式来增加记账权的随机性来避免中心化。例如点点币(Peer CoinPoS机制中,拥有最多链龄长的比特币获得记账权的几率就越大。NXTBlackcoin则采用一个公式来预测下一记账的节点。拥有多的代币被选为记账节点的概率就会大。未来以太坊也会从目前的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

DPoSDelegatedProof-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. DPS This design makes the block more rapid and efficient.

分布式一致性算法:分布式一致性算法是基于传统的分布式一致性技术。其中有分为解决拜占庭将军问题的拜占庭容错算法,如PBFT(拜占庭容错算法)。另外解决非拜占庭问题的分布式一致性算法(PasoxRaft),详细算法本文不做说明。该类算法目前是联盟链和私有链场景中常用的共识机制。

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 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

发表评论
热门文章
  • 以太坊区块链浏览器的搭建

    以太坊区块链浏览器的搭建
    环境;Ubuntu 首先需要下载git 参考链接:?http://www.360bchain.com/article/156.html??Environment; Ubuntu first needs to download git reference link: ˂a rel="noformlow" href="http://www.360bchai.com/article/156.html"? http://www.360bchai.com/article/156.htm...
  • 百度元宇宙希壤app官方下载

    百度元宇宙希壤app官方下载
    希壤元宇宙是一款非常好玩的休闲手游,这款游戏采用了元宇宙的游戏概念,超级自由的游戏玩法,在这里没有什么标准限定,你可以自由的在这里进行着一切你想做的事情,游戏比较的休闲和放松,没有什么操作难度,感兴趣的小伙伴们可以来007游戏网下载这款非常有趣的希壤元宇宙吧!˂a href=http://m.yx007.com/key/xxsy" target="_blank" , a game that uses the concept of meta-cosm, super-free p...
  • 【CoinCentral 合作內容】加密貨幣 Decred 正式推出 2018 發展路段線圖

    【CoinCentral 合作內容】加密貨幣 Decred 正式推出 2018 發展路段線圖
    早些時候,加密貨幣Decred發表了一篇博客文章,概述了他們2018年的正式發展路線圖。Earlier, encrypt currency Decred published a blog article outlining their official road map for development in 2018.在這個路線圖中,團隊在為他們制定營銷宣傳之前,明確地表明他們於建立和發布可交付物品的成果,同時將他們的營銷集中在項目的核心組成部分。Decred團隊正在研究一些...
  • 跨接在两个网络间的语音记录仪设计

    跨接在两个网络间的语音记录仪设计
      摘  要: 设计了语音记录仪。该语音记录仪桥接在通信设备之间,同时提供3种桥接接口:以太网接口,支持在IP通信方式下的各通话组的直通及录音功能;二线接口,支持模拟二线方式下的直通及录音功能;音频接口,支持模拟音频方式下的直通及录音功能。同时话音记录仪提供FTP服务器,可以通过局域网对语音记录仪保存的语音文件进行下载和管理。此外,该设备支持语音回放功能。 extracts & nbsp; to : The voice record...
  • 元宇宙概念股有哪些 元宇宙概念股一览表

    元宇宙概念股有哪些 元宇宙概念股一览表
    元宇宙概念股排行精选 元宇宙概念股一览表(2022/11/08),下文就随小蔡来简单的了解一下吧。The contours of the meta-cosmology unit are in the list of the meta-cosmological concept units (2022/11/08), so let's get to the bottom of this with Little Choi. 元宇宙概念股龙头有:The contou...
标签列表