Closed richard-ramos closed 1 month ago
This issue was tackled by the following PR https://github.com/waku-org/nwaku/pull/3110
Notice that we are not tracking the prepared statements and therefore we may need to revisit this issue in the future if prepared statements need more focus on debugging logs.
To identify better the origin of the SQL Queries in postgresql, consider adding a request ID in the queries like in the following example, so it's possible to match a requestID to a logged query within postgresql logs:
Since this could lead to SQL injections, we must be sure that the request IDs added in the comment are hex strings.
In addition to this , we should consider that requestIDs should be prefixed per application, i.e. have status-go send all of its requestIDs with the prefix "0xAABBCCDD...", the message counter will send "0xFFFFFF...", and so on. That will make it easier to identify the application that generated a store request. (I'm not sure if this has privacy concerns)
cc: @Ivansete-status