Skip to content
This repository was archived by the owner on Dec 10, 2020. It is now read-only.

v3.0.1 - Logging improvements / Peer Refactor

Choose a tag to compare

@holgerd77 holgerd77 released this 11 Jun 07:35
· 26 commits to master since this release
8a25282

This release focuses on improving the debugging capabilities of the library. PR #72 reduces the verbosity of the log output to cut on noise on everyday debugging. There is a new verbose logger to retain the more verbose output (e.g. with full message bodies) which can be used like this:

DEBUG=devp2p:*,verbose node -r ts-node/register ./examples/peer-communication.ts

Other Logging Improvements

Relevant PRs #75 and #73:

  • Added number of peers to refillConnections() debug message
  • Replaced try/catch logic for EIP-8 auth check to avoid side-effects and get rid of misleading wrong-ecies-header debug output
  • Moved debug output in BanList.add() after the set operation to get the correct size output
  • Added debug message for DISCONNECT reason from peer (this was always some constant re-debug reason, and at the end it's mostly TOO_MANY_PEERS)
  • Internalize detached logger output from the devp2p:util logger

Other Changes

  • Refactored Peer class for better code readability, PR #77

There has also been a new high-level diagram added to the README which can be used to get an overview on the structure, available loggers and the event flow of the library (PR #76).