Skip to content

v0.29.0

Compare
Choose a tag to compare
@jacobheun jacobheun released this 27 Aug 14:56
bbf8ef7

🔦 Highlights

🔒Signed Peer Records

A libp2p node shares its data publicly (e.g through the DHT) or relies on potentially untrustworthy intermediaries to relay information. This might have consequences as the peer data can be tempered by a third party.

A Signed Peer Record is an all-purpose data container that includes a signature of the data, so we can verify that the data came from a specific peer and that it hasn't been tampered with.

Signed peer records are now exchanged in the identify protocol and in gossipsub peer exchange (introduced in gossipsub 1.1).

🛡️Gossipsub v1.1

The libp2p-gossipsub javascript implementation is now upgraded according to the Gossipsub v1.1 spec and it packs several security hardening extensions, thanks to ChainSafe ❤️ . You can read more about it in its release blogpost.

We leveraged this update to rethink the pubsub interface, in order to make it easier and straightforward, as well as to be consistent with the API of the routers. Moreover, the interface was also reconstructed to ease new pubsub router implementations. This means less code in the libp2p bundle, as well as less code to maintain and test.

Uint8array replace Buffer

Aiming to improve libp2p browser support, we are moving away from node core modules unless we can guarantee that the code we are writing will not run in a browser. It is worth mentioning that modern JavaScript runtimes have TypedArrays such as Uint8Array backed by ArrayBuffers. All libp2p dependencies were also updated to use Uint8Array.

Part of the larger endeavour in ipfs/js-ipfs#3220

🏗 API Changes

The pubsub API is being updated to be consistent with the new js-libp2p-interfaces/src/pubsub.

All the API parameters and return values that used Buffer are now using Uint8array.

You can check the full details about these changes in the Migrating to libp2p@0.29 doc.

Bug Fixes

  • do not return self on peerstore.peers (15613cc)
  • peer record interop with go (#739) (93dda74)
  • replace node buffers with uint8arrays (#730) (1e86971)
  • revert new identify protocol versions (3158366)
  • signature compliant with spec (4ab125e)

Chores

  • update travis to use node lts and stable (098f3d1)

Features

  • cerified addressbook (8f2e690)
  • create self peer record in identify (8a97dde)
  • exchange signed peer records in identify (e50f0ee)
  • gossipsub 1.1 (#733) (55c9bfa)
  • signed peer records record manager (3e5d450)

Reverts

  • reapply "fix: throw if no conn encryption module provided (#665)" (689f90a)

BREAKING CHANGES

  • pubsub implementation is now directly exposed and its API was updated according to the new pubsub interface in js-libp2p-interfaces repo

    • All deps used by this module now use Uint8Arrays in place of node Buffers
  • fix: update records to use uint8array

  • this drops testing support in node 10.