Skip to content

feat: AutoTLS with AutoNATv2 client #10835

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

Merged
merged 8 commits into from
Jun 16, 2025
Merged

feat: AutoTLS with AutoNATv2 client #10835

merged 8 commits into from
Jun 16, 2025

Conversation

sukunrt
Copy link
Contributor

@sukunrt sukunrt commented Jun 10, 2025

This updates libp2p and autotls to test changes autonatv2 changes. Post this we'd not need to have a large registration delay.
The corresponding autotls change is here:

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thank you @sukunrt, fixed CI and took this for a spin and it seems to work as expected.

Two asks:

  • One CI test failure remains: TestDHTConnectivityFast from ./test/integration/wan_lan_dht_test.go started failing
    • I've re-run it and it fails every time. I'm not familiar with it, it was introduced in 2020 before my time in go-ipfs (#7151). Mind taking a look?
  • Is this PR effectively disabling AutoNAT v1 client or is go-libp2p node running both? p2p-forge/client seems to support both, which is good for transition period, but unclear if both events are emitted by go-libp2p v0.42.0-alpha

@sukunrt
Copy link
Contributor Author

sukunrt commented Jun 12, 2025

Is this PR effectively disabling AutoNAT v1 client or is go-libp2p node running both? p2p-forge/client seems to support both, which is good for transition period, but unclear if both events are emitted by go-libp2p v0.42.0-alpha

go-libp2p v0.42 supports both and depends on both. Autorelay still uses autonatv1.
go-libp2p v0.43 will stop using autonatv1 internally. I don't mind supporting autonatv1 for a couple more releases, but users can safely stop using it.

So kubo can remove autonatv1 from go-libp2p v0.43 onwards.

@sukunrt sukunrt force-pushed the sukun/autonatv2-check branch from 12684e9 to e295cdb Compare June 12, 2025 18:54
@sukunrt
Copy link
Contributor Author

sukunrt commented Jun 12, 2025

One CI test failure remains: TestDHTConnectivityFast from ./test/integration/wan_lan_dht_test.go started failing
I've re-run it and it fails every time. I'm not familiar with it, it was introduced in 2020 before my time in go-ipfs (#7151). Mind taking a look?

This is a mocknet bug. The new addrs manager depends on the new listen addrs event from the swarm. Fixed mocknet to send this event and to use mocknet.Listen instead of peerstore.AddAddr to add a new address to the host.

@lidel lidel changed the title update autotls; libp2p to use autonatv2 feat: AutoTLS with AutoNATv2 Jun 16, 2025
@lidel lidel marked this pull request as ready for review June 16, 2025 20:21
@lidel lidel requested a review from a team as a code owner June 16, 2025 20:21
@lidel lidel changed the title feat: AutoTLS with AutoNATv2 feat: AutoTLS with AutoNATv2 client Jun 16, 2025
@lidel lidel force-pushed the sukun/autonatv2-check branch from 55ac0c7 to 7eeda03 Compare June 16, 2025 22:05
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thank you @sukunrt!

I've switched this PR to commit from main branch at https://github.com/ipshipyard/p2p-forge with your fix.

On top of green CI, I did basic manual regression/smoke-tests and AutoTLS works as expected for IPv4, I'm going to merge this so we can include it in RC1.

Once we have final go-libp2p 0.42, we can bump go.mod before final Kubo 0.36.

@lidel lidel merged commit d70f642 into master Jun 16, 2025
17 checks passed
@lidel lidel deleted the sukun/autonatv2-check branch June 16, 2025 22:29
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