* 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)
* 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>
Rename the Transient state on connection to Limited. This is more appropriate and also
doesn't conflict with the transient resource manager scope.
Adds a Limited connectedness state for peers connected to us over Limited connections.
This allows users to ignore such peers if they are interested in only peers connected to
us over Unlimited connections.
For some peers who disconnect before we sent a Connectedness event, we will now
only send a Disconnected event.
---------
Co-authored-by: guillaumemichel <guillaume@michel.id>
Co-authored-by: sukun <sukunrt@gmail.com>
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* Identify should emit useful events after identification
* Compare strings rather than objects
* Include other fields in emitted event
* Sort addrs when comparing in test
* Error if RSA key is too big
* Update core/crypto/rsa_common.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Update core/crypto/rsa_common.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Fix rename
* Make this var again so the tests work
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Remove duplicate `SetProtocol` call
* Don't log if transport ErrListenerClosed
* Close the conn scope in webtransport dial
* Mock resource scope span
* Add transport rcmgr integration test
* PR nits
* Fix flakiness
* Threadsafe way of waiting for all streams
* Expand comment
* tests: add integration tests for gating of outgoing connections
* tests: integrate connection gating tests into the transport tests
* disable gating tests with race detector
* bump go.mod to Go 1.19 and run go fix
* stop using the deprecated io/ioutil package
* bump go.mod to Go 1.19 and run go fix
* bump go.mod to Go 1.19 and run go fix
* bump go.mod to Go 1.19 and run go fix
* stop using the deprecated io/ioutil package
* bump go.mod to Go 1.19 and run go fix
* stop using the deprecated io/ioutil package
* update .github/workflows/go-test.yml
* update .github/workflows/go-check.yml
* update .github/workflows/release-check.yml
* various fixes
* stop using deprecated math/rand.Read
---------
Co-authored-by: web3-bot <web3-bot@users.noreply.github.com>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Change PeerStore interface to use protocol.ID
This reduces the string to protocol.ID translations happening
at various places in the code
* Fix misc cases of protocol.ID conversion
* Merge multistream changes
* Use protocol.ID in network.ConnectionState
* don't update examples
* fix error message tests
* merge new go-multistream changes
* update test-plans go mod
* change transport back to string