mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-07 05:46:32 +00:00
## Description This PR aims to reduce the amount of `Logger.Error(..)` calls. Many of these calls are benign and do not need any intervention. Went from: ``` node1 | E[2020-09-08|14:32:48.407] Connection failed @ recvRoutine (reading byte) module=p2p peer=af8747a81383f40583ae8790d2cc1f92cc7e4a35@192.167.10.4:26656 conn=MConn{192.167.10.4:26656} err="read tcp 192.167.10.3:48614->192.167.10.4:26656: read: connection reset by peer" node1 | E[2020-09-08|14:32:48.407] Stopping peer for error module=p2p peer="Peer{MConn{192.167.10.4:26656} af8747a81383f40583ae8790d2cc1f92cc7e4a35 out}" err="read tcp 192.167.10.3:48614->192.167.10.4:26656: read: connection reset by peer" node1 | E[2020-09-08|14:32:48.407] Error while stopping peer module=p2p peer=af8747a81383f40583ae8790d2cc1f92cc7e4a35@192.167.10.4:26656 err="already stopped" node1 | E[2020-09-08|14:32:48.408] MConnection flush failed module=p2p peer=af8747a81383f40583ae8790d2cc1f92cc7e4a35@192.167.10.4:26656 err="write tcp 192.167.10.3:48614->192.167.10.4:26656: use of closed network connection" ``` To: ``` node1 | E[2020-09-08|14:42:54.023] Stopping peer for error module=p2p peer="Peer{MConn{192.167.10.5:37844} e3d01d1795464a356227d0cba6567d6b94381e55 in}" err=EOF ``` Closes: #4937
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