【IPFS】go-ipfs 0.4.14 版本发布

【IPFS】go-ipfs 0.4.14 版本发布

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

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

重构 

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

IPNS 优化

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

资源使用优化 

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

IPFS Core API

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

关于不安全的哈希函数

此版本不允许使用不安全的哈希函数和长度。go-ipfs不会出于任何目的创建这些不安全的对象,但它允许手动创建并从其他节点获取它们。如果当前你在本地go-ipfs代码库中有使用不安全哈希函数的对象,请在更新前将其移除。

完整更新日志 

完整的更新日志可在ipfs/go-ipfs的Github查看:

https://github.com/ipfs/go-ipfs/blob/master/CHANGELOG.md#0414-2018-03-22

 

【英文原文】

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

Refactoring

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.

IPFS Core API

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

 

ipfs原创,作者:Ironyecho,转载请注明出处:http://ipfser.org/2018/03/28/r34/

21

扫一扫,分享到微信

猜你喜欢

文章评论

电子邮件地址不会被公开。 必填项已用*标注

获取验证码
后发表评论

  • filecoin1

    关注、学习!

    filecoin1
微信公众号

知识星球