今天起,我们一起学习比特币领域经典的作品MasteringBitcoin,国内译作《精通比特币》。这本书的作者是AndreasM.Antonopoulos是国外比特币圈一位前辈,这本书被誉为比特币最好的技术参考。
《精通比特币》的第一版中文版已经在国内出版,第二版英文版于2017年7月完成,目前没有中文纸质版本。但是在网络上有网友贡献出了英文版。以下是相关链接:
书籍主页:https://github.com/bitcoinbook/bitcoinbook英文版链接:https://github.com/bitcoinbook/bitcoinbook/blob/develop/book.asciidoc中文版链接:https://bitcoinbook.info/wp-content/translations/cmn/book.pdf
我会选择英文版作为我们的学习主材料,针对这些英文材料,梳理出逻辑,并写出我的理解。由于已经有现成的中文版译本,因此我不会对英文逐句翻译;对于一些比较简单的部分,我会择机省略。但是对其中的部分英文用法,我会给出解释。我期待能达到的效果是,既能把比特币给学了,顺便把英语的表达积累。作为读者,建议你先阅读英文,尝试自己搞明白,再看我的文字;如果英文理解有困难,那就自行参考一下译本。不要只看中文,不看英文,这样你会看不懂的。
好,下面我从前言开始梳理:
0.前言
前言地址参见https://github.com/bitcoinbook/bitcoinbook/blob/develop/preface.asciidoc
由于前言有许多说明性的文字,我仅从中摘录部分论述。
WritingtheBitcoinBook
Ifirststumbleduponbitcoininmid-2011.Myimmediatereactionwasmoreorless"Pfft!Nerdmoney!"andIignoreditforanothersixmonths,failingtograspitsimportance.ThisisareactionthatIhaveseenrepeatedamongmanyofthesmartestpeopleIknow,whichgivesmesomeconsolation.ThesecondtimeIcameacrossbitcoin,inamailinglistdiscussion,IdecidedtoreadthewhitepaperwrittenbySatoshiNakamototostudytheauthoritativesourceandseewhatitwasallabout.IstillrememberthemomentIfinishedreadingthoseninepages,whenIrealizedthatbitcoinwasnotsimplyadigitalcurrency,butanetworkoftrustthatcouldalsoprovidethebasisforsomuchmorethanjustcurrencies.Therealizationthat"thisisn’tmoney,it’sadecentralizedtrustnetwork,"startedmeonafour-monthjourneytodevoureveryscrapofinformationaboutbitcoinIcouldfind.Ibecameobsessedandenthralled,spending12ormorehourseachdaygluedtoascreen,reading,writing,coding,andlearningasmuchasIcould.Iemergedfromthisstateoffugue,morethan20poundslighterfromlackofconsistentmeals,determinedtodedicatemyselftoworkingonbitcoin.
以太坊网络销毁量超344万枚ETH:金色财经报道,据Ultrasound数据显示,以太坊网络销毁量超344万枚ETH,本文撰写时销毁量为3447113.18枚ETH。其中,OpenSea销毁230050.66枚ETH,ETHtransfers销毁292386.81枚ETH,UniswapV2销毁188775.31枚。注:自以太坊伦敦升级引入EIP-1559后,以太坊网络会根据交易需求和区块大小动态调整每笔交易的BaseFee,而这部分的费用将直接燃烧销毁。[2023/7/9 22:26:15]
这段有几个信息点值得注意:
(1)作者在第一次接触比特币的时候,并没有太在意,忽略了六个月的时间;第二次是在邮件讨论中遇到比特币,这时才开始读中本聪的白皮书。作者想必是懊悔的,但是后面他发现其他很多聪明人,在第一次遇到比特币,也是这样的反应,却给了他一些安慰。不过作者还是幸运的,有的人每一次都说要读,但是最后仍然是不了了之,一拖十几年,甚至一辈子就过去了。看一下你的待办清单,有多少事情是你一直想做但是却没有做的呢?
(2)作者在研究完白皮书以后,意识到这不仅仅是电子货币,而是一种信任的网络,这不只是可以为货币打下基础,还可以是很多事情的基础。在意识到这个问题以后,作者沉迷学习四个月,每天研究12个小时,盯着电脑,阅读、编码、写作,之后瘦了20磅。注意这里的becameobsessedandenthralled,gluedtoascreen,emergedfromthisstateoffugue都是很好的表达,英语写作可以借鉴。
(3)这里要学习的是作者的精神。从描述上看,作者是内驱力很强的一个人。做一件事情,不是因为别人给你打了鸡血,而是你自己通过学习,发现一件事情的极端重要意义,从而自主产生动力,不惜一切代价精进。这是区分人与人成就的重要原因。我记得,李笑来老师在讲他最初接触到比特币的时候,也有类似的场景片断。其实在任何领域,要有一定的成绩,都要有这样一种“钉钉子”精神,完成自己的原始知识资本积累。
(4)在十九大报告中有这样一句话,“增强狠抓落实本领,坚持说实话、谋实事、出实招、求实效,把雷厉风行和久久为功有机结合起来,勇于攻坚克难,以钉钉子精神做实做细做好各项工作。”
Twoyearslater,aftercreatinganumberofsmallstartupstoexplorevariousbitcoin-relatedservicesandproducts,Idecidedthatitwastimetowritemyfirstbook.Bitcoinwasthetopicthathaddrivenmeintoafrenzyofcreativityandconsumedmythoughts;itwasthemostexcitingtechnologyIhadencounteredsincetheinternet.Itwasnowtimetosharemypassionaboutthisamazingtechnologywithabroaderaudience.
这里作者声情并茂地说:“比特币让我创意勃发,让我殚精竭虑;就互联网出来以来,我遇到的最激动人心的技术”。那就让我们跟着这位瘦下来20磅的作者,开始精通比特币的旅程吧。
剩下的部分作者讲了一些书面向的读者,封面的隐喻以及阅读指南,请大家自行阅读。
https://github.com/bitcoinbook/bitcoinbook/blob/develop/preface.asciidoc
1.简介
这一部分基础内容由于在比特币白皮书的解析部分已经有所讨论,所以行文会比较简略。原文地址在
https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch01.asciidoc。
数据:Blur每日交易次数已连续5日超越OpenSea:金色财经报道,据Dune数据显示,NFT交易市场Blur的每日交易次数已连续5日超越Open Sea。其中,2月19日Blur的日交易次数为65,359次,OpenSea的日交易次数为39,835次。[2023/2/21 12:18:35]
WhatIsBitcoin?
Bitcoinisacollectionofconceptsandtechnologiesthatformthebasisofadigitalmoneyecosystem.Unitsofcurrencycalledbitcoinareusedtostoreandtransmitvalueamongparticipantsinthebitcoinnetwork.Bitcoinuserscommunicatewitheachotherusingthebitcoinprotocolprimarilyviatheinternet,althoughothertransportnetworkscanalsobeused.Thebitcoinprotocolstack,availableasopensourcesoftware,canberunonawiderangeofcomputingdevices,includinglaptopsandsmartphones,makingthetechnologyeasilyaccessible.
比特币是一套概念与技术,形成的电子现金生态系统。在解析比特币白皮书的文章中,我们已经对电子现金需要有的基本特点进行过分析。
Userscantransferbitcoinoverthenetworktodojustaboutanythingthatcanbedonewithconventionalcurrencies,includingbuyandsellgoods,sendmoneytopeopleororganizations,orextendcredit.Bitcoincanbepurchased,sold,andexchangedforothercurrenciesatspecializedcurrencyexchanges.Bitcoininasenseistheperfectformofmoneyfortheinternetbecauseitisfast,secure,andborderless.
比特币在某种程度上,是现金互联网的最佳形式,因为快、安全、无界。
Unliketraditionalcurrencies,bitcoinareentirelyvirtual.Therearenophysicalcoinsorevendigitalcoinsperse.Thecoinsareimpliedintransactionsthattransfervaluefromsendertorecipient.Usersofbitcoinownkeysthatallowthemtoproveownershipofbitcoininthebitcoinnetwork.Withthesekeystheycansigntransactionstounlockthevalueandspenditbytransferringittoanewowner.Keysareoftenstoredinadigitalwalletoneachuser’scomputerorsmartphone.Possessionofthekeythatcansignatransactionistheonlyprerequisitetospendingbitcoin,puttingthecontrolentirelyinthehandsofeachuser.
比特币通过密钥的方式来证明所有权。如果你掌握了密钥,你就掌握了对应的货币。
Ethereum Fair(ETF)空投测试合约在以太坊网络完成部署:金色财经消息,据Ethereum Fair官方消息,目前已经完成以太坊网络上的空投合约部署,当分叉完成后此合约将同步至Ethereum Fair网络上,符合条件用户可以进行空投领取的相关操作。[2022/9/5 13:09:46]
Bitcoinisadistributed,peer-to-peersystem.Assuchthereisno"central"serverorpointofcontrol.Bitcoinarecreatedthroughaprocesscalled"mining,"whichinvolvescompetingtofindsolutionstoamathematicalproblemwhileprocessingbitcointransactions.Anyparticipantinthebitcoinnetwork(i.e.,anyoneusingadevicerunningthefullbitcoinprotocolstack)mayoperateasaminer,usingtheircomputer’sprocessingpowertoverifyandrecordtransactions.Every10minutes,onaverage,abitcoinminerisabletovalidatethetransactionsofthepast10minutesandisrewardedwithbrandnewbitcoin.Essentially,bitcoinminingdecentralizesthecurrency-issuanceandclearingfunctionsofacentralbankandreplacestheneedforanycentralbank.
比特币的挖矿机制,将中央银行的货币发行与清算工作去中心化,从而不需要任何中央银行。
Thebitcoinprotocolincludesbuilt-inalgorithmsthatregulatetheminingfunctionacrossthenetwork.Thedifficultyoftheprocessingtaskthatminersmustperformisadjusteddynamicallysothat,onaverage,someonesucceedsevery10minutesregardlessofhowmanyminers(andhowmuchprocessing)arecompetingatanymoment.Theprotocolalsohalvestherateatwhichnewbitcoinarecreatedevery4years,andlimitsthetotalnumberofbitcointhatwillbecreatedtoafixedtotaljustbelow21millioncoins.Theresultisthatthenumberofbitcoinincirculationcloselyfollowsaneasilypredictablecurvethatapproaches21millionbytheyear2140.Duetobitcoin’sdiminishingrateofissuance,overthelongterm,thebitcoincurrencyisdeflationary.Furthermore,bitcoincannotbeinflatedby"printing"newmoneyaboveandbeyondtheexpectedissuancerate.
比特币有内置的算法用于调控挖矿速度,以保证每10分钟挖到一次。比特币总数是2100万枚,预计到2140年全部挖出。比特币是通缩型货币,无法通过“印钞”的方式,增发货币。
Behindthescenes,bitcoinisalsothenameoftheprotocol,apeer-to-peernetwork,andadistributedcomputinginnovation.Thebitcoincurrencyisreallyonlythefirstapplicationofthisinvention.Bitcoinrepresentstheculminationofdecadesofresearchincryptographyanddistributedsystemsandincludesfourkeyinnovationsbroughttogetherinauniqueandpowerfulcombination.Bitcoinconsistsof:
穆长春:四个方向和原则来建设数字人民币智能合约生态:金色财经报道,9月2日,中国人民银行数字货币研究所所长穆长春在2022中国国际金融年度论坛上,分享了对智能合约的一些思考,以及数字人民币智能合约开放生态的设计理念。穆长春表示,数字人民币智能合约生态要按以下方向和原则来建设,一是坚持中心化管理和双层运营架构。二是保证合约模板的合法性和有效性。 三是坚持开放和开源。 四是持续进行技术升级,防范技术风险。[2022/9/2 13:04:49]
Adecentralizedpeer-to-peernetwork(thebitcoinprotocol)
Apublictransactionledger(theblockchain)
Asetofrulesforindependenttransactionvalidationandcurrencyissuance(consensusrules)
Amechanismforreachingglobaldecentralizedconsensusonthevalidblockchain(Proof-of-Workalgorithm)
比特币代表了过去几十年密码学研究和分布式系统的研究顶点,包括以下四个方面的创新:
(1)分布式的点对点网络
(2)一套公众账簿系统
(3)一套交易验证和发币的规则
(4)一套在区块链上达到共识的机制
Asadeveloper,Iseebitcoinasakintotheinternetofmoney,anetworkforpropagatingvalueandsecuringtheownershipofdigitalassetsviadistributedcomputation.There’salotmoretobitcointhanfirstmeetstheeye.
比特币就像金钱的互联网,可以通过分布式的计算方式,传播价值,保障电子资产所有权。
Inthischapterwe’llgetstartedbyexplainingsomeofthemainconceptsandterms,gettingthenecessarysoftware,andusingbitcoinforsimpletransactions.Infollowingchapterswe’llstartunwrappingthelayersoftechnologythatmakebitcoinpossibleandexaminetheinnerworkingsofthebitcoinnetworkandprotocol.
DigitalCurrenciesBeforeBitcoin
Theemergenceofviabledigitalmoneyiscloselylinkedtodevelopmentsincryptography.Thisisnotsurprisingwhenoneconsidersthefundamentalchallengesinvolvedwithusingbitstorepresentvaluethatcanbeexchangedforgoodsandservices.Threebasicquestionsforanyoneacceptingdigitalmoneyare:
CanItrustthatthemoneyisauthenticandnotcounterfeit?
CanItrustthatthedigitalmoneycanonlybespentonce(knownasthe“double-spend”problem)?
CanIbesurethatnooneelsecanclaimthismoneybelongstothemandnotme?
安全公司警告用户警惕新的MetaMask相关网络钓鱼活动:8月1日消息,网络安全公司Halborn对针对加密钱包MetaMask用户的新网络钓鱼活动发出警告,称其在今年7月下旬收到MetaMask相关钓鱼邮件,该邮件看起来很真实,带有MetaMask标题和徽标,以及告诉用户遵守KYC规定以及如何验证他们的钱包的消息。但如果仔细观察一些拼写错误和发件人的电子邮件地址,就会发现他们的电子邮件地址使用Metamaks而非Metamask。点击邮件内的“行动呼吁”按钮,会链接到现一个指向虚假网站,该链接会提示用户输入助记词,然后再重定向到MetaMask以清空他们的加密钱包。(Cointelegraph)[2022/8/1 2:51:25]
Issuersofpapermoneyareconstantlybattlingthecounterfeitingproblembyusingincreasinglysophisticatedpapersandprintingtechnology.Physicalmoneyaddressesthedouble-spendissueeasilybecausethesamepapernotecannotbeintwoplacesatonce.Ofcourse,conventionalmoneyisalsooftenstoredandtransmitteddigitally.Inthesecases,thecounterfeitinganddouble-spendissuesarehandledbyclearingallelectronictransactionsthroughcentralauthoritiesthathaveaglobalviewofthecurrencyincirculation.Fordigitalmoney,whichcannottakeadvantageofesotericinksorholographicstrips,cryptographyprovidesthebasisfortrustingthelegitimacyofauser’sclaimtovalue.Specifically,cryptographicdigitalsignaturesenableausertosignadigitalassetortransactionprovingtheownershipofthatasset.Withtheappropriatearchitecture,digitalsignaturesalsocanbeusedtoaddressthedouble-spendissue.
这里讲的是传统的现金安全与电子现金安全的异同,与我们前一篇文章中谈到的信息要点类似,参见《比特币白皮书解析|从零开始区块链》。这一部分英语我就不展开介绍,但是可以分享一个学习思路:如果你对一件事情本身就很了解,或者你对这件事情的了解,是通过母语或者其他语言习得,那你用英语或者你需要学习的语言,再去读关于这个主题的讨论,你的语言学习吸收效率会很高。
Whencryptographystartedbecomingmorebroadlyavailableandunderstoodinthelate1980s,manyresearchersbegantryingtousecryptographytobuilddigitalcurrencies.Theseearlydigitalcurrencyprojectsissueddigitalmoney,usuallybackedbyanationalcurrencyorpreciousmetalsuchasgold.
Althoughtheseearlierdigitalcurrenciesworked,theywerecentralizedand,asaresult,wereeasytoattackbygovernmentsandhackers.Earlydigitalcurrenciesusedacentralclearinghousetosettlealltransactionsatregularintervals,justlikeatraditionalbankingsystem.Unfortunately,inmostcasesthesenascentdigitalcurrenciesweretargetedbyworriedgovernmentsandeventuallylitigatedoutofexistence.Somefailedinspectacularcrasheswhentheparentcompanyliquidatedabruptly.Toberobustagainstinterventionbyantagonists,whetherlegitimategovernmentsorcriminalelements,adecentralizeddigitalcurrencywasneededtoavoidasinglepointofattack.Bitcoinissuchasystem,decentralizedbydesign,andfreeofanycentralauthorityorpointofcontrolthatcanbeattackedorcorrupted.
这一部分在我以前的文章里面也提到过,中心化的问题就是单点容易受到攻击,但是比特币采用了去中心化的方式,通过数字签名来实现验证和所有权。
HistoryofBitcoin
Bitcoinwasinventedin2008withthepublicationofapapertitled"Bitcoin:APeer-to-PeerElectronicCashSystem,"writtenunderthealiasofSatoshiNakamoto(see).Nakamotocombinedseveralpriorinventionssuchasb-moneyandHashCashtocreateacompletelydecentralizedelectroniccashsystemthatdoesnotrelyonacentralauthorityforcurrencyissuanceorsettlementandvalidationoftransactions.Thekeyinnovationwastouseadistributedcomputationsystem(calleda"Proof-of-Work"algorithm)toconductaglobal"election"every10minutes,allowingthedecentralizednetworktoarriveatconsensusaboutthestateoftransactions.Thiselegantlysolvestheissueofdouble-spendwhereasinglecurrencyunitcanbespenttwice.Previously,thedouble-spendproblemwasaweaknessofdigitalcurrencyandwasaddressedbyclearingalltransactionsthroughacentralclearinghouse.
比特币白皮书我们之前已经梳理完了,我读到这里的时候,内心啊哈一笑。
Thebitcoinnetworkstartedin2009,basedonareferenceimplementationpublishedbyNakamotoandsincerevisedbymanyotherprogrammers.TheimplementationoftheProof-of-Workalgorithm(mining)thatprovidessecurityandresilienceforbitcoinhasincreasedinpowerexponentially,andnowexceedsthecombinedprocessingpoweroftheworld’stopsupercomputers.Bitcoin’stotalmarketvaluehasattimesexceeded$135billionUSdollars,dependingonthebitcoin-to-dollarexchangerate.Thelargesttransactionprocessedsofarbythenetworkwas$400millionUSdollars,transmittedinstantlyandprocessedforafeeof$1.
这里的数据是,比特币目前最大的一笔交易是4亿美金的转账,手续费1美金。不过现在有比这个更高的交易了。
SatoshiNakamotowithdrewfromthepublicinApril2011,leavingtheresponsibilityofdevelopingthecodeandnetworktoathrivinggroupofvolunteers.Theidentityofthepersonorpeoplebehindbitcoinisstillunknown.However,neitherSatoshiNakamotonoranyoneelseexertsindividualcontroloverthebitcoinsystem,whichoperatesbasedonfullytransparentmathematicalprinciples,opensourcecode,andconsensusamongparticipants.Theinventionitselfisgroundbreakingandhasalreadyspawnednewscienceinthefieldsofdistributedcomputing,economics,andeconometrics.
这里说了两个重要的信息点:
(1)比特币开发出了以后,即使中本聪也无法控制
(2)比特币这项发明是突破性的,并且带来了分布式计算、经济学以及计量经济学的新领域。
ASolutiontoaDistributedComputingProblem
SatoshiNakamoto’sinventionisalsoapracticalandnovelsolutiontoaproblemindistributedcomputing,knownasthe"ByzantineGenerals'Problem."Briefly,theproblemconsistsoftryingtoagreeonacourseofactionorthestateofasystembyexchanginginformationoveranunreliableandpotentiallycompromisednetwork.SatoshiNakamoto’ssolution,whichusestheconceptofProof-of-Worktoachieveconsensuswithoutacentraltrustedauthority,representsabreakthroughindistributedcomputingandhaswideapplicabilitybeyondcurrency.Itcanbeusedtoachieveconsensusondecentralizednetworkstoprovethefairnessofelections,lotteries,assetregistries,digitalnotarization,andmore.
比特币用了一种新的方式解决拜占庭问题,即在一个不受信任的网络环境下,不同角色如何通过交换信息,来对行动或者状态达成一致。
网络是一个充满了不信任的危险环境,虽然对小白来说不是这样的。我以安全行业的从业者为例,这个行业里很多安全工程师是在虚拟机里看邮件的,因为邮件往往是重要的攻击风险来源,而且对于安全工程师,有一种有趣的说法,两个人的最高信任就是,你发了一个邮件,有一个附件,我毫不犹豫地点开。
要在这样的不信任的环境中,构建信任,是密码学一直以来研究的课题。比特币就是在这个方向上的一次积极的尝试。
BitcoinUses,Users,andTheirStories
ChoosingaBitcoinWallet
GettingYourFirstBitcoin
接下来的小节,原书举了几个比特币的应用场景,以及如何购买第一枚比特币。该部分内容相对简单,在此就不予以详述。可以阅读英文链接
https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch01.asciidoc#bitcoin-uses-users-and-their-stories
郑重声明: 本文版权归原作者所有, 转载文章仅为传播更多信息之目的, 如作者信息标记有误, 请第一时间联系我们修改或删除, 多谢。