Problem
crates/core/src/swarm/transport.rs logs the complete MessagePayload when rejecting an oversized message:
tracing::error!("Message is too large: {:?}", payload);
Payloads can contain application data, transaction and relay metadata. Logging the complete structure is unnecessarily risky for deployments that treat transport/application contents as sensitive.
Proposed direction
Log only diagnostic metadata required to investigate the failure: encoded size, configured limit, transaction ID (if appropriate), message kind, and non-sensitive routing identifiers. Do not format message bodies, ciphertext, or arbitrary custom-message bytes.
Acceptance criteria
- The oversized-message log path does not serialize or debug-format the full payload.
- The replacement log retains size/limit and a safe correlation identifier.
- Add a test or logging-focused regression check that sensitive custom-message content is absent from the emitted diagnostic.
Problem
crates/core/src/swarm/transport.rslogs the completeMessagePayloadwhen rejecting an oversized message:Payloads can contain application data, transaction and relay metadata. Logging the complete structure is unnecessarily risky for deployments that treat transport/application contents as sensitive.
Proposed direction
Log only diagnostic metadata required to investigate the failure: encoded size, configured limit, transaction ID (if appropriate), message kind, and non-sensitive routing identifiers. Do not format message bodies, ciphertext, or arbitrary custom-message bytes.
Acceptance criteria