Commit Graph

521 Commits

Author SHA1 Message Date
Ethan Buchman 9481cabd50 fixes from review 2018-06-06 20:45:20 -07:00
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.
2018-06-07 01:09:13 +02:00
Ethan Buchman 825fdf2c24
Merge pull request #1679 from tendermint/flush-wal-on-stop
Flush cs.wal on stop
2018-06-05 17:14:19 -07:00
Anton Kaliaev b8c076ca79
do not drain the channel because there is no channel, duh
Fixes https://github.com/cosmos/cosmos-sdk/issues/1045
2018-06-05 14:57:20 +04:00
Ethan Buchman fd4db8dfdc
Merge pull request #1676 from tendermint/xla/collapse-peerconfig
Collapse PeerConfig into P2PConfig
2018-06-04 18:50:41 -07:00
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
2018-06-05 02:07:56 +02:00
Anton Kaliaev 0562009275
bring back assert 2018-06-04 16:33:57 +04:00
idoor88 fedd07c522 removed assertion to avoid confusion (#1626) 2018-06-04 14:30:46 +04:00
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
2018-06-01 21:07:20 +02:00
Ethan Buchman d454b1b25f SkipDuplicate -> AllowDuplicate; fix p2p test on mac 2018-05-30 21:44:39 -04:00
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
2018-05-30 10:40:22 +02:00
Anton Kaliaev 4da81aa0b7
commented out TestPEXReactorRunning 2018-05-25 15:11:32 +04:00
Anton Kaliaev 67068a34f2
log requesting addresses 2018-05-25 15:11:32 +04:00
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
```
2018-05-25 15:11:32 +04:00
Ethan Buchman 3a947b0117
Merge pull request #1619 from tendermint/zach/cleaner-repo
clean up links & spec docs
2018-05-23 21:09:15 -04:00
Ethan Buchman caf5afc084
Merge pull request #1520 from tendermint/bucky/p2p-same-ip
p2p: prevent connections from same ip
2018-05-23 20:57:17 -04:00
Zach Ramsay 423fef1416 docs: use absolute links (#1617) 2018-05-23 10:01:32 -04:00
Alexander Simmerl 186d38dd8a
Use different loopback addresses for test switch 2018-05-23 02:36:48 +02:00
Alexander Simmerl 01fd102dba
Incoporate review feedback 2018-05-23 01:56:03 +02:00
Alexander Simmerl e11f3167ff
Fix pex reactor test 2018-05-23 01:35:03 +02:00
Alexander Simmerl 7d98cfd3d6
Test duplicate IP guard in peer set 2018-05-23 01:24:27 +02:00
Alexander Simmerl 4848e88737
Fix persistent peer switch test 2018-05-23 00:24:40 +02:00
Zach Ramsay 60d7486de2 docs: fix dead links, closes #1608 2018-05-22 14:46:56 -04:00
Alexander Simmerl 91b6d3f18c
Do not set address for self error 2018-05-21 18:47:14 +02:00
Alexander Simmerl 20e9dd0737
Return fake IP even when there is no conn 2018-05-21 17:55:40 +02:00
Alexander Simmerl 0cd92a4948
Fix race in test suffix 2018-05-21 17:35:49 +02:00
Alexander Simmerl d596ed1bc2
Let peerConn handle IPs in for tests 2018-05-18 16:27:57 +02:00
Anton Kaliaev 5a041baa36
nice output for msgBytes
Closes #1227
2018-05-18 12:45:09 +04:00
Alexander Simmerl b698a9febc
Remove double locking in HasIP 2018-05-16 19:21:12 +02:00
Alexander Simmerl c5f45275ec
Use remotePeer for test switch 2018-05-16 19:21:12 +02:00
Alexander Simmerl 77f09f5b5e
Move to ne.IP 2018-05-16 19:21:12 +02:00
Ethan Buchman 1fe41be929
p2p: prevent connections from same ip 2018-05-16 19:21:12 +02:00
Ethan Buchman 68a0b3f95b version bump. add roadmap back. minor fixes 2018-05-15 22:42:29 -04:00
Jae Kwon edbec10f9e Expose peer stats for dump_consensus_state 2018-05-10 22:43:21 -07:00
Ethan Buchman b6c062c451 fixes from review 2018-04-30 08:19:19 -04:00
Ethan Buchman c195772de1 p2p: small lint 2018-04-28 21:17:28 -04:00
Ethan Buchman fae94a44a2 p2p/pex: some addrbook fixes
* fix before/after in isBad()
* allow multiple IPs per ID even if ID isOld
2018-04-28 20:09:02 -04:00
Ethan Buchman 3a30ee75b9 minor fixes 2018-04-28 17:27:51 -04:00
Ethan Buchman 3498b676a6 update spec and addrbook.go 2018-04-28 17:14:58 -04:00
Ethan Buchman 6157c700dd forgot errors file 2018-04-28 16:15:30 -04:00
Ethan Buchman c90bf77566 rpc: add n_peers to /net_info 2018-04-28 16:09:18 -04:00
Ethan Buchman 6805ddf1b8 p2p: change some logs from Error to Debug. #1476 2018-04-28 16:00:45 -04:00
Ethan Buchman 2761861b6b p2p: MinNumOutboundPeers. Closes #1501 2018-04-28 15:52:05 -04:00
Ethan Buchman 64569b15e5 fix build and test 2018-04-28 15:39:09 -04:00
Ethan Buchman 0450e35d67 some comments 2018-04-28 15:19:33 -04:00
Ethan Buchman aaa81092e7 p2p: some comments and a log line 2018-04-28 15:01:33 -04:00
Ethan Buchman 3ee1d7909e p2p: explicit netaddress errors 2018-04-28 14:48:51 -04:00
Ethan Buchman 32268a8135 limit maxPexMessageSize based on maxAddressSize 2018-04-28 14:41:36 -04:00
Ethan Buchman 40c79235c0 p2p: dont require minor versions to match in handshake 2018-04-28 13:09:17 -04:00
Ethan Buchman c23909eecf p2p/pex: minor cleanup and comments 2018-04-28 13:08:44 -04:00