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

update libp2p to v0.32.2 #41

Merged
merged 3 commits into from
Aug 13, 2024
Merged

Conversation

envestcc
Copy link
Member

No description provided.

p2p.go Outdated
}

if !cfg.SecureIO {
opts = append(opts, libp2p.NoSecurity)
} else {
opts = append(opts, libp2p.Security(secio.ID, secio.New))
// opts = append(opts, libp2p.Security(secio.ID, secio.New))
Copy link
Member

Choose a reason for hiding this comment

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

this is not needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

secio is already deprecated:

secio is not maintained any more, and we advise against using it.
Use go-libp2p-tls and go-libp2p-noise instead.

and tls and noise is the two default security of libp2p, so we can just remove it

@@ -634,7 +642,7 @@ func (h *Host) AddBootstrap(bootNodeAddrs []multiaddr.Multiaddr) error {
}

// HostIdentity returns the host identity string
func (h *Host) HostIdentity() string { return h.host.ID().Pretty() }
func (h *Host) HostIdentity() string { return h.host.ID().String() }
Copy link
Member

@dustinxie dustinxie Jul 26, 2024

Choose a reason for hiding this comment

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

confirm Pretty() is renamed to String()?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, they are all base58-encoded

}

// relay option
if cfg.Relay == "active" {
opts = append(opts, libp2p.EnableRelay(relay.OptActive, relay.OptHop))
opts = append(opts, libp2p.EnableRelay())
Copy link
Member

Choose a reason for hiding this comment

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

could you confirm

Copy link
Member Author

Choose a reason for hiding this comment

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

there is no options any more in the new version.

@envestcc envestcc merged commit 489210d into iotexproject:master Aug 13, 2024
1 check passed
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