Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update go-multiaddr to v0.15-pre #3145

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

MarcoPolo
Copy link
Collaborator

@MarcoPolo MarcoPolo commented Jan 20, 2025

This kicks off the great multiaddr v0.15 rollout to our dependencies. Tracked in multiformats/go-multiaddr#267.

After this PR is approved, I'll release go-multiaddr v0.15 and start the rollout.

@MarcoPolo MarcoPolo force-pushed the marco/go-multiaddr-refactor branch from 894e6dc to b434cb2 Compare January 29, 2025 20:06
@MarcoPolo MarcoPolo requested a review from sukunrt February 13, 2025 01:29
Copy link
Member

@sukunrt sukunrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some NITs. This is obviously very difficult to review. If there's anything specific you want me to look for I can review again.

Comment on lines +535 to 536
withNewPath := withoutPath.EncapsulateC(relativePathComponent)
return url.Parse("multiaddr:" + withNewPath.String())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

append?

@@ -578,11 +578,11 @@ func checkDialWorkerLoopScheduling(t *testing.T, s1, s2 *Swarm, tc schedulingTes
// failDials is used to track dials which should fail in the future
// at appropriate moment a message is sent to dialState.ch to trigger
// failure
failDials := make(map[ma.Multiaddr]dialState)
failDials := make(map[*ma.Multiaddr]dialState)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add this transform, using the pointer for map key, to release notes if not already added.

@@ -28,25 +28,25 @@ func ToQuicMultiaddr(na net.Addr, version quic.Version) (ma.Multiaddr, error) {

func FromQuicMultiaddr(addr ma.Multiaddr) (*net.UDPAddr, quic.Version, error) {
var version quic.Version
var partsBeforeQUIC []ma.Multiaddr
ma.ForEach(addr, func(c ma.Component) bool {
var partsBeforeQUIC ma.Multiaddr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initialize with capacity?

@@ -419,7 +419,7 @@ func (t *transport) Resolve(_ context.Context, maddr ma.Multiaddr) ([]ma.Multiad
if err != nil {
return nil, err
}
return []ma.Multiaddr{beforeQuicMA.Encapsulate(quicComponent).Encapsulate(sniComponent).Encapsulate(afterQuicMA)}, nil
return []ma.Multiaddr{beforeQuicMA.EncapsulateC(quicComponent).EncapsulateC(sniComponent).Encapsulate(afterQuicMA)}, nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be a single append?

@MarcoPolo MarcoPolo mentioned this pull request Feb 14, 2025
17 tasks
@sukunrt
Copy link
Member

sukunrt commented Feb 14, 2025

As there are no changes to go-multiaddr-fmt, does it mean it's already compatible with the new go-multiaddr representation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants