Releases: ipni/go-libipni
v0.5.9
What's Changed
- Fix possible concurrent map write in test by @gammazero in #142
- Update multiaddr dependency by @gammazero in #145
- Add function to create general dagsync blockhook function by @gammazero in #144
Full Changelog: v0.5.8...v0.5.9
v0.5.8
What's Changed
- Bump golang.org/x/crypto from 0.14.0 to 0.17.0 by @dependabot in #139
- Retry fetch request when libp2p stream is reset by @gammazero in #140
- new version by @gammazero in #141
Full Changelog: v0.5.7...v0.5.8
v0.5.7
What's Changed
- Fix leak when find client returns not found by @gammazero in #137
Full Changelog: v0.5.6...v0.5.7
v0.5.6
What's Changed
- correct schema doc by @gammazero in #131
- Bump golang.org/x/net from 0.14.0 to 0.17.0 by @dependabot in #133
- Update dependencies by @gammazero in #134
- New version with updated dependencies by @gammazero in #135
New Contributors
- @dependabot made their first contribution in #133
Full Changelog: v0.5.4...v0.5.6
v0.5.5
What's Changed
- correct schema doc by @gammazero in #131
- Bump golang.org/x/net from 0.14.0 to 0.17.0 by @dependabot in #133
- Update dependencies by @gammazero in #134
New Contributors
- @dependabot made their first contribution in #133
Full Changelog: v0.5.4...v0.5.5
v0.5.4
What's Changed
- Fix tests that were not doing test correctly by @gammazero in #129
- Remove unused addrs from peerstore by @gammazero in #128
Full Changelog: v0.5.3...v0.5.4
v0.5.3
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
What's Changed
- Use sparate path for encrypted find requests by @gammazero in #116
- Drop support for FindBatch API by @gammazero in #120
Full Changelog: v0.5.1...v0.5.2
v0.5.1
What's Changed
- Update dtsync head error message by @gammazero in #118
- Option to specify TLS config for publisher by @gammazero in #115
- Remove redundant data retrieval from linksystem by @gammazero in #117
Full Changelog: v0.5.0...v0.5.1
v0.5.0
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 optionWithStreamHost
. - The
dagsync/p2p/protocol/head
package has moved todagsync/dtsync/head
since it is only used indtsync
. This should not affect any external applications. - The
WithServer
has been renamed toWithStartServer
. - 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 anhttp.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 requestsClientStreamHost
specifies an optional stream based libp2p hostClientHTTPRetry
configures a retriable HTTP client
- The
NewSyncer
function now takes a singlepeer.AddrInfo
instead of a separatepeer.ID
and[]multiaddr.Multiaddr
arguments.
dagsync.Subscriber
API changes:
NewSubscriber
no longer has aHttpClient
option. It now supports the following options:HttpTimeout
which is passed through to the theClientHttpTimeout
optionRetryableHTTPClient
which is passed through to theClientHTTPRetry
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