Commit Graph

290 Commits

Author SHA1 Message Date
Marten Seemann 31093195b5
chore: update webtransport-go to v0.5.2 (#2149) 2023-02-27 12:34:18 -08:00
Marten Seemann c1cfe6c16e
relay: initialize the ASN util when starting the service (#2143)
* relay: initialize the ASN util when starting the service

* Revert "Fix flaky TestMetricsNoAllocNoCover test (#2142)"

This reverts commit cbcdd79084.
2023-02-24 14:56:35 -08:00
Marten Seemann c03190e1ca
chore: update quic-go to v0.33.0 (#2124) 2023-02-22 14:04:31 -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 91d3a10912
chore: update go-multistream (#2081)
* Update go-multistream

* Mod tidy in test-plans
2023-02-09 16:39:14 -08:00
Marten Seemann ad2f6d0223
chore: update webtransport-go to v0.5.1 (#2072) 2023-02-09 10:43:12 +13: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
Marten Seemann 8ae7a37916
use quic-go and webtransport-go from quic-go organization (#2040) 2023-02-02 18:08:44 -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 bdbef49cdb
ci: run go generate as part of the go-check workflow (#1986) 2023-01-11 20:34:34 -08:00
Marten Seemann f1109c59c1 use Google's Protobuf library instead of GoGo 2023-01-12 16:43:50 +13:00
Marten Seemann a9ec918148
core/crypto: drop all OpenSSL code paths (#1953) 2023-01-06 17:18:13 -08:00
muXxer 09c59cbbfb
chore: use generic LRU cache (#1980) 2023-01-05 12:19:53 -08:00
Marten Seemann 12131eef23
webtransport: update webtransport-go to v0.4.3 (#1968) 2022-12-29 18:22:11 -08:00
Marten Seemann e368799d18
quic: update quic-go to v0.31.1 (#1942) 2022-12-08 13:14:31 -08:00
Marten Seemann d31bf35522
webtransport: update webtransport-go to v0.4.2 (#1941) 2022-12-08 11:51:59 -08:00
Marten Seemann ef603f4dc6
chore: update deps (#1932) 2022-12-05 22:26:08 -08:00
Marco Munizaga dc7f64e480
chore: update webtransport-go to get fix (#1924) 2022-11-29 11:53:25 -08:00
Marten Seemann f73205096f
quic / webtransport: make it possible to listen on the same address / port (#1905)
* quic: add an integration test for QUIC version support

* quic: refactor the stateless reset test

* quic: simplify the interface of the noreuseConn

DecreaseCount now closes the underlying UDP conn, so that callers don't
need to pay attention if they're dealing with a reuseConn or a
noreuseConn.

* implement a quicreuse to manage QUIC connections

* quicreuse: introduce options

* config: construct the quicreuse.ConnManager using fx

* webtransport: use the quicreuse

* add integration test for QUIC and WebTranport sharing the same UDP addr

* Handle errors in accept loop goroutine

* Add comment

* Remove todo

* Rename mutexes

* Cleanup extra close

* Only log on err

* Use webtransport-go 0.4.0

* Fix expected error

Co-authored-by: Marco Munizaga <git@marcopolo.io>
2022-11-28 15:55:38 -08:00
Marten Seemann 26a5edf765
webtransport: update webtransport-go to v0.3.0 (#1895) 2022-11-21 18:59:45 -08:00
Marco Munizaga 86d5a5643e
Update go-netroute so that we get the correct priority of routes (#1902) 2022-11-18 13:10:32 -08:00
Marco Munizaga 0b4867c117
feat: quic,webtransport: enable both quic-draft29 and quic-v1 addrs on quic. only quic-v1 on webtransport (#1881)
* transport.Listener  returns a list of multiaddrs

* Support both QUIC versions in QUIC transport

* Support only QUIC v1 in webtransport

* Update dialMatcher

* Update tests

* Only use draft 29 when dialing if the server is a draft 29 server

* Removes QUIC draft 29 addrs if we have a QUIC v1 addr

* Lint fix

* Add changes to deterministic certhashes after rebase

* Update p2p/transport/quic/options.go

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

* Update p2p/transport/quic/listener.go

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

* Update p2p/transport/quic/quic_multiaddr.go

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

* Stylize QUIC correctly

* Update doc around ListenClose

* Preallocate a bit extra to avoid paying for an allocation later

* Keep a list of multiaddrs, then join

* PR nits

* Close transport or listener just once

* Update go-multiaddr

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-11-17 10:01:19 -08:00
Marten Seemann 8a05c48665
quic: update quic-go to v0.31.0 (#1882) 2022-11-16 16:26:31 -08:00
Marten Seemann 1367a62d52 use fx dependency injection to construct transports 2022-11-10 10:07:15 +00:00
Marten Seemann b50b4609ab webtransport: use the rcmgr to control flow control window increases 2022-10-24 13:24:06 +01:00
Marten Seemann 012b8ddac4
chore: update quic-go to v0.30.0 (#1838) 2022-10-23 03:37:27 -07:00
Marten Seemann a98397f6dd
chore: update webtransport-go to v0.1.1 (#1776) 2022-09-23 09:34:26 -07:00
Marten Seemann 9d316fa393
chore: update deps (#1767) 2022-09-20 12:23:04 -07:00
Marco Munizaga f654b4bd69
Add Resolver interface to transport (#1719)
* Add Resolver interface to transport

* Move resolve test to swarm_dial_test

* Use proper peer id in test

* Only import go-multiaddr once

* Cleanup

* Use SNI in websocket

* Update go-multiaddr

* Update p2p/net/swarm/swarm.go

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

* PR comments on websocket.go

* Use unresolved/resolved map

* Set sni

* Refactor websocket multiaddr parsing code, add server test

* Delete superflous helpers

* Update callsites

* Fix typo in p2p/transport/websocket/websocket.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-09-13 09:36:26 -07:00
Marten Seemann ff60c5d55c
yamux: pass constructors for peer resource scopes to session constructor (#1739) 2022-09-08 06:37:56 -07:00
Marten Seemann 73b3d566f3 webtransport: adjust import paths 2022-09-07 12:46:35 +03:00
Marten Seemann 11279c65c9
quic: update quic-go to v0.29.0 (#1723) 2022-09-03 03:57:54 -07:00
Marten Seemann 90654ffb41 chore: update dependencies 2022-08-19 10:46:54 +03:00
Jorropo 52b2eb4b85
crypto: add better support for alternative backends (#1686) 2022-08-19 00:13:18 -07:00
Dave Collins 8cf67ba1d0
crypto/secp256k1: Remove btcsuite intermediary. (#1689)
This updates the core/crypto/secp256k1 code to make use of the
dcrec/secp256k1/v4 module directly instead of using btcec/v2 which
itself is just a shim around dcrec/secp256k1/v4 anyway.

This has the benefit of removing the additional
github.com/btcsuite/btcd/chaincfg/chainhash dependency since
dcrec/secp256k1/v4 is its own module and does rely on it.

It also updates to the latest v4.1.0 release which implements direct key
generation and has some other nice optimizations that speed up signature
verification as compared to the v4.0.1 release.
2022-08-18 11:17:00 -07:00
Marten Seemann d4e64c727f stop using go-libp2p-testing peer ID generation functions 2022-08-17 17:37:24 +03:00
Marten Seemann 4623690009 switch from github.com/libp2p/go-libp2p-core to core 2022-08-17 17:13:02 +03:00
Marten Seemann 40727b1b00 switch from github.com/libp2p/go-eventbus to p2p/host/eventbus 2022-08-17 12:20:25 +03:00
Marten Seemann 6631bfb011
basichost: remove usage of MultistreamServerMatcher in test (#1680) 2022-08-17 02:08:40 -07:00
web3-bot eff72c4afa
sync: update CI config files (#1678)
* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* run gofmt -s

* update .github/workflows/go-test.yml

* update .github/workflows/go-check.yml

* stop using the deprecated io/ioutil package

Co-authored-by: web3-bot <web3-bot@users.noreply.github.com>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-08-17 01:05:51 -07:00
Marten Seemann 6bd5e04960 switch from github.com/libp2p/go-libp2p-resource-manager to p2p/host/resource-manager 2022-08-15 13:19:13 +03:00
Marten Seemann ab634d2ba1 switch from github.com/libp2p/go-libp2p-peerstore to p2p/host/peerstore 2022-08-15 12:29:16 +03:00
Marten Seemann 7facd81bba
ping: optimize random number generation (#1658) 2022-07-13 04:32:57 -07:00
Steven Allen 8d72753fec
chore: update go-multihash to remove blake2b-simd dep (#1656)
We now use the go dev's version, which is faster. Unfortunately, minio's
sha256 implementation is still significantly faster than the built-in
version, so we can't drop that yet.

part of #1646
2022-07-13 10:31:46 +00:00
Steven Allen 5eaa48fbab
chore: remove duplicate clock dep (#1654) 2022-07-12 06:23:34 -07:00
Marco Munizaga 81f973f9db
chore: update core dep (#1641)
* Update core dep

* Downgrade grpc issue due to: https://github.com/weaveworks/common/issues/239

* Use released versions for resource-manager and go-libp2p-core

* Use released version of go-libp2p-testing
2022-07-07 16:07:07 -07:00
Marten Seemann e477efda73
use autoscaling limits (#1637) 2022-07-03 10:04:29 -07:00
Marten Seemann 0d7f192a0b
chore: update deps (#1634) 2022-07-02 01:03:25 -07:00
Marco Munizaga 3eb35223a7
Pass endpoint information to resource manager's OpenConnection (#1633)
* Move mux testsuite to here

* Update OpenConnection call sites to pass in endpoint information

* Go mod update

* Use proper versions for deps
2022-07-01 15:43:42 -07:00