Marco Munizaga
86a6720a62
autonat: Clean up after close ( #2749 )
* Clean up after autonat
* Close
7 months ago
Marten Seemann
9d149fa3cb
use Fx to start and stop the host, swarm, autorelay and quicreuse ( #2118 )
* config: refactor AutoNAT construction into separate method
* config: use a lifecycle hook to start listening on swarm addresses
* use Fx to construct the host
* add a test for constructing a routed host
* use Fx hooks to start the host
* config: use Fx lifecycle hooks to start AutoRelay and for PeerRouting
* basichost: don't close the swarm
The swarm is not constructed by the basic host, thus is shouldn't be
closed by it.
* config: use Fx hook to close the quicreuse connection manager
* test for goroutine leaks when starting/stopping fx
To do this, I've had to move a few leaky tests into a separate package.
I've filed a bug for the AutoNAT issue (#2743 ) but the "error on
startup" issue is going to require some pretty invasive changes (we need
to construct _then_ start).
* go fmt
* Ignore one more top function
* Typo
* Ignore any not top
---------
Co-authored-by: Sukun <sukunrt@gmail.com>
Co-authored-by: Steven Allen <steven@stebalien.com>
Co-authored-by: Marco Munizaga <git@marcopolo.io>
8 months ago
Sukun
eaf4103077
chore: update deps for v0.33 ( #2713 )
9 months ago
Sukun
c8024ff887
chore: drop support for go1.20 ( #2708 )
9 months ago
dozyio
e3b0a86e86
chore: testify fix got, expected transpositions ( #2666 )
* chore: testify lint fixes
* chore: revert t.error replacements
* chore: revert errNotWebSocketAddress
---------
Co-authored-by: Sukun <sukunrt@gmail.com>
9 months ago
GoodDaisy
a759ed5548
chore: fix typos ( #2694 )
9 months ago
Håvard Anda Estensen
c6e99f10af
chore: remove unnecessary conversions ( #2680 )
10 months ago
shuoer86
3089ac3061
chore: fix typos ( #2608 )
Co-authored-by: Sukun <sukunrt@gmail.com>
12 months ago
Jorropo
2c433852f7
swarm: fix timer Leak in the dial loop ( #2636 )
1 year ago
Marten Seemann
81d5c0c835
swarm: fix recursive resolving of DNS multiaddrs ( #2564 )
* swarm: fix recursive resolving of DNS multiaddrs
* add a test case
1 year ago
Marten Seemann
210133267d
quic: update quic-go to v0.39.1, set a static resumption token generator key ( #2572 )
1 year ago
Marten Seemann
c4bf8a1596
swarm: use typed atomics ( #2612 )
1 year ago
Sukun
f5493140ff
swarm: cleanup stream handler goroutine ( #2610 )
1 year ago
Sukun
f4b7369658
swarm: use happy eyeballs ranking for TCP dials ( #2573 )
1 year ago
Sukun
17a464978a
swarm: wait for transient connections to upgrade for NewStream ( #2542 )
1 year ago
Dennis Trautwein
1195bf500a
swarm: add loopback to low timeout filter ( #2595 )
1 year ago
piersy
7f72151bcc
config: warn if connmgr limits conflict with rcmgr ( #2527 )
Co-authored-by: Sukun <sukunrt@gmail.com>
1 year ago
Marten Seemann
f6995b14ea
update gomock to v0.3.0 ( #2581 )
1 year ago
Sukun
70d31da69b
swarm: fix DialPeer behaviour for transient connections ( #2547 )
1 year ago
Marten Seemann
32f9239693
core/peer: remove deprecated ID.Pretty method ( #2565 )
* core/peer: remove deprecated ID.Pretty method
* Update p2p/net/connmgr/decay.go
1 year ago
Sukun
d08bcd9c0f
mock: use go.uber.org/mock ( #2540 )
1 year ago
Marten Seemann
c2f0e1333e
upgrader: drop support for multistream simultaneous open ( #2557 )
* upgrader: drop support for multistream simultaneous open
* upgrader: simplify client / server logic
* update go-multistream to v0.5.0
1 year ago
Sukun
0509445ff4
swarm: don't dial unspecified addresses ( #2560 )
* swarm: don't dial unspecified addresses
* add test
1 year ago
Sukun
fa4f7f511f
reuseport: use DialContext instead of Dial to fail quickly ( #2541 )
1 year ago
Sukun
1153b1b86b
swarm: track dial cancellation reason ( #2532 )
* swarm: track dial cancellation reason
* fix no alloc test
* address review comments
* update panel colors
1 year ago
Marten Seemann
4caa4e5bd4
swarm: return a more meaningful error when dialing QUIC draft-29 ( #2524 )
* swarm: return a more meaningful error when dialing QUIC draft-29
* Apply suggestions from code review
Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
* Update p2p/net/swarm/swarm_dial.go
* fix
* better types
---------
Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
1 year ago
Sukun
57dd3bc962
swarm: fix Unwrap for DialError, implement Unwrap for TransportError ( #2437 )
1 year ago
Sukun
cd930fad90
swarm: return errors on filtered addresses when dialing ( #2461 )
1 year ago
Marten Seemann
1a038ef23a
muxer: remove support for mplex ( #2498 )
1 year ago
Jorropo
e935729921
use standard library sha256 implementation for Go 1.21 ( #2309 )
See rational and benchmarks in multiformats/go-multihash#173.
Fixes : #2308
1 year ago
Sukun
4090dcc156
swarm: remove unnecessary reqno for pending request tracking ( #2460 )
* swarm: remove unnecessary reqno for pending request tracking
* use struct{} instead of bool for addrs map
* use struct{} for pendingRequests map
1 year ago
Marco Munizaga
9edef5a939
quic: drop support for QUIC draft-29 ( #2487 )
1 year ago
Marten Seemann
3f2f357229
swarm: remove leftover TODO ( #2474 )
1 year ago
Sukun
116ced6838
swarm: don't open new streams over transient connections ( #2450 )
1 year ago
Sukun
381f23057b
swarm: deprecate libp2p.DialRanker option ( #2430 )
* swarm: deprecate libp2p.DialRanker option
* remove whitespace diff
* Apply suggestions from code review
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
1 year ago
Marten Seemann
63fdb48cfb
update go-multiaddr to v0.10.1, use Unique function from there ( #2407 )
1 year ago
Sukun
79eee3f658
swarm: change relay dial delay to 500ms ( #2421 )
1 year ago
Sukun
757bf59136
swarm: make black hole detection configurable ( #2403 )
* swarm: make black hole detection configurable
* address review comments
1 year ago
Adrian Sutton
cfc50bae8e
net/mock: support ConnectionGater in MockNet ( #2297 )
1 year ago
Sukun
71432c9035
swarm: implement Happy Eyeballs ranking ( #2365 )
1 year ago
VM
8e341f7936
docs: fix some comments ( #2391 )
Co-authored-by: DylanYong <dylan.y@nodereal.io>
1 year ago
Sukun
1e31d70533
swarm: implement blackhole detection ( #2320 )
* swarm: implement blackhole detection
* address review comments
1 year ago
Jorropo
5e3fc8aedf
fix: in the swarm move Connectedness emit after releasing conns ( #2373 )
* fix: in the swarm move Connectedness emit after releasing conns
go-libp2p-kad-dht now listen to both EvtPeerIdentificationCompleted and EvtPeerConnectednessChanged
and EvtPeerIdentificationCompleted calls .ConnsToPeer inorder to do some filtering.
However it happens that it deadlocks because if the swarm is trying to emit a EvtPeerConnectednessChanged
while the subscriber is trying to process an EvtPeerIdentificationCompleted, the subscriber is stuck on
s.conns.RLock() while the swarm wont release it before having sent EvtPeerConnectednessChanged.
Deadlock !
I havn't confirmed this fixes my bug given this takes time to reproduce, I'll startup a new experiment soon.
* Fix other deadlock and add a test
* Make test a little faster
* Bind on localhost
---------
Co-authored-by: Marco Munizaga <git@marcopolo.io>
1 year ago
Sukun
046f112f8a
swarm: fix stale DialBackoff comment ( #2353 )
1 year ago
Sukun
3d4557854a
swarm: use RLock for DialBackoff reads ( #2354 )
1 year ago
Marco Munizaga
3d725f32ba
Clear stream scope if we error ( #2345 )
1 year ago
Sukun
82e6227b34
swarm: make smart-dialing opt in ( #2340 )
1 year ago
Sukun
686a32aae7
swarm: cleanup address filtering logic ( #2333 )
1 year ago
Marten Seemann
8450e8762d
swarm: improve documentation for the DefaultDialRanker ( #2336 )
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