This release includes several important changes you should be aware of.
PrivateNetwork Option [BREAKING]
PrivateNetwork option has changed to directly take a pre-shared key. This option used to take an object implementing the protector interface. Unfortunately, the protector interface assumes stream transports and doesn’t extend well to packet-based transports like QUIC.
When you upgrade, you’ll need to use github.com/libp2p/go-libp2p-core/pnet.DecodeV1PSK to decode your pre-shared key, then pass this key into libp2p using the
In this release, stream multiplexers now coalesce multiple writes from multiple streams into a single write to the underlying transport. This slightly increases packet latency but significantly reduces the number of packets libp2p sends which should improve performance and reduce bandwidth overall.
Unfortunately, this optimization that will crash peers running go-libp2p versions prior to v0.0.20 (April 2019) and go-ipfs versions prior to 0.4.21 (May 2019).
Libp2p no longer advertises localhost addresses to peers not running on localhost. This could, in theory, make it harder to dial a peer on the same host. However, this should never be an issue in real-world scenarios.
Libp2p has switched to the zap logging backend by default. To get JSON-encoded Zap logging output, set the
GOLOG_LOG_FMT=json environment variable.