ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.19k stars 291 forks source link

Improve logging for gossip messages #6554

Open nazarhussain opened 8 months ago

nazarhussain commented 8 months ago

Problem description

We recently encountered a scenario where we faced an error from the beacon API endpoint.

error: Failed to send out exit message "PublishError.InsufficientPeers"

During the debugging, we could not find any such error been logged anywhere. The validator-ejector called the beacon API, which internally called the libp2p-gosshipsub, and that error was raised there and then triggered back to API response, and not logged any where in our code.

Solution description

We should improve the logging for the gossip messages:

  1. Log all invocation any gossip message to any topic
  2. Log success or error for any publishing message to any topic

Additional context

Having those logs on the debug level would be sufficient.

philknows commented 1 month ago

Increasing priority on this to help debug issues where missed/orphaned blocks can yield better intel on the critical seconds of block production flow.