Problem
The chat-delegate logs the full value byte array at INFO level on every store request:
// delegates/chat-delegate/src/handlers.rs:18-21
logging::info(
format!("Delegate received StoreRequest key: {key:?}, value: {value:?}").as_str(),
);
With Debug formatting, a 300KB state becomes a ~1MB log line because each byte prints as [167, 109, 99, ...]. This causes:
- 25MB+ of logs per hour on active nodes
- Log lines up to 316KB each
- Diagnostic reports failing to upload (413 Payload Too Large)
Suggested Fix
Either:
- Change to DEBUG level instead of INFO
- Truncate the value in the log:
value: [{} bytes]
- Log only a hash/summary of the value
Example fix:
logging::info(
format!("Delegate received StoreRequest key: {key:?}, value: [{} bytes]", value.len()).as_str(),
);
Workaround
freenet/freenet-core adds log size limits in diagnostic reports (10KB per line, 2MB total), but the underlying verbosity should still be fixed to reduce disk usage and improve log readability.
[AI-assisted - Claude]