Commit Graph

5104 Commits

Author SHA1 Message Date
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
Thomas Eizinger a5d4b2b33c
Migrate to test-plan composite action (#2039)
* Initial migration to test-plan composite action

* Update docs
2023-02-02 08:52:05 -08:00
Marten Seemann 20c975e992
chore: remove license files from the eventbus package (#2042) 2023-02-01 23:51:18 -08:00
Marco Munizaga 753e48e5ce
rcmgr: *: Always close connscope (#2037)
* rcmgr: Fix connection accounting

* Always close conn scope in the case of errors

* circuitv2: fix resource accounting when connection upgrading fails

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-02-01 09:59:30 -08:00
Prithvi Shahi 3031bab81f
chore: remove textual roadmap in favor for Starmap (#2036) 2023-01-31 16:20:05 -08:00
Marco Munizaga 34dc11547a
swarm metrics: fix datasource for dashboard (#2024) 2023-01-27 14:38:21 -08:00
Sukun 6b9c11680e
consistently use protocol.ID instead of strings (#2004)
* 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
2023-01-27 01:39:59 -08:00
Marten Seemann 3919359872
swarm: add a basic metrics tracer (#1973)
* swarm: add very basic metrics for opening and closing connections

* swarm: use a sync.Pool to make metrics collection allocation-free

* swarm: introduce a MetricsTracer interface

* swarm: add the transport to the dial error metric

* swarm: add Grafana dashboard

* swarm: use the prometheus namespace option
2023-01-26 16:18:55 -08:00
Adin Schmahmann d5a280e6f6
Expose muxer ids (#2012)
* docs: remove documentation indicating that mplex is enabled by default

* feat: expose yamux ID as a constant

* feat: expose mplex ID as a constant

* reword muxer config documentation

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-01-25 15:53:43 -08:00
Sukun 084de0692a
Clean addresses with peer id before adding to addrbook (#2007)
* Clean addresses with peer id before adding to addrbook

Fixes: https://github.com/libp2p/go-libp2p/issues/2001

* Filter p2p addresses with invalid peerid

Add error reporting from Host.Connect

* Nits

Co-authored-by: Marco Munizaga <git@marcopolo.io>
2023-01-25 15:53:08 -08:00
Marco Munizaga 6a373312c3
feat: ci test-plans: Parse test timeout parameter for interop test (#2014)
* Parse test timeout parameter for interop test

* Update test-plans/cmd/ping/main.go

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

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-01-25 15:52:41 -08:00
Marco Munizaga faddf1aa41
Export resource manager errors (#2008) 2023-01-23 18:28:21 -08:00
Marten Seemann e004bd3fc5
peerstore: make it possible to use an empty peer ID (#2006) 2023-01-22 20:28:57 +13:00
Marco Munizaga 5b5eea45d3
Add ci flakiness score to readme (#2002) 2023-01-19 13:46:52 -08:00
Antonio Navarro Perez 9760794920
rcmgr: fix: Ignore zero values when marshalling Limits. (#1998) 2023-01-17 17:51:31 -08:00
Marco Munizaga 638329ddb6
CI: Fast multidimensional Interop tests (#1991)
* Test interop on changes

* Add pull request event

* Nits

* Rm un-needed default

* Use build tag

* Point to master for interop-test

* Point to master for interop-test

* Go mod tidy
2023-01-13 13:50:44 -08:00
Prithvi Shahi a4e16efbbe
feat: add some users to the readme (#1981) 2023-01-12 16:46:54 -08:00
Marten Seemann b3ab45431d
ci: use GitHub token to install protoc (#1996)
* ci: use GitHub token to install protoc

* fix: use github.token instead of secrets.GITHUB_TOKEN

Co-authored-by: Piotr Galar <piotr.galar@gmail.com>
2023-01-12 14:59:36 -08:00
Marten Seemann bdbef49cdb
ci: run go generate as part of the go-check workflow (#1986) 2023-01-11 20:34:34 -08:00
Marten Seemann 58c4cb8553
Merge pull request #1979 from libp2p/google-protobuf
switch to Google's Protobuf library, make protobufs compile with go generate
2023-01-11 20:06:41 -08:00
Marten Seemann f1109c59c1 use Google's Protobuf library instead of GoGo 2023-01-12 16:43:50 +13:00
Marten Seemann 8baf05b71d peerstore: remove gogo-specific Protobuf magic 2023-01-09 09:46:30 +13:00
Marten Seemann 6e2f434578 peerstore: move the protobuf to pstoreds 2023-01-08 16:20:51 +13:00
Marten Seemann 4ad3734091
circuitv2: correctly set the transport in the ConnectionState (#1972) 2023-01-06 21:48:12 -08:00
Marten Seemann 2cae0eab9b
roadmap: remove optimizations of the TCP-based handshake (#1959) 2023-01-06 18:35:53 -08:00
Marten Seemann 2ac8a31112
Merge pull request #1975 from libp2p/identify-remove-delta
identify: remove support for Identify Delta
2023-01-06 18:14:52 -08:00
Marten Seemann 5095f44da2 identify: remove snapshot handling 2023-01-07 14:41:29 +13:00