tendermint/p2p
Anton Kaliaev 6fad8eaf5a [p2p/pex] connect to more than 10 peers (#2169)
* [p2p/pex] connect to more than 10 peers

also, remove DefaultMinNumOutboundPeers because a) I am not sure it's
needed b) it's super confusing

look closely

```
maxPeers := sw.config.MaxNumPeers - DefaultMinNumOutboundPeers
if maxPeers <= sw.peers.Size() {
  sw.Logger.Info("Ignoring inbound connection: already have enough peers", "address", inConn.RemoteAddr().String(), "numPeers", sw.peers.Size(), "max", maxPeers)
```

we print maxPeers = config.MaxPeers - DefaultMinNumOutboundPeers. So we
may not have enough peers even though we say we have enough.

Refs #2130

* update spec

* replace MaxNumPeers with MaxNumInboundPeers/MaxNumOutboundPeers

Refs #2130

* update changelog

* make max rpc conns formula visible to users

* update spec

* docs: note max outbound peers excludes persistent
2018-08-14 18:25:56 -04:00
..
conn libs: Remove usage of custom Fmt, in favor of fmt.Sprintf (#2199) 2018-08-10 09:25:57 +04:00
dummy preserve original address and dial it instead of self-reported address (#1994) 2018-07-18 13:23:29 +04:00
pex [p2p/pex] connect to more than 10 peers (#2169) 2018-08-14 18:25:56 -04:00
trust libs: Remove usage of custom Fmt, in favor of fmt.Sprintf (#2199) 2018-08-10 09:25:57 +04:00
upnp libs: Remove usage of custom Fmt, in favor of fmt.Sprintf (#2199) 2018-08-10 09:25:57 +04:00
README.md Revert "delete everything" (includes everything non-go-crypto) 2018-06-20 17:35:30 -07:00
base_reactor.go libs: Remove usage of custom Fmt, in favor of fmt.Sprintf (#2199) 2018-08-10 09:25:57 +04:00
errors.go Revert "delete everything" (includes everything non-go-crypto) 2018-06-20 17:35:30 -07:00
fuzz.go fix import paths 2018-07-01 22:36:49 -04:00
key.go crypto: Remove Ed25519 and Secp256k1 suffix on GenPrivKey 2018-07-20 10:44:21 -07:00
key_test.go fix import paths 2018-07-01 22:36:49 -04:00
listener.go libs: Remove usage of custom Fmt, in favor of fmt.Sprintf (#2199) 2018-08-10 09:25:57 +04:00
listener_test.go add test 2018-07-02 13:04:34 -04:00
metrics.go Revert "delete everything" (includes everything non-go-crypto) 2018-06-20 17:35:30 -07:00
netaddress.go libs: Remove usage of custom Fmt, in favor of fmt.Sprintf (#2199) 2018-08-10 09:25:57 +04:00
netaddress_test.go Revert "delete everything" (includes everything non-go-crypto) 2018-06-20 17:35:30 -07:00
node_info.go NodeInfo version check: delete redundant code 2018-07-18 13:12:52 +04:00
peer.go libs: Remove usage of custom Fmt, in favor of fmt.Sprintf (#2199) 2018-08-10 09:25:57 +04:00
peer_set.go fix nil pointer panic by checking if peer is nil 2018-06-29 16:03:31 +04:00
peer_set_test.go libs: Remove usage of custom Fmt, in favor of fmt.Sprintf (#2199) 2018-08-10 09:25:57 +04:00
peer_test.go crypto: Remove Ed25519 and Secp256k1 suffix on GenPrivKey 2018-07-20 10:44:21 -07:00
switch.go [p2p/pex] connect to more than 10 peers (#2169) 2018-08-14 18:25:56 -04:00
switch_test.go crypto: Remove Ed25519 and Secp256k1 suffix on GenPrivKey 2018-07-20 10:44:21 -07:00
test_util.go libs: Remove usage of custom Fmt, in favor of fmt.Sprintf (#2199) 2018-08-10 09:25:57 +04:00
types.go Revert "delete everything" (includes everything non-go-crypto) 2018-06-20 17:35:30 -07:00
version.go Revert "delete everything" (includes everything non-go-crypto) 2018-06-20 17:35:30 -07:00
wire.go crypto: Refactor to move files out of the top level directory 2018-07-18 08:38:44 -07:00

README.md

p2p

The p2p package provides an abstraction around peer-to-peer communication.

Docs:

  • Connection for details on how connections and multiplexing work
  • Peer for details on peer ID, handshakes, and peer exchange
  • Node for details about different types of nodes and how they should work
  • Pex for details on peer discovery and exchange
  • Config for details on some config option