Skip to content

Comments

feat: add MemTraceWriter for file-based trace logging#7

Draft
djm07073 wants to merge 1 commit intov0.53.4-memloggerfrom
feat/mem-trace-writer
Draft

feat: add MemTraceWriter for file-based trace logging#7
djm07073 wants to merge 1 commit intov0.53.4-memloggerfrom
feat/mem-trace-writer

Conversation

@djm07073
Copy link

@djm07073 djm07073 commented Feb 9, 2026

Summary

Replace the old TraceWriter (which logged to memlogger) with a new MemTraceWriter that writes trace operations directly to gzipped files in StoreTraceSet format.

Reasoning

  • Trace logs are heavy and should be stored separately from WAL logs
  • Enables shipper to selectively send trace data only when consensus failures occur
  • Async compression prevents blocking the hot path during block execution

Notes

  • Output format: trace-{minHeight}-{maxHeight}.gz with bundled StoreTraceSet JSON per height
  • Async compression via background goroutine with 64-item buffered channel
  • Files written to {nodeHome}/data/traces/ directory
  • Removed auto-enable TraceWriter logic from baseapp/options.go

Replace the old TraceWriter (which logged to memlogger) with a new
MemTraceWriter that writes trace operations directly to gzipped files
in StoreTraceSet format.

- Output format: trace-{minHeight}-{maxHeight}.gz with bundled
  StoreTraceSet JSON per height
- Async compression via background goroutine with 64-item buffered channel
- Files written to {nodeHome}/data/traces/ directory
- Removed auto-enable TraceWriter logic from baseapp/options.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant