teamnsrg / ethereum-p2p

Official Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
17 stars 9 forks source link

node-finder changes #29

Closed SimonSK closed 6 years ago

SimonSK commented 6 years ago
  1. The addNodeMetaInfo case 3 using ethDisc = !dial && !accept logic (mentioned in #23) is included in this PR. See p2p/server.go:665.
  2. [DISC4] message is split into [DISC-PEER] for disconnects from Ethereum peers and DISC-PROTO] for disconnects during p2p handshake. All disconnect reasons, not just TooManyPeers, are logged.
  3. More consistent log messages. Removed double quotes around message contents. Remote address is included in all of the following messages:
    • [NEIGHBORS]|receivedAt=float64|id=string|addr=string|node=...
    • [HELLO]|receivedAt=float64|id=string|addr=string|conn=trusted|info=...
    • [DISC-PROTO]|receivedAt=float64|id=string|addr=string|conn=dyndial|reason=string
    • [DISC-PEER]|receivedAt=float64|id=string|addr=string|conn=dyndial|reason=string
    • [STATUS]|receivedAt=float64|id=string|addr=string|conn=staticdial|info=...
    • [DAOFORK]|receivedAt=float64|id=string|addr=string|conn=inbound|support=true
  4. Removed unused global variables.
  5. MySQL config file updated to avoid frequent crashes.
  6. Added a bash script to run MySQL and node-finder instances.
  7. Put lock/unlock around hashmap reads.
  8. DB handle checking moved to inside storeDAOForkSupportInfo