fix(deps): update module github.com/libp2p/go-libp2p to v0.40.0 - autoclosed #860
+27
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.39.1
->v0.40.0
Release Notes
libp2p/go-libp2p (github.com/libp2p/go-libp2p)
v0.40.0
Compare Source
⚠ Breaking Change!
Introducing error codes mandated changing the error types returned by stream resets. All checks that depended on checking the error string or comparing equality with
network.ErrReset
, now need to useerrors.Is(err, network.ErrReset)
. More details below in the error codes section.🔦 Highlights
Error Codes
This releases introduces error codes for Stream Reset and Connection Close. This allows sending for more information to the peer about the error condition causing the abort. go-libp2p has already defined some error codes which are useful for many different use cases. You can find them in:
https://github.com/libp2p/go-libp2p/blob/master/core/network/mux.go#L46
and: https://github.com/libp2p/go-libp2p/blob/master/core/network/conn.go#L47
<TODO: Replace with pkg.go.dev link post release>
On streams, you can signal an error on reset by using:
On connections, you can signal an error on close by using:
Not all transports support error codes. Most notably, WebTransport has no support for sending error codes at the moment. See the spec: https://github.com/libp2p/specs/pull/623 for more details.
If you want to define custom error codes for your application protocol, you can reserve a block for your application by opening a PR in the specs repo. The above mentioned spec has details on reserving error codes for applications. Until the spec is merged, you must open a PR targeting the spec's branch.
Breaking Change!
This introduces a breaking change for users who checked stream reset errors by testing for equality with
network.ErrReset
aserr == network.ErrReset
. These tests now need to use theerrors.Is(err, network.ErrReset)
test. Stream Resets now return either*network.StreamError
if the stream was reset by remote, or*network.ConnError
if the connection was closed by remote.What's Changed
New Contributors
Full Changelog: libp2p/go-libp2p@v0.39.0...v0.40.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.