Commit Graph

5130 Commits

Author SHA1 Message Date
Marco Munizaga 24f8bbbcd7
Add logging 2023-02-24 10:00:00 -08:00
Marco Munizaga 1c589b9f22
Use eventually equal helper in connmgr tests 2023-02-22 08:52:53 -08:00
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
2023-02-20 22:48:17 -08:00
Sukun d9004d21b4
swarm: add ip_version to metrics (#2114)
* add ip_version to swarm metrics

* use "unknown" as a default for the IP version

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-02-18 15:11:18 -08:00
Marco Munizaga 32f2f25529 Revert mistaken "Bump timeout"
This reverts commit f00c9507c3.
2023-02-17 23:04:59 +00:00
Marco Munizaga f00c9507c3 Bump timeout 2023-02-17 23:00:49 +00:00
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
2023-02-16 21:39:36 -08:00
Marten Seemann d686dbc79e
quic: don't send detailed error messages when closing connections (#2112) 2023-02-16 21:39:02 -08:00
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
2023-02-16 19:57:44 -08:00
Marten Seemann 6c60c00673
chore: fix typo in Changelog (#2111)
* chore: fix typo in Changelog

* fix autonat dashboard loc

---------

Co-authored-by: Prithvi Shahi <shahi.prithvi@gmail.com>
2023-02-16 19:53:53 -08:00
Prithvi Shahi 35c8300400
chore: update changelog (#2109) 2023-02-16 12:47:01 -08:00
Prithvi Shahi d42a06d1e6
chore: unify dashboard location (#2110) 2023-02-16 12:46:43 -08:00
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>
2023-02-15 22:10:38 -08:00
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>
2023-02-15 21:13:20 -08:00
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>
2023-02-15 14:42:09 -08:00
Prithvi Shahi 6e9dd01629
chore: update release.md (#2090) 2023-02-15 14:03:18 -08:00
Prithvi Shahi 7d20a45bff
chore: modify changelog entries (#2101) 2023-02-14 17:29:07 -08:00
Marco Munizaga e8d6f671a0
Introduce a changelog (#2084) 2023-02-14 15:49:56 -08:00
Sukun 0a40e7c0af
use atomic.Int32 and atomic.Int64 (#2096) 2023-02-14 12:52:55 -08:00
Sukun 3d9cc0176f
change atomic.Value to atomic.Pointer (#2088) 2023-02-13 18:47:34 -08:00
Marco Munizaga a857d40ee6
interop-tests: use new action with s3 caching (#2076)
* Use new test action

* Use master
2023-02-13 16:12:48 -08:00
Sukun ee07b39ad9
use atomic.Bool instead of int32 operations (#2089) 2023-02-13 15:08:28 -08:00
web3-bot 3a66ff89a1
sync: update CI config files (#2073)
* 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>
2023-02-12 01:18:10 -08:00
Marco Munizaga 985683722c
chore: update examples to v0.25.1 (#2080) 2023-02-11 13:57:03 -08:00
Marco Munizaga 5741b6c9bb
v0.25.1 (#2082) 2023-02-09 19:08:39 -08:00
Marco Munizaga 91d3a10912
chore: update go-multistream (#2081)
* Update go-multistream

* Mod tidy in test-plans
2023-02-09 16:39:14 -08:00
Marco Munizaga 5811309d22
Start host in mocknet (#2078) 2023-02-09 15:55:27 -08:00
Marco Munizaga f0af39e7b7
Release v0.25.0 (#2077) 2023-02-09 08:38:51 -08:00
Marten Seemann 5f8fe94f90
identify: add some basic metrics (#2069) 2023-02-09 16:33:35 +11:00
Marten Seemann a8d6111ba9
p2p/test/quic: use contexts with a timeout for Connect calls (#2070) 2023-02-09 16:32:27 +11:00
Marco Munizaga f4fc85de03
feat!: rcmgr: Change LimitConfig to use LimitVal type (#2000)
* rcmgr: Change LimitConfig to use LimitVal type

* Nits

* Remove DefaultReifiedLimits

* Use pointers for optional ResourceLimits

* Reify a nil pointer with defaults

* Fix maxints

* Move helper

* Return nil if everything is default

* Check for nil pointer

* Change terms

* Add IsDefault helper

* Use values instead of pointers for PartialLimitConfig

* Remove references to reify

* Unmarshal 0 limits as block all

* ResourceLimits can build on Limits interface objs

* Convert max int to unlimited

* Remove ToLimitConfigWithDefaults

* Rename to ToPartialLimitConfig
2023-02-08 17:48:58 -08:00
Marten Seemann 235f25b487
identify: refactor sending of Identify pushes (#1984)
* identify: cache the snapshot

* identify: refactor sending of Identify pushes

* identify: fix concurrency when sending pushes

* identify: fix timestamp handling

* identify: remove unneeded pushSemaphore

* identify: improve logging

* identify: use a sequence number instead of a timestamp

* identify: start with an empty snapshot

* identify: wait until we've actually finished setting up
2023-02-08 14:44:33 -08:00
Marten Seemann ad2f6d0223
chore: update webtransport-go to v0.5.1 (#2072) 2023-02-09 10:43:12 +13:00
Marco Munizaga 2f7aff277d
Update interop to match spec (#2049) 2023-02-08 08:35:55 -08:00
Marten Seemann 635cc650cf
chore: git-ignore various flavors of qlog files (#2064) 2023-02-07 21:10:50 -08:00
Marten Seemann 313b080ea4
rcmgr: add libp2p prefix to all metrics (#2063) 2023-02-06 19:58:12 -08:00
Marco Munizaga 27cce4fa78
websocket: Replace gorilla websocket transport with nhooyr websocket transport (#1982)
* Replace gorilla websocket transport with nhooyr websocket transport

* Bound read retry attempts

* Nit

* Go mod tidy

* Add comment
2023-02-06 19:35:07 -08:00
Marco Munizaga 97af39a2ed
rcmgr: Use prometheus SDK for rcmgr metrics (#2044)
* Replace OpenCensus with Prometheus Go SDK

Allows for much more efficient metric collecting

* PR comments

* Try a different way of testing noallocs

* CI fiddling

* CI fiddling

* Undo debug change

* Return early

* Debug

* Try AllocsPerRun

* Try gosched in noop

* Use AllocsPerRun

* Try without cover

* Use tag

* Revert "Try without cover"

This reverts commit e91b1e8f0d0ffbe6842a37925eb72e0177bf0773.

* Cleanup debug code

* Use global string slice pool
2023-02-06 19:29:58 -08:00
Sukun f9c02c1e46
autorelay: Split libp2p.EnableAutoRelay into 2 functions (#2022)
* Split libp2p.EnableAutoRelay into 2 functions

Provide two specific ways to enable the autorelay subsystem
libp2p.EnableAutoRelayWithStaticRelays
libp2p.EnableAutoRelayWithPeerSource

* remove minInterval from WithPeerSource

* Use PeerSource type

* Fix typo

* Update p2p/host/autorelay/options.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

---------

Co-authored-by: Marco Munizaga <git@marcopolo.io>
Co-authored-by: Marco Munizaga <marco@marcopolo.io>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-02-06 19:26:56 -08:00
Marten Seemann e847002522
set names for eventbus event subscriptions (#2057) 2023-02-06 16:27:49 -08:00
Marco Munizaga b1a6822f1c
Test cleanup (#2053) 2023-02-06 16:25:08 -08:00
Marten Seemann 31966fbb05
metrics: use a single slice pool for all metrics tracer (#2054) 2023-02-07 09:18:54 +13:00
Sukun 3598171505
eventbus: add metrics (#2038)
* add events emitted metric to eventbus

* properly export grafana dashboard

* Add eventbus subscriber and notification time metrics

* expose name in subscription

* use atomic.AddInt64 for backwards compatibility

* make metrics optin

* update dashboard json

* follow options constructor pattern for eventbus

* remove unused type

* Review comments

* remove event name

* remove whitespace diff

* address review changes. remove notification time

* fix subscribers count

* make subscriber queue state timeline

* allow custom registerer. Make queue length gauge

* eventbus: remove package version from subscriber metrics

* eventbus: minor dashboard tweaks

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-02-04 14:13:30 -08:00
Marten Seemann 5da84975bf
quic: disable sending of Version Negotiation packets (#2015) 2023-02-03 17:13:56 -08:00
Marten Seemann 079dbfa364
p2p/test: fix flaky notification test (#2051) 2023-02-02 22:42:51 -08:00
Marten Seemann 8c198c6720
Merge pull request #1971 from libp2p/prometheus-registration
quic, tcp: only register Prometheus counters when metrics are enabled
2023-02-02 19:08:05 -08:00
Marten Seemann 5a5296ae19
p2p/test: add test for EvtLocalAddressesUpdated event (#2016) 2023-02-02 19:03:04 -08:00
Marten Seemann d5a3fb16e2
quic / webtransport: extend test to test dialing draft-29 and v1 (#1957) 2023-02-02 19:02:50 -08:00
Marten Seemann 6ebdb174eb
holepunch: fix flaky by not remove holepunch protocol handler (#1948) 2023-02-02 19:02:29 -08:00
Marten Seemann 8ae7a37916
use quic-go and webtransport-go from quic-go organization (#2040) 2023-02-02 18:08:44 -08:00