status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
302 stars 79 forks source link

Add `Copy Message Hashes` to message context menu #16801

Open osmaczko opened 10 hours ago

osmaczko commented 10 hours ago

Description

Currently, for debugging, users can only copy the message ID, which is insufficient for diagnosing issues at the Waku layer. The message ID is an application-layer construct and does not correspond directly to message hashes, especially since a single application-layer message may generate multiple Waku messages due to the segmentation mechanism.

While it is possible to trace message hashes from the message ID by analyzing the geth.log, this method is unreliable as logs tend to roll over or disappear quickly. This makes diagnosing issues, such as missing messages, very challenging. For example, in the scenario shown below, @jrainville might need to retrieve the message hashes for a message they responded to, but it could already be too late:

Image

Proposed solution

Introduce a mechanism to map message IDs to their corresponding message hashes:

  1. Dedicated Debugging Table: Add a database table specifically for storing mappings between message IDs and Waku message hashes.
  2. Separate Debug Database: Alternatively, create a standalone database for debugging purposes to avoid polluting the main database with debug-related information.

This improvement would significantly enhance the debugging process for message delivery.