* chore: bump deps
* chore: bump deps in test-plans
* Downgrade quic-go to v0.47.0 while we update WebTransport
* Fork webtransport-go
This lets us update quic-go to v0.48.0
* Revert "Fork webtransport-go"
This reverts commit fddad1c95b.
* Revert "Downgrade quic-go to v0.47.0 while we update WebTransport"
This reverts commit 094221dddb.
* Update webtransport-go
* Update webtransport-go usage
* Update go generate
* autonat: fix interaction with autorelay
* Fix race in test
* Use deadline from context if available for DialBack
* Return hasNewAddrs correctly
* nit: cleanup contains check
* Shuffle peers
* nits
* Change comment to indicate the bug
* holepuncher: pass address function in constructor (#2979)
* holepunch: pass address function in constructor
* nit
* Remove getPublicAddrs
---------
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* Make a copy of the multiaddr slice in Addrs()
---------
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* peerstore: limit number of non connected peers in addrbook
* use a pool for expiring addrs
* fix lint
* Remove AddrBook interface from CertifiedAddrBook
* Add helper for TTL is connected
* Keep heapIndex invariant when returing from pool
* Revert accidental benchmark change
* Add test
---------
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* Remove unused resolver in basic host
* Refactor Swarm.resolveAddrs
Refactors how DNS Address resolution works.
* lint
* Move MultiaddrDNSResolver interface to core
* Reserve output space for addresses left to resolve
* feat: core/transport: Add SkipResolver interface (#2989)
* Rebase on top of resolveAddrs refactor
* Add comments
* Sanitize address inputs when returning a reservation message (#3006)
We only need 1 reservation per peer.
In addition, proactively removes relay reservations on disconnecting
from the peer. This helps when the relay client is restarting
frequently.
Method UntagPeer() logs an "info" log message whenever it's called for a peer that is untracked. It generates a lot of noise in the logs for something that is basically harmless.
This commit reduces the log level to "debug" for this message.
* fix: allow punching undialable host public ip
fixes#2913
* chore: use interface listen addrs to enable dctur
* fix: filter public addresses
* chore: remove unused function
* chore: formatting
---------
Co-authored-by: Daniel N <2color@users.noreply.github.com>
* Lint fixes
* Use latest go version for go-check
Fixes nil pointer issue in staticcheck
* Add test_analysis helper script
* Use custom go-test-template
* Add some tests to the test_analysis script
* Always upload test_results db
* Attempt to fix test on windows
* Better if statement
* Try to fix flaky test
* Disable caching setup-go on Windows
* Better if statement
* Tweak
* Always upload summary and artifact
* Close db
* No extra newline
This commit changes the `blackHoleState` type from private to public by renaming it to `BlackHoleState`. This modification allows other packages to access and use this type, which is essential for monitoring and debugging purposes within the libp2p system.
Related issue: #2890
* Add failing proto test
* Add a new proto compilation script
A proto file's *import path* is relative to one of the `--proto-path`s.
Previously, the proto files were compiled separately. Some invocations
used different values for the `--proto_path`, which led to inconsistent
import paths in proto file descriptors.
Typically, this wouldn't be a problem. However, if a downstream project
uses `protoregistry.GlobalFiles` to inspect proto dependencies, it will fail
to find a dependency's file descriptor when the dependency was compiled
with a different `--proto_path`.
By using a single script to generate all protobuf files, we can ensure
the `--proto_path` is always set to the same sane value (the root of the
project, as suggested in the [official documentation]).
[official documentation]: https://protobuf.dev/programming-guides/proto2/#importing
* Add go_package options so scripts/gen-proto.sh succeeds
* Remove undesirable `go:generate protoc` directives
* Run `go generate ./...`
* Script uses arrays, I think we need bash
---------
Co-authored-by: Marco Munizaga <git@marcopolo.io>
Using the `BasicHost` constructor transfers the ownership of the swarm.
This is similar to how using `libp2p.New` transfers the ownership of
user provided config options like `ResourceManager`, all of which are
closed on `host.Close`
* Remove this hack, the new observed address manager just works
* Infer addresses that share the same local thin waist
* Use Interface listen address as well