Alexander Simmerl
c661a3ec21
Fix race when mutating MConnConfig
Instead of mutating the passed in MConnConfig part of P2PConfig we just
use the default and override the values, the same as before as it was
always the default version. This is yet another good reason to not embed
information and access to config structs in our components and will go
away with the ongoing refactoring in #1325 .
7 years ago
Anton Kaliaev
b8c076ca79
do not drain the channel because there is no channel, duh
Fixes https://github.com/cosmos/cosmos-sdk/issues/1045
7 years ago
Alexander Simmerl
ea896865a7
Collapse PeerConfig into P2PConfig
As both configs are concerned with the p2p packaage and PeerConfig is
only used inside of the package there is no good reason to keep the
couple of fields separate, therefore it is collapsed into the more
general P2PConifg. This is a stepping stone towards a setup where the
components inside of p2p do not have any knowledge about the config.
follow-up to #1325
7 years ago
Anton Kaliaev
0562009275
bring back assert
7 years ago
idoor88
fedd07c522
removed assertion to avoid confusion ( #1626 )
7 years ago
Alexander Simmerl
3255c076e5
Remove auth_enc config option
As we didn't hear any voices requesting this feature, we removed the
option to disable it and always have peer connection auth encrypted.
closes #1518
follow-up #1325
7 years ago
Ethan Buchman
d454b1b25f
SkipDuplicate -> AllowDuplicate; fix p2p test on mac
7 years ago
Alexander Simmerl
5796e879b9
Introduce option to skip duplicate ip check
In some scenarios like tests we want to disable the guard which prevents
peers connecting from the same ip.
Fixes #1632
Closes #1634
7 years ago
Anton Kaliaev
4da81aa0b7
commented out TestPEXReactorRunning
7 years ago
Anton Kaliaev
67068a34f2
log requesting addresses
7 years ago
Anton Kaliaev
2a0e9f93ce
provide arg to error
BEFORE:
```
E[05-24|11:55:37.229] Dialing failed pex=0 addr=022ec801d79025caab3afbbf816d92ff8450d040@127.0.0.2:6593 err="Connect to self: <nil>" attempts=0
```
AFTER:
```
E[05-24|11:55:37.229] Dialing failed pex=0 addr=022ec801d79025caab3afbbf816d92ff8450d040@127.0.0.2:6593 err="Connect to self: 022ec801d79025caab3afbbf816d92ff8450d040@127.0.0.2:6593" attempts=0
```
7 years ago
Zach Ramsay
423fef1416
docs: use absolute links ( #1617 )
7 years ago
Alexander Simmerl
186d38dd8a
Use different loopback addresses for test switch
7 years ago
Alexander Simmerl
01fd102dba
Incoporate review feedback
7 years ago
Alexander Simmerl
e11f3167ff
Fix pex reactor test
7 years ago
Alexander Simmerl
7d98cfd3d6
Test duplicate IP guard in peer set
7 years ago
Alexander Simmerl
4848e88737
Fix persistent peer switch test
7 years ago
Zach Ramsay
60d7486de2
docs: fix dead links, closes #1608
7 years ago
Alexander Simmerl
91b6d3f18c
Do not set address for self error
7 years ago
Alexander Simmerl
20e9dd0737
Return fake IP even when there is no conn
7 years ago
Alexander Simmerl
0cd92a4948
Fix race in test suffix
7 years ago
Alexander Simmerl
d596ed1bc2
Let peerConn handle IPs in for tests
7 years ago
Anton Kaliaev
5a041baa36
nice output for msgBytes
Closes #1227
7 years ago
Alexander Simmerl
b698a9febc
Remove double locking in HasIP
7 years ago
Alexander Simmerl
c5f45275ec
Use remotePeer for test switch
7 years ago
Alexander Simmerl
77f09f5b5e
Move to ne.IP
7 years ago
Ethan Buchman
1fe41be929
p2p: prevent connections from same ip
7 years ago
Ethan Buchman
68a0b3f95b
version bump. add roadmap back. minor fixes
7 years ago
Jae Kwon
edbec10f9e
Expose peer stats for dump_consensus_state
7 years ago
Ethan Buchman
b6c062c451
fixes from review
7 years ago
Ethan Buchman
c195772de1
p2p: small lint
7 years ago
Ethan Buchman
fae94a44a2
p2p/pex: some addrbook fixes
* fix before/after in isBad()
* allow multiple IPs per ID even if ID isOld
7 years ago
Ethan Buchman
3a30ee75b9
minor fixes
7 years ago
Ethan Buchman
3498b676a6
update spec and addrbook.go
7 years ago
Ethan Buchman
6157c700dd
forgot errors file
7 years ago
Ethan Buchman
c90bf77566
rpc: add n_peers to /net_info
7 years ago
Ethan Buchman
6805ddf1b8
p2p: change some logs from Error to Debug. #1476
7 years ago
Ethan Buchman
2761861b6b
p2p: MinNumOutboundPeers. Closes #1501
7 years ago
Ethan Buchman
64569b15e5
fix build and test
7 years ago
Ethan Buchman
0450e35d67
some comments
7 years ago
Ethan Buchman
aaa81092e7
p2p: some comments and a log line
7 years ago
Ethan Buchman
3ee1d7909e
p2p: explicit netaddress errors
7 years ago
Ethan Buchman
32268a8135
limit maxPexMessageSize based on maxAddressSize
7 years ago
Ethan Buchman
40c79235c0
p2p: dont require minor versions to match in handshake
7 years ago
Ethan Buchman
c23909eecf
p2p/pex: minor cleanup and comments
7 years ago
Ethan Buchman
936d1a0e68
some notes about the p2p layer
7 years ago
Ethan Buchman
0cbbb61962
minor cleanup
7 years ago
Ethan Buchman
94e823cc91
p2p: NodeInfo.Channels is HexBytes
7 years ago
Anton Kaliaev
3a0edc561d
log error from AddrBook#AddAddress in DialPeersAsync
Refs #1434
7 years ago
Thomas Corbière
ab00bf7c8b
standardize PRNG access ( #1411 )
* replace math/rand with tmlibs equivalent.
* update tmlibs dependency
7 years ago