Azure Blockchain Service to start from the basics Block chain

More Microsoft Azure hands-on combat video, please pay attention to public numbers:

640?wx_fmt=gif


This article is a prelude, was to introduce Azure Blockchain Service on Azure, found that what is needed from the block chain start with. . .


What is the block chain? We start with bitcoins 2008 Nian 11 months, Nakamoto Bitcoin White Paper proposes Bitcoin system from 09 to the present, major security incidents did not occur.

1. The underlying technology is bitcoin block chain;

2. Bitcoin is a peer to peer electronic cash system (pay areas);

3. The system is constructed based block chain technique;

4. The block chain technology systems, electronic transactions so that the need for an intermediate point party authentication;

5. have experimental nature, running 10 years, the major problem does not occur.


Simple to understand block chain, start with a story:


640?wx_fmt=png


Joe Smith transferred to John Doe 1000 dollars of the story:

1. Joe Smith screaming, I turned to John Doe 1000 dollars;

2. The nearby villagers heard the sound of cries Joe Smith, Joe Smith then confirmed that there is sufficient balance;

3. After checking the villagers, the villagers are each on their own record books :

    Zhang transferred to John Doe 1000 , Zhang 3000-1000 = 2000 ; John Doe 200 + 1000 = 1200 ;

4. 张三附近的村民把转账告诉邻村,邻村又告诉邻村,全球人都知道了并记录到了自家账本上。

几个问题?

李四的问题:账本会不会被篡改?

村民A的问题,为什么要费力气给张三记录这笔交易呢?

全体村民的问题,以谁记的为准?

640?wx_fmt=png




账本会不会被篡改?


通俗理解,把一段时间内的交易放到一个区块中,通过对区块进行哈希运算(哈希运算理解为Hash算法可以将一个数据转换为一个标志,这个标志和源数据的每一个字节都有十分紧密的关系。Hash算法还具有一个特点,就是很难找到逆向规律。原始数据中发生任何改变,哈希运算的结果都将发生变更),产生该区块的哈希值,该区块发生任何变化,区块的哈希值就会有巨大改变,讲哈希算法的结果写入到下一个区块中,将前后两个区块串起来。

若上一页账单(区块)数据被修改,那它的数据指纹(哈希值)会发生改变,就无法与下一页账单中记录的哈希值对应上。所有玩家就能识别出这是个被篡改的无效链,并将其抛弃。

所以,通过区块+链的方式,账不可篡改。


作为普村A,为什么要费力气记账呢?


因为有好处,就是所谓的矿工激励,第一个获得记账权的人,会获得奖励。



谁记得为准?


工作量证明(PoW),谁最先计算出某个题目的答案,就以谁的账本为准,其他人复制该账本。某个题目的答案,其实就是区块头中的随机数。



区块链的几个特点:

1.去中心化(Decentralized去中心化系统,其没有中介机构,所有节点的权利和义务都相等,任一节点停止工作都会不影响系统整体的运作;

2.去信任(Trustless系统中所有节点之间无需信任也可以进行交易,因为数据库和整个系统的运作是公开透明的,在系统的规则和时间范围内,节点之间无法欺骗彼此

3.集体维护(Collectively Maintain系统是由其中所有具有维护功能的节点共同维护的,系统中所有人共同参与维护工作;

4.可靠数据库(Reliable Database系统中每一个节点都拥有最新的完整数据库拷贝,修改单个节点的数据库是无效的,因为系统会自动比较,认为最多次出现的相同数据记录为真。


区块链不是新技术,是一组技术的组合:

640?wx_fmt=png


核心技术-分布式账本

通过P2P的方式,将正确的账本发送给其他人。

640?wx_fmt=png


核心技术-密码学

主要在下一个区块中,存储上一个区块的哈希值。

640?wx_fmt=png

核心技术-区块构成

640?wx_fmt=png

核心技术-分布式共识



640?wx_fmt=png


核心技术-智能合约

640?wx_fmt=png


区块链的技术演进

普遍认为,区块链已经经历了三个阶段:

  1. 加密货币阶段:就是指以比特币系统为代表的加密货币阶段;

  2. 数字资产,加密金融:在比特币发展成全民挖矿的情况下,于2013年,以太坊创始人Vitalik Buterin发布以太坊初版白皮书。以太坊引进了智能合约的概念,从真正意义上,可以满足商业化应用发布的需求。与第一阶段,只服务于比特币等加密货币不同,区块链2.0阶段,依赖以太坊,可以用来编程、分散、担保和交易任何事物,实现了“区块链+”应用的蔓延、扩展。大部分的区块链应用,都是基于以太坊而成立,如以太猫,如元链星系等区块链游戏,还有各种加密狗等等。

  3. With the further development block chain technology, its "decentralized" function and "Data security" function gradually be taken seriously in other areas. People began to realize that the application block chain may not only confined to the financial sector, it can be extended to any area in need to go. Thus, in addition to the financial sector, block chain technology has gradually been applied to other areas of notarization, arbitration, audit, domain name, logistics, medical, mail, authentication, voting in the past, to expand the scope of application to society as a whole.

640?wx_fmt=png


Three stages, the first two or mainly in the open block-based chain, has become a public chain, the third phase starts, the start there is a private chain, chain alliances and other forms.



Block chain classification:


640?wx_fmt=png


Public chain means that anyone can read, anyone can send the transaction and the transaction can obtain a valid confirmation, anyone can participate block chain consensus process.

Public chain has taken to take workload proof mechanism (POW), proof of interest mechanism (POS), shares proof of authorization mechanism (DPOS), etc., and the economic incentives and combines the encrypted digital verification, and to establish a principle that everyone from economic incentives proportional to the amount of work available. These blocks chains are typically considered to be completely decentralized.

Private chain refers to its written permission only in the hands of an organization block chain. Read permission or the outside world, or is carried out to limit any extent. Related applications include database management, auditing, and even a company, although in some cases it can hope to have a public auditability, but in many circumstances, public readability is not necessary.


Union chain and the degree of openness of the center to be somewhat limited. Its participants are screened out or directly specified in advance, read permissions to the database may be public, it may be limited as write access to the same system participants.


Typical applications block chain: the chain ring token ring +

640?wx_fmt=png



Guess you like

Origin blog.51cto.com/10117438/2460429