P5 、1-会说话的PPT,从开发者角度快速理解区块链
P5, 1-talking PPT, fast-track understanding of block chains from the developer's perspective
一、什么是区块链?
What's a block chain?
区块链(Block Chain):
a、是一种 分布式资料库
a, a distributed database
攻击成本高,超过节点数51%才可以修改数据,即少数服从多数原则
High cost of attack, 51 per cent more than nodes to modify data, i.e. a minority is subject to the majority principle
b、最初是广泛使用在?比特币(Bitcoin)
b, originally widely used? Bitcoin
c、维护一份连续不断?的交易记录档,通过计算算出自己的余额
d、每一笔资料被称为一个 区块(Block)
e、每一个区块可以包含 一笔以上的交易
demo网址:https://anders.com/blockchain/block.html
Domo web site: https://anders.com/blockchain/block.html
Block:1(区块号)
Block 1: (block number)
Nonce:满足计算难度的值
Nonce: The value that meets the difficulty of calculating
Data:
Hash:包括 Block、Nonce、Data 的数据hash值
Hash: including Block, Nonce, Data hash values
挖矿:就是计算出Nonce值的过程
Mining: the process of calculating the Nonce value
难度4表示hash前面为0000(4个0)
Difficulty 4 means hash up front is 0.000 (4 zeros)
f、每个区块都会与另一个区块 产生连接(Linking)
g、每个区块都会包含 上个区块的hash值
demo网址:https://anders.com/blockchain/hash.html
Domo web site: https://anders.com/blockchain/hash.html
h、所有被连接在一起的区块被称为 链(Chain)
h, all the blocks connected are called Chain
i、就是 由多个区块组成的链
二、区块链如何运作?
区块链
block chain
a、产生区块的过程会经过 复杂的密码学运算(Cryptography)
b、复杂的密码学运算可杜绝 记录篡改与修订
c、每个区块在成功产生之后 是无法修改的
c, each block cannot be modified after it has been successfully created
d、产生区块的过程又称为 挖矿(Mining)
e、负责产生区块的人又称为 矿工(Miner)
f、负责产生区块的机器又称为 挖矿机
f, the machine responsible for the creation of blocks, also known as the miner
g、每一笔资料都可以通过连接找出 所有可靠的历史资料(溯源性)
h、由于是分布式数据库,所以 具有去(中心化)特性
h, since it's a distributed database, has a de- (centralized) feature
i、(去中心化)意味着 资料会分布到多个节点
j、所有的节点会共同维护 整个分布式数据库
k、共同维护整份资料库意味着 没人可以说自己的区块才是合法有效的区块
k, co-maintaining the entire database means that no one can say that their blocks are legally valid l、共同维护整份资料库意味着?多数人验证后过的区块才是合法有效的区块 l, co-maintaining the entire database means that the blocks that most people have verified are legally valid . m、共同维护整份资料库意味着 超过50%的节点验证过的区块才是合法有效的区块 n、每个节点 必须存储所有区块(但有新的设计可让节点仅存储部分区块) o、每一个节点都可以 协助验证区块的有效性
p、任何一笔资料被篡改 都将破坏区块的完整性
q、任何一笔资料被篡改的几率 微乎其微 r、由于是分布式数据库,所以 具有去(中心化)特性 r, since it's a distributed database, has a de- (centralized) feature s、的写作包含两种物件类型 (交易)与(区块) s, writing contains two types of objects (transactions) and (blocks) t、解说情景 数字货币 t, contemplation digital currency u、交易物件就是 转账过程的完整内容 v、(区块物件)包含 一系列交易的集合 v, (block objects) contains a collection of transactions demo网址:https://anders.com/blockchain/blockchain.html Domo web site: https://anders.com/blockchain/blockchain.html 每个区块修改之后,往后所有的区块都需要重新挖矿! After each block is modified, all blocks need to be re-mining! 分布式区块链demo网址:https://anders.com/blockchain/distributed.html Distributed block chain demo web site: https://anders.com/blockchain/distributed.html
P6 、2-挖矿算法 demo网站:www.blockchaindemo.io Demo website: www.blockchaindemo.io 终端环境为:ubuntu 16.04 ,已经安装好了npm End environment: ubuntu 16.04, installed npm (PS:如果还没安装,执行: apt-get install npm 安装就行! (PS: If not installed, execute: apt-get install npm! 安装完,查看版本: npm -v Installed, viewing version: npm-v 版本为:3.5.2? ) Version 3.5.2?) 打开终端,输入 Open terminal, enter. 安装有点慢, It's a little slow. 安装出错了! There's been a mistake! node_modules安装问题,执行以下: Installation of node_modules, as follows: 终端输入: Terminal input: 区块(block)长什么样子? What does Block look like? 在 blockchain -> 后面输入 blockchain 或者 bc 查看创世区块结构。 Enter the blockchain or bc to view the original block structure at the bottom of the blockchain->. 挖矿: Mining: ?Hash值是怎么计算的? ? How's the Hash value calculated? Hash值是一个? 十六进制? 固定长度为 64位 的唯一的标识。 Hash is the only identifier for a hexadecimal length of 64 bits. hash值是由 index,previous block hash,timestamp,block date 和 nonce 作为输入数据计算而得。 The hash value is calculated as input data by index, precious black hash, mimestamp, black date and nonce. 你是否注意到哈希中的四个前导0? Did you notice the four leading zeros in Hashi? 四个前导0是有效散列的最低要求。所需的前导0 的数量称为 难度。 Four lead zeros are the minimum requirements for a valid hash. The number of lead zeros required is called difficulty. 下面的方法验证hash难度是否有效。 The following method is used to verify the validity of the hash difficulty. 这就是我们所熟知的工作量证明系统-Proof-of-work system。 This is what we know about the workload certification system - Proof-of-work system.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论