Repository navigation
addrsmanager: extract out addressing logic from basichost - #3075
Merged
Merged
Conversation
sukunrt
force-pushed
the
sukun/address-service-1
branch
from
December 1, 2024 13:38
d54166d to
3dbd24d
Compare
4 tasks done
sukunrt
force-pushed
the
sukun/address-service-1
branch
5 times, most recently
from
December 2, 2024 14:29
5896f14 to
a9e6585
Compare
sukunrt
force-pushed
the
sukun/autorelay-event
branch
from
December 3, 2024 08:39
2b114a2 to
762a43e
Compare
The goal is to keep modifying it and removing the dependency on basichost by relying on events. At that point, we can expose this as a separate service usable by both basic and blank hosts
sukunrt
force-pushed
the
sukun/address-service-1
branch
from
December 3, 2024 08:45
a9e6585 to
e3367f1
Compare
sukunrt
force-pushed
the
sukun/address-service-1
branch
4 times, most recently
from
December 3, 2024 16:59
d77303e to
e45fe9e
Compare
This was referenced Dec 8, 2024
sukunrt
force-pushed
the
sukun/address-service-1
branch
from
December 30, 2024 15:49
e45fe9e to
5fcce02
Compare
sukunrt
added a commit
that referenced
this pull request
Dec 30, 2024
Ideally, we should rewrite this to have the same semantics, opt into transports not opt out, as `libp2p.New`. But I need webtransport and webrtc support to write address inference tests for #3075 Depending on how disruptive this is to users, we can decide on whether to merge or drop this.
sukunrt
added a commit
that referenced
this pull request
Dec 30, 2024
This adds support for `/webtransport` andn `/webrtc-direct` to GenSwarm. Ideally, we should rewrite this to have the same semantics, opt into transports not opt out, as `libp2p.New`. But I need webtransport and webrtc support to write address inference tests for #3075 Depending on how disruptive this is to users, we can decide on whether to merge or drop this.
sukunrt
force-pushed
the
sukun/autorelay-event
branch
from
February 7, 2025 18:06
58eceee to
d27d90e
Compare
This was pretty expensive before: ``` goos: linux goarch: amd64 pkg: github.com/libp2p/go-libp2p cpu: AMD Ryzen 7 7840U w/ Radeon 780M Graphics BenchmarkAllAddrs-16 16737 122245 ns/op 21240 B/op 218 allocs/op ``` after: ``` goos: linux goarch: amd64 pkg: github.com/libp2p/go-libp2p cpu: AMD Ryzen 7 7840U w/ Radeon 780M Graphics BenchmarkAllAddrs-16 11103236 105.7 ns/op 192 B/op 1 allocs/op ```
sukunrt
added a commit
that referenced
this pull request
Feb 19, 2025
This adds support for `/webtransport` andn `/webrtc-direct` to GenSwarm. Ideally, we should rewrite this to have the same semantics, opt into transports not opt out, as `libp2p.New`. But I need webtransport and webrtc support to write address inference tests for #3075 Depending on how disruptive this is to users, we can decide on whether to merge or drop this.
sukunrt
force-pushed
the
sukun/address-service-1
branch
from
February 20, 2025 11:47
f5e3777 to
a5c5d2a
Compare
sukunrt
force-pushed
the
sukun/address-service-1
branch
from
February 20, 2025 12:15
c5d38c1 to
16a95f3
Compare
sukunrt
marked this pull request as draft
February 20, 2025 12:20
sukunrt
force-pushed
the
sukun/address-service-1
branch
3 times, most recently
from
February 20, 2025 14:14
6af4cd8 to
88725a1
Compare
sukunrt
force-pushed
the
sukun/address-service-1
branch
from
February 22, 2025 14:38
88725a1 to
9905a33
Compare
sukunrt
marked this pull request as ready for review
February 22, 2025 15:05
sukunrt
force-pushed
the
sukun/address-service-1
branch
from
February 22, 2025 15:23
d06ff0c to
f232cfe
Compare
MarcoPolo
reviewed
Feb 25, 2025
MarcoPolo
approved these changes
Feb 25, 2025
MarcoPolo
left a comment
Collaborator
There was a problem hiding this comment.
A couple small things, but looks good
| for _, addr := range resolved { | ||
| dst = append(dst, a.observedAddrsManager.ObservedAddrsFor(addr)...) | ||
| } | ||
| return dst |
Collaborator
There was a problem hiding this comment.
Should we unique this? Do we expect duplicated from the unspecified and resolved addrs?
Member
Author
There was a problem hiding this comment.
It's done eventually in the main loop. Limited the observed addrs to 5 per listen address.
Collaborator
Can you expand a bit on what you mean here please? |
Member
Author
I'm not filtering the return value from observed addrs manager and nat manager for nils. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The goal is to keep modifying it and removing the dependency on basichost by relying on events. At that point, we can expose this as a separate service usable by both basic and blank hosts
Part of #2229
NOTE: There's no fuzzing here. I am thinking of fuzzing the external facing components like observed address manager etc, as opposed to fuzzing something here. @MarcoPolo Do you think we should be defensive and parse return values form each of those components here and filter for nil etc?