Marten Seemann
2d490caf44
rcmgr: fix link to dashboards in README ( #2363 )
1 year ago
VM
b4c9fed04a
docs: fix some comments errors ( #2356 )
1 year ago
Sukun
f87f6dbca8
nat: add HasDiscoveredNAT method for checking NAT environments ( #2358 )
* nat: add HasNAT method for checking NAT environments
* rename to better variable
1 year ago
Sukun
73c34f98da
holepunch: add metrics ( #2246 )
* holepunch: add metrics
* don't track addresses
* add cancelled and no_suitable_address state
* separate holepunch dashbords by transport
* fix dashboard fields
* add instance filter to dashboard
* initialise metrics labels with 0
* fix panel names in dashboard
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
1 year ago
Marten Seemann
0f9ad8c242
revert "feat:add contexts to all peerstore methods ( #2312 )" ( #2328 )
1 year ago
Prem Chaitanya Prathi
8864d1c33e
feat:add contexts to all peerstore methods ( #2312 )
1 year ago
Marco Munizaga
e89814c520
swarm: Dedup addresses to dial ( #2322 )
* Dedup addresses to dial
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
* Move DedupAddrs test
* Typo
---------
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
1 year ago
Marten Seemann
a852c6749f
update go-nat to v0.2.0, use context on AddMapping and RemoveMapping ( #2319 )
1 year ago
Marco Munizaga
1f7b0d2add
transport integration tests: add tests for resource manager ( #2285 )
* 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
1 year ago
Sukun
64be725566
swarm: change maps with multiaddress keys to use strings ( #2284 )
* swarm: change maps with multiaddress keys to use strings
* fix test
* fix more flakiness
2 years ago
Marten Seemann
b456165430
webtransport: only add cert hashes if we already started listening ( #2271 )
2 years ago
Marten Seemann
60e9adedf6
remove ugly private mockgen workaround
2 years ago
Marten Seemann
4ee60e39d0
move more of the NAT mapping logging to the NAT manager
2 years ago
Marten Seemann
1ad214650c
nat: replace alloc-heavy nat.Mapping with explicit GetMapping method
2 years ago
Marten Seemann
c4fb97455c
natmgr: remove unused Ready method
2 years ago
Marten Seemann
c62be4081c
nat: use a single Go routine to renew NAT mappings
2 years ago
Marten Seemann
f5cbaf1721
nat: rename NewMapping to AddMapping, remove unused Mapping return value
2 years ago
Marco Munizaga
fbf11bc5c0
Infer public webtransport addrs from quic-v1 addrs. ( #2251 )
* Infer external webtransport addrs from external quic addrs
* Infer external webtransport addrs from external quic addrs is now pure
* Remove ConnManager method
* Nits
* Dedupe addrs
* Revert "Dedupe addrs"
This reverts commit b63155f4a3997d7adfebc337d0262defca329c15.
* Assume input is deduped
2 years ago
Marten Seemann
7dc3b81a0a
basichost: don't allocate when deduplicating multiaddrs ( #2206 )
* basichost: don't allocate when deduplicating multiaddrs
* fix sort.Slice less comparison
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* interop: don't send loopback addrs
---------
Co-authored-by: Marco Munizaga <git@marcopolo.io>
2 years ago
Sukun
952f7cbc5c
autonat: fix flaky TestAutoNATDialRefused ( #2245 )
2 years ago
Marten Seemann
0119e9a2b6
basichost: remove stray print statement in test ( #2249 )
2 years ago
Marten Seemann
cdd0b6056e
chore: update all deps ( #2240 )
2 years ago
Marco Munizaga
3b3f8baf93
correctly handle WebTransport addresses without certhashes ( #2239 )
* Add helpers to transform webtransport multiaddrs in AddrsFactory
* Remove unused line
* PR nits
* Add wrapper around AddrsFactory to fill in missing certhash
* PR nits
* Handle WebTransport multiaddrs in observed addr manager
* Remove unneccessary change
* Remove unused func
* Use SplitLast
* Add comment
* Clone multiaddr before splitting last
* Revert "Clone multiaddr before splitting last"
This reverts commit f168a8e8b6
.
* Wait for certmanager to be instantiated
* Copy addrs slice before modifying
* Fix stalled test
2 years ago
Sukun
15ec149403
autorelay: add metrics ( #2185 )
* autorelay: add metrics
metrics added:
relay finder status
reservation request outcomes
current reservations
candidate circuit v2 support
current candidates
relay addresses updated
num relay address
scheduled work times
* autorelay: fix refresh reservations bug
* fix max value hack
* improve tracking errors in reservation requests
* fix config-query in grafana
* add candidate loop state panel
* fix logging
* reset metrics on relayfinder stop
* update dashboard
* update dashboard
2 years ago
Sukun
0a961d31c3
autonat: don't change status on dial request refused ( #2225 )
* autonat: don't change status on dial request refused
* retry immediately on dial refused
* add retryProbe flag
* fix retryProbe update
* make retryProbe local to background
* fix flaky test
2 years ago
Sukun
88132e976f
autonat: fix closing of listeners in dialPolicy tests ( #2226 )
2 years ago
Sukun
6cab5e8095
relaysvc: flaky TestReachabilityChangeEvent ( #2215 )
2 years ago
Marco Munizaga
950151e861
autorelay: fix busy loop bug and flaky tests in relay finder ( #2208 )
* Don't run clock add in eventually loop
* Fix busy loop
* Fix scheduling bug
* Add new mock clock
* Add busy loop test
* With comments
* Fix comment
* Move mockclock to separate file
* Fix race
* Fix potential deadlock
* Fix flaky TestBackoff
* Fix import
* Fix how mock implements interface
2 years ago
Sukun
9e208249b5
autorelay: remove unused semaphore ( #2184 )
2 years ago
Marten Seemann
0d7e852b0a
basichost: prevent duplicate dials ( #2196 )
2 years ago
Sukun
bfc6fc30de
relay service: add metrics ( #2154 )
* relay service: add metrics
Metrics Added:
ReservationRequest: Opened, Closed, Renewed
ReservationRequestResponseStatus
ReservationRejectionReason
ConnectionRequest: Opened, Closed
ConnectionRequestResponseStatus
ConnectionRejectionReason
ConnectionDuration
BytesTransferred
RelayStatus
* add dashboard and changelog
* bugfix
* add metrics tests
* address review comments
* rename dashboard
* address review comments
* change label to rolling avg
2 years ago
Marco Munizaga
5330570d1c
identify: Fix IdentifyWait when Connected events happen out of order ( #2173 )
* Add test case
* Id works even if Connected notifications happen out of order
* Add IsClosed shim
* Call basichost `.Start()` for all tests
2 years ago
Laurent Senta
7effad77aa
chore: fix ressource manager's README ( #2168 )
2 years ago
Sukun
43fd678024
relay: fix deadlock when closing ( #2171 )
* fix deadlock on relay service close
* clean up background go routine too
* increase test timeout
2 years ago
Hlib Kanunnikov
75efaee5cb
routed host: return connection error instead of routing error ( #2169 )
2 years ago
Sukun
c738a48d02
autonat: don't use autonat for address discovery ( #2148 )
* dont use autonat for address discovery
* dont increase timeout
2 years ago
Marten Seemann
581a015412
swarm: emit PeerConnectedness event from swarm instead of from hosts ( #1574 )
* pass an event bus to the swarm constructor
* make the eventbus parameter a required swarm constructor parameter
* emit Connectedness notifications from the swarm
* remove peer connectedness watchers from hosts
* swarm: emit connectedness events when holding the mutex
2 years ago
Marco Munizaga
29785d22b3
basic_host: Fix flaky tests ( #2136 )
2 years ago
Marco Munizaga
b74205d265
autorelay: refactor relay finder and start autorelay after identify ( #2120 )
* Refactor relay_finder and start autorelay after identify
* Clock fork
* Remove multiple timers and use a single rate limiting chan for findNodes
* Remove clock fork
* Rename
* Use scheduledWork.nextAllowedCallToPeerSource.Add(rf.conf.minInterval)
* Fix flaky test that relied on time
2 years ago
Marco Munizaga
640632419e
don't use the time value from the time.Ticker channel ( #2127 )
2 years ago
Sukun
a491074d89
metrics: add options to disable metrics and to set Prometheus registerer ( #2116 )
* provided a WithRegisterer option for metrics
* provide a libp2p.Option to setup metrics
2 years ago
Marco Munizaga
32f2f25529
Revert mistaken "Bump timeout"
This reverts commit f00c9507c3
.
2 years ago
Marco Munizaga
f00c9507c3
Bump timeout
2 years ago
Marten Seemann
cec8c6584b
remove all circuit v1 related code ( #2107 )
* autorelay: remove support for circuit v1 nodes
* circuitv2: remove v1 backwards compatibility
* remove circuitv1 implementation only used for testing
* remove circuitv1 protocol implementation
2 years ago
Sukun
9f12163a3d
metrics: add no alloc metrics for eventbus, swarm, identify ( #2108 )
* add noalloc tests for identify, eventbus and swarm metrics
* add no cover buildtag
2 years ago
Prithvi Shahi
d42a06d1e6
chore: unify dashboard location ( #2110 )
2 years ago
Sukun
3dcb4b503d
autonat: add metrics ( #2086 )
* add autonat metrics
* add benchmarks
* use increase instead of sum by with rate in dashboard
* add interface assertion
* add no alloc test
* update dashboard
* autonat: minor dashboard tweaks
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2 years ago
Sukun
22954b389e
relaymanager: do not start new relay if one already exists ( #2093 )
* do not start new relay if one already exists
* Update p2p/host/relaysvc/relay.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* test by emitting events
* fix race condition
* increase timeout
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2 years ago
Sukun
84f2278766
autonat: don't emit reachability changed events on address change ( #2092 )
* don't emit events unless reachability changed
* remove nil address check
* fix test assertion
* speed up test
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2 years ago
Sukun
0a40e7c0af
use atomic.Int32 and atomic.Int64 ( #2096 )
2 years ago