Filecoin原理与实现
上QQ阅读APP看书,第一时间看更新

推荐序

The Internet is evolving. In the last 80 years,computing has transformed humanity.The Internet has become humanity's nervous system.The network carries most human activity—most of what humans do today is in some way transmitted or enabled through computers and the internet.Our species is transitioning from a pre-computing to a post-computing civilization.In the last 25 years,we have built a super-power machine:the Web.The Web enables individuals and groups to create and gift superpowers to everyone else,by creating an App and sharing it with the world.The Web has also evolved,into Web 2.0 and now Web 3.0.In the last 5 years,Web 3.0 has brought verif iability,resilience,and cryptoeconomics into the foundational technologies we use.We are in a transitional moment:today,we are building the platforms of the future.Money,transactions,contracts,computation,data storage,distribution,and bandwidth are all being transformed by new public incentivized utilities.Filecoin is one of these utilities,it is one of these platforms of the future.

Blockchain enables decentralized Internet. Through about 30 years of development,the Internet dramatically changed the world.Web 2.0 moved the world on from static desktop web pages designed for information consumption and served from expensive servers to interactive experiences and user-generated content that brought us Uber,Airbnb,Facebook and Instagram.The rise of Web 2.0 was largely driven by three core layers of innovation:mobile,social and cloud.We are also seeing the Web is more centralized.The Internet is dominated by large cloud service providers such as Amazon AWS,Microsoft Azure,Google,Alibaba and Tencent Cloud.The users do not have their data's ownership and have to trust these monopolies.Thanks to blockchain technology,the Web 3.0 is empowered and brings disruptive attributes to the Internet-Openness,Decentralization,Trustlessness,Verifiability and Permissionless.These have been well proved in value transactions (Bitcoin) and programmable computations (Smart contracts in Ethereum) with public blockchains.

Filecoin brings a verifiable storage network to the world.Filecoin is one of the prime parts of Web 3.0,focusing on decentralized storage as one of the three pillars of Internet infrastructure.Differentiated with cloud storage,Filecoin is a decentralized and crowdsourced,token-incentivized,verif iable,algorithm def ined storage market.The network values its data,and eliminates the intermediate of data storage,and at the f irst time,provides verif iable data retrieval.The way the network is constructed,can uniquely battle misinformation.Facts are stored immutably and can be cited wherever they are needed.The network is also for clients and storage providers to join freely for their interests.This increased competition could provide lower prices and more choices for consumers.It could also lead to entirely new types of applications that can programmatically store themselves and interact with Filecoin without human involvement.

Filecoin is the fastest growing storage network.The Filecoin community just celebrated the first anniversary of Filecoin Mainnet on Oct.15,2021.After one-year ecosystem growth,these numbers below need to mention:

12 EiB of total network storage power

3,362 Filecoin storage providers

230+organizations building on the network

465 new projects entering the ecosystem

7,500+project contributors on GitHub

10,000+developers participating at hackathons

It's a great honor to work with the dedicated community members who work hard to make those numbers realistic,and the Filecoin ecosystem keeps growing at an incredible speed.

It's good to know that Filecoin mainnet storage power grows even faster after being upgraded to Hyperdrive version(Filecoin v13 network upgrade),at about 50PiB each day.It is not just the largest and fastest growth distributed storage network,but one of the fastest growth storage services as well among all the decentralized and centralized networks.

Filecoin is evolving.It's been 8 years since the first version of the Filecoin white paper was published,and 5 years since the Filecoin project off icially started.Great work requires time to cultivate.There were a bunch of challenges to overcome for a secure and workable decentralized and verifiable storage network.A lot of innovations and creative implementations brought Filecoin to the mainnet.Filecoin is the first storage network which provides proof of storage via PoRep and PoSt,which is the key attribute of a decentralized network.Filecoin is also the first to have useful consensus as a blockchain.The power for block generation is actually the real storage for data storing and retrieval.Filecoin designed an effective economics to maintain storage service quality.All these are well designed,secure and workable.However,after the mainnet launched and celebrated the first anniversary of it,there is still a long way to go to build a mature decentralized storage market.There is much research on the way,including higher efficient proving mechanisms and algorithms,scalability to ZiB,even YiB storage capacity support,retrieval market building up,smart contract support,etc.

This book:A good reference for those learning Filecoin or to contribute to decentralized storage networks.Huge thanks to IPFSForce team for compiling many important Filecoin researches,specifications and implementations together in this book.This cannot happen if there is no deep understanding and long-time follow-up and contribution with Filecoin development.This book is also well organized to give a thorough introduction,and also provide a lot of details of why Filecoin is designed like this,including Filecoin expected consensus,crypto economics,and proof of storage,which are critical,I would suggest technical engineers read these to get the rationale behind this network.The implementation part describes a lot of details of how the complex system is built,which provides great support for ones who want to join Filecoin network.The last part-Thinking more about Filecoin,is a great portion to let people continuously think and look forward to Filecoin's future after you read all of the book and close it.

Filecoin's mission as a decentralized storage network is to store humanity's most important information,this is the mission we have set since the very first phase of Filecoin project.There is still a lot of work to be done going forward to make Filecoin the best storage network for storage providers,users,developers,entrepreneurs,and fellow Web 3.0 visionaries,but we have strong confidence with so many ecosystem partners getting involved to work together and lead the way to a Web 3.0 world.

互联网推动着人类的发展。在过去的80年里,计算机改变了人类的生活方式,互联网已经演进成为人类的另一套“神经系统”。如今,人类的大多数活动都与网络相关联,要么借助计算机完成,要么通过网络来传输信息。我们也似乎正在从计算前文明向计算后文明过渡。在过去的25年里,人类打造了一套超级强大的系统:Web。通过Web,人们能够创建应用程序并与世界分享一切,这赋予了人类超越以往任何时期的能力。Web一直在演进,从之前的Web 2.0,到现在的Web 3.0。在过去的5年里,Web 3.0将可验证性、弹性和密码经济学引入了互联网的基础技术之中。今天,我们正处于过渡时期:我们正在构建未来的平台。货币、交易、合同、计算、数据存储、分发和带宽都正在被新的公开激励算法和网络所改变。Filecoin是这些新兴网络之一,也是未来的Web 3.0平台之一。

区块链使互联网去中心化成为可能。通过大约30年的发展,互联网极大地改变了世界。互联网本身也从最初的静态桌面设计、以推送信息为主,逐步演进到Web 2.0,多数网络应用提供交互式体验,依靠用户自己生成网络内容,从而为我们带来了Uber、Airbnb、Facebook和Instagram。Web 2.0的兴起主要由三个核心创新底层推动:移动、社交和云。在Web 2.0发展的同时,我们还看到Web更加集中。互联网由亚马逊AWS、微软Azure、谷歌、阿里巴巴和腾讯云等大型云服务提供商主导。网络用户没有数据所有权,他们使用网络的同时必须信任这些企业。区块链技术给网络世界带来了改变,并为互联网带来了颠覆性的属性—开放性、去中心化、无须信任、可验证和无须许可,为Web 3.0的发展提供了可能。这些已经在使用公共区块链的价值交易(比特币)和可编程计算(以太坊中的智能合约)中得到了很好的证明。

Filecoin标志着可验证的存储网络的诞生。Filecoin是Web 3.0的主要组成部分之一,专注于互联网基础设施三大支柱之一的去中心化存储。与云存储不同,Filecoin是一个去中心化、人人可参与、通证激励、可验证、算法定义的存储市场。Filecoin重视数据价值,消除了数据存储的中间环节,并开创性地提供了可验证的数据检索。Filecoin采用独有的技术,保证不可变和可验证的存储,并能够及时发现存储错误。Filecoin采用基于算法的激励模型,供客户和存储服务提供商自由加入。在这样一个能够自由竞争的网络中,消费者可以享受更低的价格,拥有更多选择。其去中心化还为新型应用实现无须人工干预的自动存储和内容交互提供了可能。

Filecoin是增长最快的存储网络。Filecoin社区于2021年10月15日庆祝了Filecoin主网一周年。下面这些数字反映了Filecoin一周年的实际发展情况:

12EiB的总网络存储能力。

3362家Filecoin存储服务提供商。

230多个组织建立在网络上。

465个新项目进入生态。

GitHub上有7500多个项目贡献者。

10000多名开发者参加黑客马拉松。

Filecoin生态系统以令人难以置信的速度不断发展着,这些与敬业的社区成员的努力分不开,我个人也非常荣幸与这些社区成员合作,共同推进Filecoin的发展。

值得一提的是,Filecoin主网存储能力在升级到Hyperdrive版本(Filecoin v13网络升级)后增长更快,每天大约增长50PiB。它不仅是最大和增长最快的分布式存储网络,也是所有去中心化和中心化网络中增长最快的存储服务之一。

Filecoin也在持续演进中。第一版《Filecoin白皮书》发布距今已经8年,Filecoin项目正式启动也已经5年了。伟大的工作需要时间来验证成果。想实现一个安全且可行的去中心化和可验证的存储网络,需要面对许多挑战。Filecoin主网包含了许多现实的创新和创造性的实践。Filecoin是第一个通过PoRep和PoSt提供存储证明的存储网络,这是去中心化网络的关键属性。Filecoin也是第一个拥有有用共识的区块链。块生成的算力实际上是数据存储和检索的真正存储容量。Filecoin设计了一种有效的经济学来维持存储服务质量。所有这些都经过精心设计,安全且可行。然而,在主网上线之后,要建立一个成熟的去中心化存储市场还有很长的路要走。这条路上还要进行很多研究,包括更高效的证明机制和算法、ZiB的可扩展性,甚至YiB存储容量支持、检索市场建立、智能合约支持等。

本书是学习Filecoin或进行去中心化存储网络开发的优秀参考资料。非常感谢IPFSForce团队撰写本书。本书汇集了许多重要的Filecoin研究、规范和实现,也体现了IPFSForce团队对Filecoin开发的深刻理解和长期的跟进与贡献。本书的组织结构清晰,不仅给出了全面透彻的介绍,而且提供了很多关于Filecoin设计原理的细节,包括Filecoin预期共识、加密经济学和存储证明,这些都很关键。我建议技术工程师阅读这些内容以了解该网络的基本原理。本书的实现篇描述了很多复杂系统的构建细节,为想要加入Filecoin网络的读者提供了很好的支持。最后给出的关于Filecoin的思考,激励人们继续思考和期待Filecoin的未来。

Filecoin作为去中心化存储网络,其使命是存储人类最重要的信息,这是我们从Filecoin项目之初就设定的。要使Filecoin成为存储服务提供者、用户、开发人员、企业家和其他Web 3.0远见者的最佳存储网络,还有很多工作要做。我们对有众多生态系统合作伙伴参与并合作充满信心,让我们共同引领通往Web 3.0世界的道路。

Juan Benet

Filecoin创始人

协议实验室创始人