Back to Kubo

go-ipfs changelog v0.11

docs/changelogs/v0.11.md

0.41.070.3 KB
Original Source

go-ipfs changelog v0.11

v0.11.1 2022-04-08

This patch release fixes a security issue wherein traversing some malformed DAGs can cause the node to panic.

See also the security advisory: https://github.com/ipfs/go-ipfs/security/advisories/GHSA-mcq2-w56r-5w2w

Note: the v0.11.1 patch release contains the Docker compose fix from v0.12.1 as well

Changelog

<details> <summary>Full Changelog</summary> - github.com/ipld/go-codec-dagpb (v1.3.0 -> v1.3.2): - fix: use protowire for Links bytes decoding </details>

❤ Contributors

ContributorCommitsLines ±Files Changed
Rod Vagg1+34/-192

v0.11.0 2021-12-08

We're happy to announce go-ipfs 0.11.0. This release comes with improvements to the UnixFS Sharding and PubSub experiments as well as support for Circuit-Relay v2 which sets the network up for decentralized hole punching support.

As usual, this release includes important fixes, some of which may be critical for security. Unless the fix addresses a bug being exploited in the wild, the fix will not be called out in the release notes. Please make sure to update ASAP. See our release process for details.

🛠 BREAKING CHANGES

  • UnixFS sharding is now automatic and enabled by default
    • HAMT-based sharding is applied to large directories (i.e. those that would serialize into block larger than ~256KiB)s. This means importing data via commands like ipfs add -r <directory> may result in different CIDs due to the different DAG representations.
    • Support for Experimental.ShardingEnabled is removed.
  • go-ipfs can no longer act as a Circuit Relay v1
    • Node will refuse to start if Swarm.EnableRelayHop is set to true
    • If you depend on v1 relay service provider, see "Removal of v1 relay service" section for available migration options.
  • HTTP RPC wire format for experimental commands at /api/v0/pubsub changed.

Keep reading to learn more details.

🔦 Highlights

🗃 Automatic UnixFS sharding

Truly big directories can have so many items, that the root block with all of their names is too big to be exchanged with other peers. This was partially solved by HAMT-sharding, which was introduced a while ago as opt-in. The main downside of the implementation was that it was a global flag that sharded all imported directories (big and small).

This release solves that inconvenience by making UnixFS sharding smarter and applies it only to larger directories (i.e. directories that would be at least ~256KiB). This is now the default behavior in ipfs add and ipfs files commands, where UnixFS sharding works out-of-the-box.

🔁 Circuit Relay v2

This release adds support for the circuit relay v2 protocol based on the reference implementation from go-libp2p 0.16.

This is the cornerstone for maximizing p2p connections between IPFS peers. Every publicly dialable peer can now act as a limited relay v2, which can be used for hole punching and other decentralized signaling protocols.

Limited relay v2 configuration options

go-ipfs can now be configured to act as a RelayClient that uses other peers for autorelay functionality when behind a NAT, or provide a limited RelayService to other peers on the network.

Starting with go-ipfs v0.11 every publicly dialable go-ipfs (based on AutoNAT determination) will start a limited RelayService. RelayClient remains disabled by default for now, as we want the network to update and get enough v2 service providers first.

Note: the limited Circuit Relay v2 provided with this release only allows low-bandwidth protocols (identify, ping, holepunch) over transient connections. If you want to relay things like bitswap sessions, you need to set up a v1 relay by some other means. See details below.

Removal of unlimited v1 relay service provider

Switching to v2 of the relay spec means removal or deprecation of configuration keys that were specific to v1.

  • Relay transport and client support circuit-relay v2:
    • Swarm.EnableAutoRelay was replaced by Swarm.RelayClient.Enabled.
    • Swarm.DisableRelay is deprecated, relay transport can be now disabled globally (both client and service) by setting Swarm.Transports.Network.Relay to false
  • Relay v1 service provider was replaced by v2:
    • Swarm.EnableRelayHop no longer starts an unlimited v1 relay. If you have it set to true the node will refuse to start and display an error message.
    • Existing users who choose to continue running a v1 relay should migrate their setups to relay v1 based on js-ipfs running in node, or the standalone libp2p-relay-daemon configured with RelayV1.Enabled set to true. Be mindful that v1 relays are unlimited, and one may want to set up some ACL based either on PeerIDs or Subnets.

🕳 Decentralized Hole Punching (DCUtR protocol client)

We are working towards enabling hole punching for NAT traversal when port forwarding is not possible.

go-libp2p 0.16 provides an implementation of the DCUtR (decentralized hole punching) protocol. It is hidden behind the Swarm.EnableHolePunching configuration flag.

When enabled, go-ipfs will coordinate with the counterparty using a relayed v2 connection, to upgrade to a direct connection through a NAT/firewall whenever possible.

This feature is disabled by default in this release, but we hope to enable it by default as soon the network updates to go-ipfs v0.11 and gains a healthy set of limited v2 relays.

💬 Multibase in PubSub HTTP RPC API

This release fixed some edge cases that were reported by users of the PubSub experiment, getting it closer to becoming a stable feature of go-ipfs. Some PubSub users will notice that the plaintext limitation is lifted: one can now use line breaks in messages published to non-ascii topic names, or even publish arbitrary bytes to arbitrary topics. It required a change to the wire format used when pubsub commands are executed over the HTTP RPC API at /api/v0/pubsub/*, and also modified the behavior of the ipfs pubsub pub command, which now is publishing only a single pubsub message with data read from a file or stdin.

PubSub client migration tips

If you use the HTTP RPC API with the go-ipfs-http-client library, make sure to update to the latest version. The next version of js-ipfs-http-client will use the new wire format as well, so you don't need to do anything.

If you use /api/v0/pubsub/* directly or maintain your own client library, you must adjust your HTTP client code. Byte fields and URL args are now encoded in base64url Multibase. Encode/decode bytes using the ipfs multibase --help commands, or use the multiformats libraries (js-multiformats, go-multibase).

Low level changes:

  • topic passed as URL arg in requests to /api/v0/pubsub/* must be encoded in URL-safe multibase (base64url)
  • data, from, seqno and topicIDs returned in JSON responses are now encoded in multibase
  • Peer IDs returned in from now use the same default text representation from go-libp2p and peerid encoder/decoder from libp2p. This means the same text representation as in as in swarm peers, which makes it possible to compare them without decoding multibase.
  • /api/v0/pubsub/pub no longer accepts data to be passed as URL, it has to be sent as multipart/form-data. This removes size limitations based on URL length, and enables regular HTTP clients to publish data to PubSub topics. For example, to publish some-file to topic named test-topic using vanilla curl, one would execute: curl -X POST -v -F "stdin=@some-file" 'http://127.0.0.1:5001/api/v0/pubsub/pub?arg=$(echo -n test-topic | ipfs multibase encode -b base64url)'
  • ipfs pubsub pub on the command line no longer accepts variadic data arguments. Instead, it expects a single file input or stream of bytes from stdin. This ensures arbitrary stream of bytes can be published, removing limitation around messages that include \n or \r\n.

⚙ New configuration flags

  • Addresses.AppendAnnounce is an array of multiaddrs, similar to Addresses.Announce, except it does not override inferred swarm addresses, but appends custom ones to the list.
  • Pubsub experiments can now be enabled via config, removing the need for CLI flag to be passed every time daemon starts:

🔐 Support for DAG-JOSE IPLD codec

JOSE is a standard for signing and encrypting JSON objects. DAG-JOSE is an IPLD codec based on JOSE and represented in CBOR. Upon encountering the dag-jose multicodec indicator, implementations can expect that the block contains dag-cbor encoded data which matches the IPLD schema from the DAG-JOSE spec.

This work was contributed by Ceramic and acts as a template for future IPFS improvements driven by the real world needs of the IPFS community.

Changelog

❤️ Contributors

ContributorCommitsLines ±Files Changed
Will13+73226/-13048143
Masih H. Derkani99+10549/-5799489
hannahhoward43+5515/-3293233
Daniel Martí60+5312/-2883208
Marten Seemann175+4839/-3254396
Eric Myhre73+3924/-3328175
Jessica Schilling52+2709/-238675
Rod Vagg30+2719/-170379
vyzo10+3516/-17787
Gus Eggert64+1677/-1416147
Adin Schmahmann23+1708/-38195
Lucas Molas14+1557/-36548
Will Scott7+1846/-1534
Steven Allen32+537/-89756
Cory Schwartz3+614/-10912
rht3+576/-47
Simon Zhu9+352/-5116
Petar Maymounkov7+173/-16723
RubenKelevra1+107/-1881
jwh2+212/-807
longfeiW1+4/-24910
guseggert5+230/-2111
Kevin Neaton8+137/-8013
Takashi Matsuda1+199/-05
Andrey Kostakov1+107/-492
Jesse Bouwman1+151/-07
web3-bot39+136/-352
Marcin Rataj16+62/-5725
Marco Munizaga1+118/-02
Aaron Riekenberg4+64/-526
Ian Davis4+81/-327
Jorropo2+79/-196
Mohsin Zaidi1+89/-120
Andey Robins1+70/-33
gammazero3+40/-254
Steve Loeppky2+26/-273
Dimitris Apostolou1+25/-2515
Sudarshan Reddy1+9/-401
Richard Littauer2+42/-13
pymq1+32/-82
Dirk McCormick2+23/-12
Nicholas Bollweg1+21/-01
anorth1+14/-62
Jack Loughran1+16/-02
whyrusleeping2+11/-22
bt901+13/-01
Yi Cao1+10/-01
Max1+7/-31
Juan Batiz-Benet2+8/-22
Keenan Nemetz1+8/-01
muXxer1+3/-31
galargh2+3/-33
Didrik Nordström1+2/-41
Ben Lubar1+3/-31
arjunraghurama1+5/-01
Whyrusleeping1+3/-21
TUSF1+3/-23
mathew-cf1+3/-12
Stephen Whitmore1+2/-21
Song Zhu1+2/-21
Michael Muré1+4/-01
Alex Good1+4/-02
aarshkshah19921+2/-11
susarlanikhilesh1+1/-11
falstack1+1/-11
Michael Vorburger ⛑️1+1/-11
Ismail Khoffi1+1/-11
George Xie1+1/-11
Bryan Stenson1+1/-11
Lars Gierth1+1/-01