Steven Allen
f6ad991bb5
update gogo protobuf
and regenerate protobuf files
6 years ago
Steven Allen
2e13245085
reset when we fail in identify
6 years ago
Steven Allen
72df25af76
always reset ping streams when done
Currently, we leak a stream. We could use FullClose but, IMO, it's not worth it.
We might as well just reset and walk away.
6 years ago
Steven Allen
b4428fda58
reduce error to warning and log the error
This happens all the time in tests where we intentionally use fake keys for
performance.
Anyways, users probably don't want their logs spammed with errors they can't do
anything about.
6 years ago
Steven Allen
41c6834850
refactor for transport changes
Also, make the libp2p constructor fully useful. There should now be no need to
manually construct a swarm/host.
7 years ago
Steven Allen
5f75373b53
make the identify test less racy
7 years ago
Steven Allen
d7c4c0a202
add test for forgetting address records
7 years ago
Steven Allen
ea95a94e78
register identify service netNotify
This way, we actually process disconnect notifications (and reduce the lifetime
on peer addr records).
7 years ago
Steven Allen
096a2c8303
fix peerstore apocalypse redux
This commit prevents us from repeatedly extending the lifetimes of all observed
addresses if a peer keeps on reconnecting.
It also fixes two race conditions:
1. We may end up processing a disconnect after a re-connect and may
accidentally give the addresses associated with that peer a
RecentlyConnectedAddrTTL instead of a ConnectedAddrTTL.
2. We may end up processing a connect after the associated disconnect storing
the associated peer addresses indefinitely.
7 years ago
Steven Allen
925ac42502
Reset on error in ping.
7 years ago
Lars Gierth
f0453a2458
basichost: refactor BasicHost construction
There were previously 4 different ways of passing various options
into BasicHost construction.
1. Function parameters to New
2. Option parameters to New
3. Global variables, e.g. NegotiateTimeout
4. Options struct, in the calling code in go-ipfs
This changeset deprecated all of these, and introduces the HostOpts
struct to replace them. It also introduces a new constructor called
NewHost, which accepts a *HostOpts.
The old New constructor continues to work the same way,
but is from now on deprecated too.
8 years ago
Jakub Sztandera
ed98e37176
Extend time of observation by the factor of ActivationThresh
8 years ago
Jakub Sztandera
955ebe34a7
Fix obsaddr_test compare function
8 years ago
Jakub Sztandera
356f5ab17d
Modify ObservedAddrSet to better detect our active addrs
8 years ago
Lars Gierth
12f881c55a
Remove unused and unfit relay protocol
8 years ago
Jeromy
31557da822
fix multistream import paths
8 years ago
Jeromy
104c97ed57
update go-multistream and use negotiateLazy to allow for readonly streams
8 years ago
Jeromy
26adf7395b
identify: make agent version mutable
8 years ago
Jeromy
f4ea270ccb
use set protos in identify protocol knowledge gathering
8 years ago
Jeromy
f61f242f69
Extract netutil to its own package
8 years ago
Jeromy
077aae473b
make bandwidth metrics optional
8 years ago
Jeromy
232864175d
make sure to always close streams when youre done with them
8 years ago
Jeromy
0e7e451d69
extract NAT traversal code to its own lib
8 years ago
Jeromy
b130e2a7b1
fix import and update travis scripts
8 years ago
Jeromy
70872ff663
update deps
8 years ago
Jeromy
1a53ad77b9
extract host interface
8 years ago
Jeromy
cea1fe131f
extract net interface and metrics
8 years ago
Jeromy
1085a07654
extract protocol and maddr-filter
8 years ago
Jeromy
4dd30d824b
switch to using stdlib context package
8 years ago
jbenet
aafaf38683
identify: handle case where local peer.ID is empty
8 years ago
jbenet
17d39398e9
identify: tests verify we have public keys
8 years ago
jbenet
83eddcae92
identify: consume public key in message.
Make sure to verify that our keys match.
In the rare event they do not, make sure to investigate
what's wrong, and log errors.
8 years ago
jbenet
65273ab3e7
identify: send public key in message
8 years ago
Jeromy
f21d06fbf0
update peerstore dep
8 years ago
Jeromy
f74add8a19
swarm: make stream.Protocol() return type protocol.ID
8 years ago
Jeromy
7a3394b1da
host: remember which protocols work for a given peer
8 years ago
Jeromy
de84a41402
identify: log protocols from remote peers in peerstore
8 years ago
Jeromy
8744e460da
update local import paths to reflect org change
8 years ago
John Steidley
5c8093b073
gosimple
8 years ago
Jakub Sztandera
9f7b0b81b5
Fix logging in id.go
8 years ago
Jeromy
9ccbf103e0
bump agent version to match repo version
9 years ago
Jeromy
51c5f6a063
fix consumption of observed remote addrs
9 years ago
Jeromy
916bc557c3
split peerstore from peer package
9 years ago
Jeromy
f483c47187
don't leak goroutines when pings complete
9 years ago
Jeromy
6dc5e19c54
close wait channel in all cases, not just success
9 years ago
Jeromy
b0ad207270
rewrite all package paths to dvcs
9 years ago
Jeromy
15b28dc0ce
recursive dependency update of utp lib
9 years ago
Jeromy
4f82ae5e62
move some deps out as gx packages
9 years ago
Jeromy
cb974e87c1
rename protocols after discussion
9 years ago
Jeromy
9c68f44a14
version multistream protocol tags
9 years ago