Skip to content

Releases: ipni/go-libipni

v0.5.7

21 Nov 11:41
0c8d003
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.5.6...v0.5.7

v0.5.6

15 Nov 19:54
81798c1
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.5.4...v0.5.6

v0.5.5

04 Nov 09:03
d9e9dec
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.5.4...v0.5.5

v0.5.4

27 Sep 12:14
c074248
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.5.3...v0.5.4

v0.5.3

25 Sep 15:02
f686b6d
Compare
Choose a tag to compare

What's Changed

  • Return same not-found response from dh and non-dh clients by @gammazero in #124
  • Option for double-hashed lookups to return only metadata by @gammazero in #123

Full Changelog: v0.5.2...v0.5.3

v0.5.2

19 Sep 13:42
3bc33f6
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.5.1...v0.5.2

v0.5.1

15 Sep 09:37
d307043
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.5.0...v0.5.1

v0.5.0

31 Aug 21:21
cacbccc
Compare
Choose a tag to compare

What's Changed

Use the new libp2phttp functionality for serving and requesting ipnisync over libp2p and HTTP.

The new publisher can publish ipnisync-http over libp2p if supplied with a stream host, over plain HTTP if supplied with a listen address, or both. The publisher also works as an HTTP handler to allow it to be used with existing HTTP listeners.

The sync client works with ipnisync-http over libp2p, plain HTTP, and legacy data-transfer sync. It is able to detect which protocol and transport to use with any provider, new or old.

Protocol negotiation

When a Syncer is created to sync with a specific advertisement publisher, it first uses libp2phttp to negotiate with the publisher whether to use HTTP with or without libp2p. If the publisher is an older publisher that does not support this negotiation, then the client tries to use plain HTTP or the legacy data-transfer/graphsync protocol depending on the publisher address.

If a publisher is newer, but uses an existing HTTP server, it can still support protocol negotiation by supporting the /.well-known/ HTTP endpoint. Here is an example of adding support for this. This is optional, and the cost for not supporting it is one additional HTTP round trip between the indexer and publisher per sync operation.

API Changes

This version has some minor ipnisync API changes to be aware of.

Publisher API Changes:

  • The NewPublisher function does not take a single HTTP listen address as its first argument. It now takes a list of HTTP address as an option, WithHTTPListenAddrs, since HTTP listen addresses are not required when using a libp2p stream host or with an existing HTTP server.
  • The NewPublisher can be given a libp2p stream host to serve advertisements, by specifying the option WithStreamHost.
  • The dagsync/p2p/protocol/head package has moved to dagsync/dtsync/head since it is only used in dtsync. This should not affect any external applications.
  • The WithServer has been renamed to WithStartServer.
  • A new option, WithRequireTLS tells whether to require https or allow the publisher to serve non-secure http. Default is false, allowing non-secure HTTP.

Sync client API changes:

  • The NewSync function does not take an http.Client. Options are used to configure a default or retryable HTTP client.
  • New options are available to the NewSync function:
    • ClientAuthServerPeerID tells the sync client that it must authenticate the Server's PeerID.
    • ClientHTTPTimeout specifies a time limit for HTTP requests
    • ClientStreamHost specifies an optional stream based libp2p host
    • ClientHTTPRetry configures a retriable HTTP client
  • The NewSyncer function now takes a single peer.AddrInfo instead of a separate peer.ID and []multiaddr.Multiaddr arguments.

dagsync.Subscriber API changes:

  • NewSubscriber no longer has a HttpClient option. It now supports the following options:
    • HttpTimeout which is passed through to the the ClientHttpTimeout option
    • RetryableHTTPClient which is passed through to the ClientHTTPRetry option.

EoL Notice for data-transfer/graphsync

Support for advertisement sync using data-transfer/graphsync is being discontinued in future releases. It remains in this release as a temporary backup in case there is some failure to publish when a publisher upgrades.

Any applications using the dagsync/dtsync package must switch to using dagsync/ipnisync as soon as possible.

Please also read the v0.4.0 Release Notes if converting from an earlier version of this package.

Full Changelog: v0.4.0...v0.5.0

v0.4.0

16 Aug 20:02
e975e29
Compare
Choose a tag to compare

What's Changed

This release contains changes to support the IPNI Provider Specification and to make the dagsync API more specific to IPNI (removing generic selectors, making API aware of IPNI data structures such as advertisements).

As specified in the IPNI Provider Specification, the provider expects HTTP requests made to the content advertisement publisher to have a URL path that ends with /ipni/v1/ad/ and the requested resource (head or CID) to follow that. The client-side code, in the ipnisync package, automatically adds this path to HTTP requests. This change means that old clients will no longer work new (4.0+) Publishers. New (4.0+) clients will work with older Publishers because the older Publishers ignore the HTTP path. If implementing custom HTTP handlers, these changes may affect you.

This release includes API changes to the dagsync package. It also replaces dagsync/httpsync with dagsync/ipnisync and introduces API changes within ipnisync. The API changes in the dagsync package are as follows:

Remove selectors from the dagsync API, specifically the Subscriber API.

Remove the generic Subscriber.Sync function and replace it with functions to perform syncs that previously required the caller to build specific selectors:

New options to specify advertisement chain and entries chain depth limits, instead of having to build these into a selector:

When moving from httpsync to ipnisync, in addition to the package name change, the following API changes are also present:

  • Publisher has new options
    • WithHandlerPath: sets the path used to handle requests to this publisher (before implicit /ipni/v1/ad).
    • WithHeadTopic: sets optional topic returned in a head query response
    • WithServer: does not run HTTP server if false

PRs in this release:

Full Changelog: v0.3.4...v0.4.0

v0.3.4

03 Aug 22:21
52d79f6
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.3.3...v0.3.4