2. IPFS

【IPFS】go-ipfs 0.4.14 版本发布

Go-ipfs 0.4.14 版本于2018年3月26日发布。新版本不仅优化了内存和CPU使用,还成功修复了许多bug,对 IPNS 性能做了一项重要优化和大量重构。

Go-ipfs 0.4.14 版本于2018年3月26日发布。新版本不仅优化了内存和CPU使用,还成功修复了许多bug,对 IPNS 性能做了一项重要优化和大量重构。

  • 重构
  • IPNS 优化
  • 资源使用优化
  • IPFS 核心API
  • 关于不安全的哈希函数


由于重构和提取命令库,此版本比预期花的时间更长。这次重构分两个阶段。第一阶段将命令代码从核心go-ipfs代码中分离出来,移到一个单独的存储库中。之前这个代码与go-ipfs代码库缠绕太紧,无法用于其他项目。第二阶段的目标是修复与流输出、进度条和错误处理相关的几个主要问题。同时它还能让我们更简便地为其他传输协议提供一个API,例如websockets和unix domain sockets。完成这项巨大的改动花了不少时间,我们确信解决了绝大部分问题,但是如果您注意到任何奇怪的地方,请告知我们。


此外,我们新增了一种使用IPNS的实验方法。有了新的pubsub IPNS解析器和发布器,您可以订阅一个IPNS条目的更新,用户可以实时发布改动。有了这个功能,IPNS可以变得几乎瞬时。如何使用:只需用–enable-namesys-pubsub选项启动你的go-ipfs后台程序,所有的IPNS解析和发布都会使用pubsub模式 。注意:通过pubsub 模式解析一个IPNS名称,但没有人通过pubsub 模式发布的话,会导致退回到使用DHT。


此版本中内存和CPU使用有了明显的优化。我们花了相当长的时间修复代码库和go-libp2p中的内存相对益出。同级跟踪、bitswap分配、pinning和其他许多地方的修复降低了峰值和平均内存使用量。升级的哈希库、base58 编码库和改进的分配模式都有助于全面降低CPU使用。


此版本还包含初步的go-ipfs ‘核心 API’。一旦完成之后,核心API将是与go-ipfs交互的主要方式。嵌入式节点和通过HTTP API访问的节点都具有相同的接口。请继续关注之后的更新和文件。







go-ipfs 0.4.14 has been released today. Not only have we improved memory and CPU usage but we also managed to fix a lot of bugs, ship a major improvement to IPNS performance and lots of refactoring! \o/

  • Refactoring
  • IPNS Improvements
  • Resource Usage Improvements
  • IPFS Core API
  • Note Regarding Insecure Hash Functions


The release took longer than expected due to our refactoring and extracting of our commands library. This refactor had two stages. The first round of the refactor disentangled the commands code from core go-ipfs code, allowing us to move it out into a separate repository. The code was previously very entangled with the go-ipfs codebase and not usable for other projects. The second round of the refactor had the goal of fixing several major issues around streaming outputs, progress bars, and error handling. It also paved the way for us to more easily provide an API over other transports, such as websockets and unix domain sockets. It took a while to flush out all the kinks on such a massive change. We’re pretty sure we’ve got most of them, but if you notice anything weird, please let us know.

IPNS Improvements

Beyond that, we’ve added a new experimental way to use IPNS. With the new pubsub IPNS resolver and publisher, you can subscribe to updates of an IPNS entry, and the owner can publish out changes in real time. With this, IPNS can become nearly instantaneous. To make use of this, simply start your go-ipfs daemon with the –enable-namesys-pubsub option, and all IPNS resolution and publishing will use pubsub. Note that resolving an IPNS name via pubsub without someone publishing it via pubsub will result in a fallback to using the DHT. Please give this a try and let us know how it goes!

Resource Usage Improvements

Memory and CPU usage should see a noticeable improvement in this release. We have spent considerable time fixing excess memory usage throughout the codebase and down into go-libp2p. Fixes in peer tracking, bitswap allocation, pinning, and many other places have brought down both peak and average memory usage. An upgraded hashing library, base58 encoding library, and improved allocation patterns all contribute to overall lower CPU usage across the board.


This release also brings the beginning of the go-ipfs ‘Core API’. Once finished, the Core API will be the primary way to interact with go-ipfs using go. Both embedded nodes and nodes accessed over the HTTP API will have the same interface. Stay tuned for future updates and documentation.

Note Regarding Insecure Hash Functions

This release of go-ipfs disallows the usage of insecure hash functions and lengths. go-ipfs does not create these insecure objects for any purpose, but it did allow manually creating them and fetching them from other peers. If you currently have objects using insecure hashes in your local go-ipfs repo, please remove them before updating.

Full Changelog

As always, you can find the full changelog over at ipfs/go-ipfs’s Github repository: https://github.com/ipfs/go-ipfs/blob/master/CHANGELOG.md#0414-2018-03-22









QR code