区块链入门之”说文解字”

区块链的常用关键词解释,都在这儿了!

区块链入门之"说文解字"

以下文档来源于知名钱包平台imtoken官方app。

如果你刚刚进入区块链世界, 也许会茫然不知所措, 稀奇古怪的数字, 晦涩难懂的专业词语, 怎样才能迈出跨入区块链大门的第一步呢?

我们先不要去研究到底什么是区块链, 什么是智能合约, 加密算法等等, 循序而渐进。你要做的第一步是, 先拥有一个自己的钱包, 目前市场上的数字钱包有很多, 像 imToken, myetherwallet, parity, Metamask, Jaxx 等等, 选择一个你喜欢的钱包!

这里我用 imToken 举例, 创建属于你的第一个钱包, 生成钱包很简单, 只需要输入创建密码。 那么到底什么是钱包呢?

区块链入门之"说文解字"

解字: 钱包

在数字资产世界里, 我们经常会听到一个词 – 钱包, 不同于传统的互联网钱包, 它不会包含确切某一种资产或者某一种代币, 而是一个密钥 (包含私钥 和公钥) 的管理容器, 只包含密钥, 用户使用私钥进行签名交易, 从而证明拥有该交易的输出权, 其交易信息并不是存储在该钱包内, 而是存储在区块链> 中。公钥用来生成地址。

创建钱包后, 会看到一个提示备份钱包的界面。虽然不知道备份钱包是何用意, 但是点进去看一下, 这时会发现有两种备份的方式: 1. 备份助记词 2. 备份 Keystore 。”什么是助记词? 什么是 Keystore? 听都没听过!” 你的内心回荡着这种声音, 并告诉自己: “暂且不管备份了! 哼”。 你迫不及待的让朋友向你的地址里转入少量 ETH, 进行测试 (比如 0.01 个), 并为自己的聪明沾沾自喜: “我可不会第一次使用就转入大量资产, 万一出现问题怎么办!” 过了一会儿, 你会发现账户中就出现了 0.01 个 ETH, 成功了! 你的第一个数字钱包已经有了资产。

解字: 地址

地址由公钥 (公钥是私钥通过非对称加密算法生成) 生成, 以 0x 开头的 42 位 16 进制哈希值字符串。例如: 0xc2d5ef1b5e6234c6bcbce87bb05d579c8e9d5720 如果将钱包比作银行卡, 那么钱包地址就是银行卡号

然而在开心之余, 一不小心手滑, 将自己的手机掉在地上。”WTF” 无法开机, 导致必须换一款手机。于是你临时找到了一款旧手机, 重新下载 imToken 钱包, 但却无法导入你之前生成的钱包, 因为没有备份! 这时你会意识到, 原来备份是如此重要, 它是我们恢复、掌握资产的唯一途径。

由于你有良好的心态, 会告诉自己, 还好这个钱包里的资产不是很多, 并告诫自己, 以后一定要备份钱包。于是你重新生成钱包, 并点击钱包备份之后, 再次看到备份助记词和备份 Keystore 的字眼, 虽然还是不懂他们的意思, 但是依然选择了备份钱包。

区块链入门之"说文解字"

解字: Keystore

Keystore 是加密过后的私钥, 我们可以从两个角度来讲解 Keystore , 从小白用户和普通大众的角度出发, 我们没必要深究其中所使用的加密算法和种 种逻辑, 只需要知道以下几点即可: 1. Keystore 的安全程度取决于加密该 Keystore 的密码强度; 2. 要将 Keystore 和密码分开存储; 3.Keystore 密码不可更改。 但是对于从事技术行业, 有一定技术功底的用户而言, 在这里可以给大家简单剖析一下 Keystore 的构造, 从而帮助你深入理解 Keystore 的存取原 理。如下图所示:

区块链入门之"说文解字"

address 为该钱包的地址, Crypto里包含了所有重要的加密信息以及使用的加密算法, ciphertext 就是使用密码加密过后的私钥, cipherparams 是加 密的参数, cipher 和 kdf 是加密所用到的算法, 这里分别用到了aes-128-ctr 和 scrypt, kdfparams 是 kdf 加密算法的参数, mac 是将 ciphertext 再次 进行加密的产物, 一般用于验证信息。

从上边的解释不难看出, 从 Keystore 生成的那一刻起, 这些数据都已经写死在里边, 哪怕是你改动了文件里边的某一个字符, 都会破坏该文件, 导致无法解析, 所以 Keystore 是无法更改密码的。

现在你终于可以安心使用钱包, 再也不怕因为误删应用或设备损坏而丢失钱包了! 这次你向新钱包转了 1 个 ETH。

由于你用的是临时的旧手机, 所以你打算再买一部新的。 于是你用旧手机,将含有助记词信息的 Email 发送到新手机, 并且在新手机中导入成功。”这真的是太方便了”, 你欣喜的说道。

区块链入门之"说文解字"

然而有一天, 你突然发现手机里的那 1 个 ETH 竟然不翼而飞, 通过交易记录, 你发现它已被发往一个陌生的地址。。”快阻止这笔交易!” 你喊了出来。然而这是不可能的, 因为区块链具有不可逆性。

解字: 不可逆性

区块链上的信息是不可撤销、不可随意销毁的。例如比特币系统, 它是开源的, 整个系统都必须是公开透明的, 因此某笔交易被全网广播后, 达到公开 透明的, 因此某笔交易被全网广播后, 达到 6 个确认以上就成功记录在案了, 且不可逆转, 不可撤销。所以当你发送了一笔交易, 即使发现地址打错了, 你想要撤回此操作是不可能的。

在阻拦无果的情况下, 你只有让自己冷静下来, 并问自己:” Who moved my cheese?” 你分析了所有的可能性, 最后只有一个操作引起了你的疑心 — 没错, 就是那次邮件发送 助记词。”为什么助记词泄露, 就会导致我的资产丢失呢?”

解字: 助记词

助记词由 BIP 31 提案提出, 主要目的是让用户更好的记住自己的私钥, 目前助记词有多语言版本, 包括中文、英文、日文、法文等, 但是 imToken 和 myetherwallet 使用英文词库, parity 则使用和上述不同的词库, 所以在导入钱包时, 可能出现助记词不兼容, 但是私钥和 Keystore 是一致的, 所以用 户也无需担心。 助记词是未加密的私钥, 所以安全性极低, 在使用助记词的时候有两点值得注意的地方: 1. 一定要备份助记词, 一旦忘记 Keystore 密码, 或者想更改 Keystore 密码, 需要使用助记词找回钱包; 2. 不要使用截屏或拍照的方式备份助记词, 建议使用物理介质备份, 比如手抄下来, 放在自己认为安全的地方, 千万不要暴露给第三方; 3. 不要使用邮件或其他即时通讯方式传输助记词; 相同的助记词, 由于导入路径的不同, 会导致钱包的不同 (地址不同) , 例如 imToken 的默认生成路径是 m/44’/60’/0’/0/0 , 当你以相同的助记词导入 imToken 或 myetherwallet, 但是路径改为 m/44’/60’/0’/0/1 这时的钱包完全是另一个钱包。所以我们在存储自己助记词的时候, 也要记录好路径。当 然, 如果你明白了路径的含义, 可以使用自定义路径导入助记词生成钱包, 这个路径只有你一人知道, 这样当你一不小心暴露了助记词, 他人在不知道 你路径的前提下, 还是无法快速转移你的资产, 需要穷举尝试。这为你转移资产赢得了宝贵的时间。

区块链入门之"说文解字"

通过这次事件之后, 你知道了如何保管自己的钱包信息, 那么我们再来进行一笔交单的交易吧!

有一天, 你的朋友向你借了 5 个 ETH , 他将地址发给你, 并要求你尽快将 ETH 转给他。通过 imToken 的转账功能, 你准确的输入了地址 (PS: 因为你已经知道了不可逆性) 输入了转账金额之后, 发现一个叫矿工费的操作项。

区块链入门之"说文解字"

解字: 矿工费

在一个公有链上, 任何人都可以读写数据。读取数据是免费的, 但是向公有链中写数据时需要花费一定费用的, 这种开销有助于阻止垃圾内容, 并通过 支付保护其安全性。 网络上的任何节点(每个包含账本拷贝的连接设备被称作节点) 都可以参与称作挖矿的方式来保护网络。由于挖矿需要计算能力 和电费, 所以矿工们的服务需要得到一定的报酬, 这也是矿工费的由来。

凭感觉, 你认为矿工费可能和转账速度有关系, 为了让朋友尽快收到转账, 你试着将滑竿拉至最大。

区块链入门之"说文解字"

但矿工费是怎么计算的呢? 你不禁会问自己

一笔交易的矿工费用 gas 和 gas price 两者组成,gas 代表这笔交易所执行命令所需要消耗的 gas,而 gas price 代表每一个 gas 的价钱。这就像你 想让汽车跑 100 公里,需要消耗 5 升汽油,一升汽油 10 美刀,你总共需要消耗 50 美刀。 imToken 的交易费用 ( 也是也是以太坊的交易费用 ) = gas数量 * gas price ( gas 单价,以太币计价)

那么矿工费的高低和交易的速度有什么关系呢?

这是一个很有意思的问题。一个交易区块就像这辆火车,体积有限。你作为司机(矿工)想要利益最大化就是,让火车尽可能多的载客,同时选 择票价高的乘客。所以矿工在打包区块时,会选择给的 gas price 价格越高,但 gas 相对低的交易打包。 所以你希望交易越快被打包,你可以选择合理的 gas 的同时,调高 gas price。

区块链入门之"说文解字"

现在你已经明白的矿工费的意思, 点击 “下一步” 再次确认信息, 发送交易!

很快, 你的朋友就发来一条信息, “嗨, 伙计, 我已经接受到了你发来的 ETH, 感谢!” , 聪明的你会意识到, 使用区块链发送资金是如此低成本, 方便快捷。没错, 这也是区块链的去中心化特性, 对价值网络的重大影响。

所谓价值互联网就是人们能够像传递信息一样方便、快捷、低成本的传递价值, 尤其是资金。就像人们之前要发送一笔交易, 需要通过银行这个信任 > 度极高的中心化机构, 银行也会收取手续费作为佣金, 其服务的时间、服务类目和服务条款等也是由银行这种中心化机构决定。区块链的中心化特性> 则从根本上解决了这个问题。

过了一段时间, 你的朋友将借你的 ETH 还给了你, 并和你说, 通过你借给他的 ETH 去参与了 ICO 赚了一笔。”WHAT?” 你瞪大了双眼, 什么是 ICO?

解字: ICO

ICO 全称 Initial Crypto-Token Offering, 是指通过发行代币方式来进行融资。因为许多区块链项目能够通过发行加密代币(Crypto-Token) 来代表其项 目的一些收益权、股份或者使用权。因此, 可以根据投资者投资金额比例来发行相应的代币给投资者, 而这些代币很快可以在部分数字货币的交易所 里面进行交易。

通过朋友的讲解, 虽然你不甚了解, 但是依然选择了通过 imToken 的 ICO DApp 参与一次 ICO。 这个项目是由 Test Test Company 发起的 , 我们简称 TTC. , 其发行的代币 ( Token ) 称为 TTT, 合约细节是众筹结束后, 立即收到代币, 并且很快就会在交易所进行交易。(注: 该公司, 项目,代币纯属虚构, 属情节设定, 如有雷同, 纯属巧合)

通过 imToken 参与 ICO 的过程也是异常简单, 并且你很快就接收到了TTT – Token (代币)

区块链入门之"说文解字"

什么是 Token, 它有什么用? 虽然参与 ICO 成功, 然而敏而好学的你提出了这样的问题。

解字: Token

Token 有很多含义, 首先可以理解为代币, 区块链应用代币类型大概有三种:应用代币、权益代币、和债权代币 应用代币: 这些代币是区块链真正的核心部分,没有它们,区块链就无法运行。它们通常会是激励计划的一部分,激励人们帮助系统验证交易,创 造区块。包括BTC,ETH 都是这样的应用代币,应用代币一般采用POW工作量证明机制。 权益代币: 类似于公司的股份。权益代币不会随着用户使用应用而减少。相反, 权益代币的持有者还会收到应用的收益分红。因此,权益代币类似 于持有这个区块链应用(注意,不是公司)的股份。区块链黄金交易平台 Digix 就是通过发行一个叫做 DGD 的权益代币,来进行应用众筹的。除 了可以收到分红外,因为权益代币的持有者就是这个应用的所有人。所以,权益代币的持有者还拥有对这个应用里事务的投票权,以决定未来这个 应用的发展。例如,对于DigixDAO,它的权益代币DGD持有者可以向应用提出新增功能的提案,也可以对其他的提案进行投票。权益代币一般使 用POS证明机制。 债权代币: 债权代币的出现主要是用来解决区块链应用流动性不足的问题。比如,当一个应用突然爆火,拥入大量新用户。这些新用户需要应用代 币来使用这个应用。但这时,可能绝大多数的应用代币都在老用户的手里。而这个应用出于避免其应用代币的价格剧烈波动的原因,又禁止老用户 大量抛售自己手中的应用代币。这个时候,这个应用就需要临时借一笔钱,来购买应用代币,以满足新用户的使用需求。所以,债权代币就应运而 生了。它类似于为应用提供一个短期的贷款。而对于债权代币的持有者则类似一种储蓄行为,因为一般都可以获得一定的利息回报。 其次 Token 可以作为现实资产和数字资产之间的关系映射, 我们生活中的房产, 遗产, 汽车, 保险等都可以逐一映射, 转变为数字资产, 存储在区块链 里, 摆脱了传统纸质凭证, 或者单一系统的存储。可以说, 我们生活中的绝大多数资产, 最后都可以转变成映射到区块链中的数字资产。

又过了一段时间, 你得知 TTT 已经可以在交易所进行交易, 于是赶紧把 TTT 转到交易所, 根据交易所提供的收款地址, 你将币发送过去, 但是却”迟迟”没有到账。这时你会手足无措, “我该怎么办? 为什么没有一个像查询快递单号的应用让我查询区块链的交易信息呢?”

Etherscan https://etherscan.io/ 正是你需要的! 这里为你提供一个学习如何使用 Etherscan 的中文视频教程: https://v.qq.com/x/page/z0517hhjoz5.html

通过 Etherscan 的交易信息查询, 得知交易已经被矿工打包, 交易已经成功, 你将问题定位到应该是交易所还未通过审核, 所以只有耐心等待。(注: 大多数交易所是要对资产进行审核的)

交易所审核通过后, 终于可以进行交易了! 现在你终于迈出了进入区块链世界的第一步, Lv0 -> Lv 1。

发表评论

电子邮件地址不会被公开。

评论列表(20条)

  • nike mercurial vapor 2018年7月21日 14:20

    I wanted to send you that very little observation to finally say thanks a lot yet again for your breathtaking things you have provided above. This has been quite seriously open-handed with you to offer openly what a lot of folks would’ve made available for an ebook in order to make some money on their own, even more so since you might have tried it in case you wanted. Those strategies in addition worked like the great way to be sure that other people have a similar keenness really like my very own to see somewhat more with regard to this condition. I’m sure there are numerous more pleasurable instances up front for people who scan through your website.
    nike mercurial vapor

  • longchamp handbags 2018年7月20日 21:33

    I’m also writing to let you be aware of what a perfect encounter my cousin’s child went through reading your site. She even learned a lot of pieces, not to mention how it is like to possess an awesome coaching heart to get the others without hassle thoroughly grasp various impossible issues. You undoubtedly surpassed our expectations. Many thanks for giving these priceless, healthy, explanatory not to mention easy tips about this topic to Sandra.
    longchamp handbags

  • michael kors outlet online 2018年7月20日 02:55

    I intended to put you one very small remark to be able to thank you very much the moment again for these splendid tricks you’ve shared at this time. It has been really generous with you to provide extensively exactly what most people would have sold as an ebook to help make some money for themselves, notably given that you could have done it in case you considered necessary. These inspiring ideas also acted as the fantastic way to know that other individuals have similar fervor just as my very own to understand a good deal more related to this problem. I know there are numerous more pleasant occasions ahead for people who discover your blog.
    michael kors outlet online

  • adidas nmd 2018年7月17日 08:35

    I precisely needed to appreciate you yet again. I am not sure what I could possibly have worked on without the advice discussed by you directly on this situation. It actually was an absolute alarming problem for me personally, however , taking note of the skilled technique you treated the issue forced me to weep for joy. Extremely grateful for the support and in addition have high hopes you are aware of a powerful job your are putting in training men and women through the use of a blog. Most probably you have never come across all of us.
    adidas nmd

  • yeezy boost 2018年7月13日 01:27

    I wish to show some appreciation to you just for rescuing me from this challenge. Because of researching through the search engines and finding thoughts which were not pleasant, I thought my life was done. Living minus the strategies to the issues you have resolved through this guide is a serious case, and those which could have negatively affected my entire career if I hadn’t noticed your web site. Your primary understanding and kindness in handling a lot of things was crucial. I’m not sure what I would’ve done if I hadn’t encountered such a subject like this. I can at this time look ahead to my future. Thanks a lot very much for your professional and result oriented help. I won’t think twice to recommend your web blog to anybody who wants and needs assistance on this topic.
    yeezy boost

  • nike air max 2017 2018年5月4日 16:50

    I as well as my buddies were found to be digesting the best information located on your site and so the sudden got an awful suspicion I had not expressed respect to the website owner for those strategies. These boys are actually as a result very interested to study them and now have unquestionably been taking pleasure in them. We appreciate you getting well helpful and then for making a choice on variety of useful useful guides millions of individuals are really eager to be aware of. Our own honest apologies for not expressing appreciation to sooner.
    nike air max 2017

  • paul george shoes 2018年5月3日 20:16

    I am only writing to let you understand of the extraordinary encounter my child found reading your webblog. She discovered a wide variety of pieces, including what it is like to possess a very effective coaching mindset to let other people with ease understand some hard to do issues. You truly did more than our desires. Many thanks for supplying these warm and friendly, trusted, edifying and in addition easy tips on that topic to Emily.
    paul george shoes

  • tory burch outlet 2018年5月2日 17:01

    Thanks a lot for providing individuals with an extremely remarkable possiblity to read in detail from here. It can be very amazing and also packed with a great time for me personally and my office fellow workers to search the blog on the least thrice weekly to study the newest issues you will have. And definitely, I’m just certainly motivated for the extraordinary tips and hints you serve. Certain 4 tips on this page are undeniably the most beneficial I have ever had.
    tory burch outlet

  • irving shoes 2018年5月1日 14:41

    I truly wanted to send a comment in order to express gratitude to you for all of the great guides you are showing at this site. My extended internet look up has at the end been rewarded with incredibly good information to share with my friends. I ‘d declare that most of us visitors are very lucky to live in a fabulous network with so many lovely individuals with good guidelines. I feel really happy to have encountered the website page and look forward to so many more entertaining minutes reading here. Thanks a lot once more for all the details.
    irving shoes

  • adidas tubular x 2018年4月30日 14:02

    I wish to show thanks to this writer for bailing me out of this challenge. Just after surfing around throughout the the web and finding advice which are not beneficial, I was thinking my life was gone. Being alive without the solutions to the difficulties you have resolved through your main posting is a critical case, and the ones which might have in a negative way affected my entire career if I had not come across your blog post. Your personal competence and kindness in taking care of the whole lot was invaluable. I’m not sure what I would’ve done if I had not come across such a stuff like this. I’m able to now look forward to my future. Thanks very much for the reliable and effective guide. I won’t be reluctant to endorse your web blog to any person who would like recommendations about this subject.
    adidas tubular x

  • kobe 9 2018年4月29日 20:59

    I intended to draft you one very little remark so as to thank you once again with your marvelous guidelines you have shown in this article. It is certainly strangely open-handed with people like you in giving freely all a number of people might have made available as an e book to end up making some profit on their own, particularly considering the fact that you could possibly have tried it in the event you decided. Those ideas in addition worked to be the easy way to comprehend most people have the identical desire just as mine to learn a good deal more with reference to this problem. I’m sure there are a lot more pleasurable moments ahead for those who discover your blog.
    kobe 9

  • prada sunglasses 2018年4月28日 21:37

    I truly wanted to send a simple word so as to express gratitude to you for all the wonderful hints you are giving out on this site. My time consuming internet look up has finally been rewarded with incredibly good facts to exchange with my two friends. I ‘d tell you that we readers are unequivocally blessed to dwell in a wonderful network with many marvellous people with great ideas. I feel pretty lucky to have encountered the web site and look forward to plenty of more fabulous times reading here. Thanks once again for everything.
    prada sunglasses

  • Michael Kors Hamilton Smooth Medium Red Satchels 2018年4月28日 15:11

    I in addition to my buddies were found to be examining the nice techniques from your site and then quickly I had a horrible suspicion I had not expressed respect to the blog owner for those techniques. All of the young boys are already totally joyful to study all of them and have now simply been taking pleasure in these things. We appreciate you turning out to be very considerate and then for obtaining some good guides millions of individuals are really wanting to know about. Our own sincere apologies for not expressing appreciation to earlier.
    Michael Kors Hamilton Smooth Medium Red Satchels

  • cheap nfl jerseys 2018年4月28日 03:14

    My spouse and i ended up being very lucky when Albert could carry out his reports through your ideas he had through the weblog. It’s not at all simplistic just to happen to be freely giving secrets which often a number of people could have been trying to sell. We take into account we have got the website owner to give thanks to for that. The main explanations you’ve made, the simple site navigation, the relationships you will help engender – it’s got mostly superb, and it is aiding our son in addition to the family do think that theme is thrilling, and that’s tremendously important. Many thanks for everything!
    cheap nfl jerseys

  • true religion 2018年4月27日 08:10

    Thanks for all your effort on this web page. My daughter delights in making time for internet research and it’s easy to understand why. Almost all learn all relating to the compelling way you create vital thoughts through this blog and improve response from people on that point then our own girl is truly starting to learn a lot of things. Take pleasure in the remaining portion of the year. You’re the one conducting a brilliant job.
    true religion

  • chrome hearts online 2018年4月26日 15:25

    My husband and i ended up being so glad that Raymond managed to finish off his researching using the precious recommendations he got through your web pages. It is now and again perplexing to simply happen to be giving freely guidelines that many the others may have been selling. We really do know we need the writer to appreciate for that. The specific explanations you’ve made, the easy blog navigation, the relationships you will make it easier to instill – it’s got everything sensational, and it’s leading our son in addition to us do think that theme is pleasurable, and that’s highly essential. Thanks for the whole lot!
    chrome hearts online

  • oakley sunglasses 2018年4月25日 23:38

    I wish to show thanks to this writer just for bailing me out of this type of incident. Right after exploring throughout the the net and meeting methods which are not beneficial, I was thinking my life was gone. Living devoid of the solutions to the issues you have resolved by means of your posting is a serious case, as well as the kind that might have negatively damaged my entire career if I had not discovered your blog post. Your personal knowledge and kindness in controlling every aspect was invaluable. I’m not sure what I would have done if I had not come upon such a stuff like this. I can now relish my future. Thanks for your time so much for this high quality and result oriented help. I won’t hesitate to endorse the website to anyone who desires counselling about this issue.
    oakley sunglasses

  • NMD R1 Runner PK Black Red 2018年4月25日 14:51

    I as well as my pals came digesting the best tips on your web site while all of the sudden came up with a horrible suspicion I never thanked you for them. Most of the ladies appeared to be totally happy to read through all of them and have now without a doubt been having fun with those things. Many thanks for turning out to be indeed kind and then for obtaining certain magnificent subject areas most people are really eager to be informed on. My very own sincere regret for not saying thanks to you earlier.
    NMD R1 Runner PK Black Red

  • michael kors handbags 2018年4月24日 23:44

    I truly wanted to make a brief remark to be able to appreciate you for some of the wonderful information you are posting at this website. My prolonged internet lookup has now been honored with beneficial facts and strategies to go over with my company. I would point out that we visitors actually are definitely lucky to be in a fabulous website with so many special professionals with useful methods. I feel truly lucky to have come across the web page and look forward to plenty of more thrilling moments reading here. Thanks once again for all the details.
    michael kors handbags

  • ferragamo belt 2018年4月24日 00:35

    Thanks for your entire effort on this website. Betty really likes participating in investigations and it’s easy to see why. My partner and i know all of the powerful tactic you convey insightful tips through this web blog and as well as cause participation from the others on this area of interest plus our child is now learning a whole lot. Enjoy the rest of the year. You have been doing a fantastic job.
    ferragamo belt [url=http://www.ferragamobelt.us]ferragamo belt[/url]

QR code