黑基网 首页 IT教程 电脑技术 查看内容

人人都懂区块链-包教包会版

2017-12-16 17:16| 投稿: xiaotiger |原作者: 都是高科技|来自: 互联网

摘要: 最近比特币真是太火了, 成交价格也已经逼近了2w美金, 你有没有赚到一笔呢, 在之前的系列文章中我们详细的讲解了比特币的方方面面, 还没看过的请自己去该头条号看一下吧, 今天文章中我们来聊一聊比特币的核心区块链 ! ...

最近比特币真是太火了, 成交价格也已经逼近了2w美金, 你有没有赚到一笔呢, 在之前的系列文章中我们详细的讲解了比特币的方方面面, 还没看过的请自己去该头条号看一下吧, 今天文章中我们来聊一聊比特币的核心区块链 !

写在前面

区块链其实是一种复合的底层技术, 她涵盖了计算机中的密码学, 分布式系统, 加密解密等相关内容. 所以读者如果不是计算机从业者是很难理解其中的原理的, 本文尽可能的规避一些专业性的词汇, 用一些通俗的语言和例子去让大家理解区块链这项技术.

去中心化

"生活在被监视的世界中"

在说区块链之前我们先来聊聊"去中心化", 和为什么要"去中心化". 在<走进比特币>的系列文章中我们有提到过这个概念, 下面我们再来简单的说说这个话题.

ok, 那么什么是中心化呢? 想想你日常生活中的转账吧, 假如你想给你的朋友马云转账100元的流程是怎样的呢?

  1. 你告诉银行系统: 我要给马云的账号转账100元

  2. 银行收到了你的转账请求: 从你的账户里面减掉100元, 并且给马云的账户增加100元

  3. 马云的手机收到银行的短信提醒: 收到我的好友(就是你) 的汇款100元

以上的例子很简单说明了什么是中心化, 没错 银行系统 就是中心化! 那我们看看有中心化的交易系统有什么特点(弊端)?

  • 任何交易都要通过它, 如果没了它就无法进行交易

  • 存在中间环节, 比如: 安全性, 手续费等

  • 交易可以被监管, 监管方(银行) 知道你的每一笔交易, 包括你刚刚给马云的100元汇款

好吧, 以上这几点你会不会期待一个无中心化的自由的交易系统呢? 如果你期待那么太好了, 他来了!

匿名账单

"想法总是美好的, 现实是残酷的. "

我们刚刚列举了中心化交易系统的"七宗罪", 却没有提到他的好处, 比如账户和账单的问题. 试想一下: 如果没有银行谁知道你的账户里面存了多少钱? 谁知道你的每一笔收入和支出呢?

这个时候伟大的中本聪老先生出现了并解决了这个难题, 他提出把所有交易记录公开, 交易系统中的每个人都参与账务的记录工作! 这样的话, 这些数据是分散到网络中的, 只要这个网络存在, 交易数据就不会丢失. 比如上面你给马云转账的100元就是一条交易数据.

说到这可能你会有点顾虑: 如果把账务的信息都公开化, 那样是不是每个人都知道我有多少钱了? 每个人都知道别人给了你多少小费了? 呵呵, 这么聪明的中本聪怎么会想不到这些呢? 来来来, 举个栗子. 还是你给马云转100块钱的事儿... action !

在开始之前我们要做一些准备才行:

咱们现在已经在比特币的世界了, 我们先把这个世界叫S吧, 所以就要遵守S中的游戏规则: 要首先你要隐身一下, S会给你一个在这个世界的唯一标识, 像是身份证一样, 但是这个身份证可没有你的什么真实信息. 你就把它想成一串数字吧: 111222333. 除了这个身份证世界S还会给你一个大礼包: 一个印章和一个扫描枪. 这个印章也是你身份的象征, 你以后每一笔交易请求都有用它盖一下, 不盖就无效! 扫描枪就是可以读取别人印章的工具, 他可以识别出印章中包含的身份信息. 好了, 我们现在就能给马云转账了. 当然了, 马云必须这在要S世界中哦, 不然就玩不通了, 哈哈. 转账的流程如下:

1. 先来做一个汇款单, 填上你的身份标识(111222333) 和 马云的身份标识(888888888) 金额 和 汇款时间, 在最后印上你的印章! 看见印章上面的数字了吗? 就是需要扫描枪才能识别的东东. ok 发出~

汇款单

2. 马云收到了这个汇单, 首先他先验验货: 拿扫描枪扫一下那个印章, 看看里面的信息是不是和上面的汇款人一致. 如果是111222333, 就往下进行收款了... 其实后面要进行账本同步了, 由于过程稍微复杂, 我们先不谈. 至少到目前为止, 你和马云的交易中还没有涉及到第三方机构(银行), 是完全的按照指定的规则, 你和他自己完成的(汇款和收款)

区块链

"世上本没有区块链, 区块多了变成了链"

区块其实就是区块链中的一个单元, 那这个区块里面到底保存了啥呢? 我们先看看它里面的样子:

一个区块内部

看到了吗? 原来一个区块中存储的都是是交易账单, 上面你跟马云的汇款单也在里面哦~ 区块的编号就是区块和区块间连接的链条, 就像这样: 999 -> 1000 -> 1001 -> 1002 ..... 懂了吧? 最后一个神秘数字, 他是干嘛的呢? 正因为有它 "挖矿" 才变得有意义!

好了, 到此有关区块链的基本内容就说到这里吧, 后面再给大家说说关于"挖矿"的东西. 敬请期待吧!

, groupId: 6499675080405025294, itemId: 6499675080405025294, type: 1, subInfo: { isOriginal: false, source: 都是高科技, time: 2017-12-15 17:02:14 }, tagInfo: { tags: [{"name":"数字货币"},{"name":"比特币"},{"name":"中本聪"},{"name":"马云"},{"name":"科技"}], groupId: 6499675080405025294, itemId: 6499675080405025294, repin: 0, }, has_extern_link: 0 }, commentInfo: { groupId: 6499675080405025294, itemId: 6499675080405025294, comments_count: 27, ban_comment: 0 }, mediaInfo: { uid: 50824912525, name: 都是高科技, avatar: //p3.pstatp.com/large/4aea00060c4afff45a29, openUrl: /c/user/50824912525/, follow: false }, pgcInfo: {"media_info":{"open_url":"/c/user/50824912525/","avatar_url":"https://p3.pstatp.com/large/4aea00060c4afff45a29","media_id":1586135118808078,"name":"都是高科技","user_verified":false},"articles":[{"item_id":"6499675080405025294","url":"/item/6499675080405025294","title":"人人都懂区块链-包教包会版"},{"item_id":"6498940054474326542","url":"/item/6498940054474326542","title":"雾霾的艺术,你知道吗?"},{"item_id":"6498112288149471758","url":"/item/6498112288149471758","title":"走近比特币第五集-写在最后(完)"},{"item_id":"6497846954129621517","url":"/item/6497846954129621517","title":"走近比特币第四集-矿工"}]}, feedInfo: { url: /api/pc/feed/, category: __all__, initList: [{"comments_count":17,"media_avatar_url":"//p3.pstatp.com/large/437c0002f2dae4ecc93d","is_feed_ad":false,"is_diversion_page":false,"title":"暴风,迅雷,到底谁在真正的做区块链?谁又能做成?","single_mode":true,"gallary_image_count":3,"middle_mode":true,"has_video":false,"video_duration_str":null,"source_url":"/group/6499749821589488142/","source":"深入浅出区块链","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":0,"image_url":"//p3.pstatp.com/list/190x124/4e7000019694ec9c5114","group_id":"6499749821589488142","is_related":true,"media_url":"/c/user/75092583319/"},{"comments_count":51,"is_related":true,"is_feed_ad":false,"is_diversion_page":false,"title":"错过80年代下海,90年代炒股,00年代炒房,10年代比特币,接下来最可能错过的投资热点是什么?","single_mode":true,"gallary_image_count":1,"middle_mode":false,"has_video":false,"video_duration_str":null,"source_url":"/group/6498265831443529997/","source":"悟空问答","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":0,"image_url":"//p3.pstatp.com/list/190x124/4a33000647e59f3838c3","group_id":"6498265831443529997"},{"comments_count":74,"media_avatar_url":"//p1.pstatp.com/large/216b0002ea9d49c959b3","is_feed_ad":false,"is_diversion_page":false,"title":"厉害了!看一个韩国高中生如何搅动比特币市场","single_mode":true,"gallary_image_count":11,"middle_mode":false,"has_video":false,"video_duration_str":null,"source_url":"/group/6498660983014162957/","source":"大熊观韩国","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":0,"image_url":"//p1.pstatp.com/list/190x124/4e5c00034f1c7b331154","group_id":"6498660983014162957","is_related":true,"media_url":"/c/user/60346012067/"},{"comments_count":49,"media_avatar_url":"//p3.pstatp.com/large/46d900046bb6b3427933","is_feed_ad":false,"is_diversion_page":false,"title":"又分叉?近期大热的ETF(以太雾)该如何获得?","single_mode":true,"gallary_image_count":3,"middle_mode":false,"has_video":false,"video_duration_str":null,"source_url":"/group/6499005963444421133/","source":"白话币圈","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":0,"image_url":"//p3.pstatp.com/list/190x124/4e630001ee93e37ad92e","group_id":"6499005963444421133","is_related":true,"media_url":"/c/user/71370032932/"},{"comments_count":16,"media_avatar_url":"//p9.pstatp.com/large/46da0000d295a2db6399","is_feed_ad":false,"is_diversion_page":false,"title":"人生赢家!女子5年前买400个比特币,现在单价疯涨1900倍","single_mode":true,"gallary_image_count":3,"middle_mode":false,"has_video":false,"video_duration_str":null,"source_url":"/group/6498856511773606413/","source":"环球探索家","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":0,"image_url":"//p1.pstatp.com/list/190x124/4e5c000487943be3ee35","group_id":"6498856511773606413","is_related":true,"media_url":"/c/user/75761692356/"},{"comments_count":640,"media_avatar_url":"//p1.pstatp.com/large/18a10006ddcfc79533aa","is_feed_ad":false,"is_diversion_page":false,"title":"2014年曾有个贴吧老哥48万入了100个比特币……","single_mode":true,"gallary_image_count":29,"middle_mode":false,"has_video":false,"video_duration_str":null,"source_url":"/group/6499273034153591310/","source":"内涵教父","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":0,"image_url":"//p3.pstatp.com/list/190x124/4e6200049d77922dab17","group_id":"6499273034153591310","is_related":true,"media_url":"/c/user/57838803860/"},{"comments_count":74,"media_avatar_url":"//p1.pstatp.com/large/1a6e00044a2fa57d11f8","is_feed_ad":false,"is_diversion_page":false,"title":"苏宁抛售阿里股票背后是怎样一个大新闻","single_mode":true,"gallary_image_count":3,"middle_mode":false,"has_video":false,"video_duration_str":null,"source_url":"/group/6499212681596109325/","source":"创富圈","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":1,"image_url":"//p1.pstatp.com/list/190x124/4e63000315ca047782b7","group_id":"6499212681596109325","is_related":true,"media_url":"/c/user/58858222893/"},{"comments_count":18,"media_avatar_url":"//p3.pstatp.com/large/46ee0002b97c6fa40bb3","is_feed_ad":false,"is_diversion_page":false,"title":"EOS下一个「千倍币」!你押中了没?!","single_mode":true,"gallary_image_count":11,"middle_mode":false,"has_video":false,"video_duration_str":null,"source_url":"/group/6499397121387528718/","source":"数币圈","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":0,"image_url":"//p1.pstatp.com/list/190x124/4e6900018a72d90434c6","group_id":"6499397121387528718","is_related":true,"media_url":"/c/user/76451415761/"},{"media_avatar_url":"//p3.pstatp.com/large/355f0001de9b2a3c0934","is_feed_ad":false,"is_diversion_page":false,"title":"这个国家天降横财,新的财富转移大潮","single_mode":false,"gallary_image_count":0,"middle_mode":false,"has_video":false,"video_duration_str":null,"source_url":"/group/6499196758470427149/","source":"黄生看金融","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":2,"comments_count":65,"group_id":"6499196758470427149","is_related":true,"media_url":"/c/user/3738912216/"},{"comments_count":20,"media_avatar_url":"//p1.pstatp.com/large/289a0000aa65ce985a46","is_feed_ad":false,"is_diversion_page":false,"title":"原来采购也能戳中人心!京东智慧采购厉害了!","single_mode":true,"gallary_image_count":3,"middle_mode":false,"has_video":false,"video_duration_str":null,"source_url":"/group/6499761959959790093/","source":"IT电商论","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":0,"image_url":"//p3.pstatp.com/list/190x124/4e6b00022814e26397ac","group_id":"6499761959959790093","is_related":true,"media_url":"/c/user/61991407355/"},{"comments_count":56,"media_avatar_url":"//p1.pstatp.com/large/3610/3304763932","is_feed_ad":false,"is_diversion_page":false,"title":"云养猫是如何三天击溃一个百万美元经济体的!","single_mode":true,"gallary_image_count":30,"middle_mode":false,"has_video":false,"video_duration_str":null,"source_url":"/group/6497901445252121102/","source":"差评","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":3,"image_url":"//p1.pstatp.com/list/190x124/4afb000366a21e8070ac","group_id":"6497901445252121102","is_related":true,"media_url":"/c/user/4358436566/"},{"comments_count":10,"is_related":true,"is_feed_ad":false,"is_diversion_page":false,"title":"支付宝扫码红包为什么没人敢扫了?","single_mode":true,"gallary_image_count":9,"middle_mode":false,"has_video":false,"video_duration_str":null,"source_url":"/group/6499739130447003917/","source":"悟空问答","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":0,"image_url":"//p1.pstatp.com/list/190x124/4a350007be1867d2edd0","group_id":"6499739130447003917"},{"comments_count":16,"media_avatar_url":"//p1.pstatp.com/large/1dce0008ed9b42e9c1a6","is_feed_ad":false,"is_diversion_page":false,"title":"2018年 九大改变世界的技术趋势","single_mode":true,"gallary_image_count":10,"middle_mode":true,"has_video":false,"video_duration_str":null,"source_url":"/group/6498212720481927694/","source":"数据观商业管理云","more_mode":null,"article_genre":"article","has_gallery":false,"video_play_count":0,"image_url":"//p1.pstatp.com/list/190x124/4b010004766c00181ab1","group_id":"6498212720481927694","is_related":true,"media_url":"/c/user/6113810277/"}] }, shareInfo: { shareUrl: https://m.toutiao.com/group/6499675080405025294/, abstract: 最近比特币真是太火了, 成交价格也已经逼近了2w美金, 你有没有赚到一笔呢, 在之前的系列文章中我们详细的讲解了比特币的方方面面, 还没看过的请自己去该头条号看一下吧, 今天文章中我们来聊一聊比特币的核心区块链 !
小编推荐:欲学习电脑技术、系统维护、网络管理、编程开发和安全攻防等高端IT技术,请 点击这里 注册黑基账号,公开课频道价值万元IT培训教程免费学,让您少走弯路、事半功倍,好工作升职加薪!



免责声明:本文由投稿者转载自互联网,版权归原作者所有,文中所述不代表本站观点,若有侵权或转载等不当之处请联系我们处理,让我们一起为维护良好的互联网秩序而努力!联系方式见网站首页右下角。


鲜花

握手

雷人

路过

鸡蛋

相关阅读

最新评论


新出炉

返回顶部