0xMiden / 0xMiden/note-transport-service

Unbounded storage growth — no quotas or disk-full handling

Đang mở
#118 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement production-readiness
Ngôn ngữ chính
Rust
Star
3
Fork
10
Merge trung bình
2 giờ 23 phút
Pull request đã merge (30 ngày)
4

Mô tả

Severity: critical.

### Summary

There is no per-sender, per-tag, or global cap on stored data. The only reclamation is the 30-day retention sweep (`crates/node/src/database/maintenance.rs`). The only per-write bound is `max_note_size` (512 KB, `bin/node/src/main.rs`).

### Impact

At 512 KB/note, an unauthenticated writer fills the disk well within the 30-day window. SQLite disk-full then surfaces as generic `QueryExecution` errors to all clients and takes the whole service down. After retention deletes, freelist pages are never returned to the OS (no `auto_vacuum`/`VACUUM`), so the file stays at high-water size.

### Recommendation

- Add a global note-count / byte watermark checked in the maintenance loop (metric + alert; optionally refuse writes above a hard cap with `RESOURCE_EXHAUSTED`).
- Consider `PRAGMA auto_vacuum=INCREMENTAL` + periodic `incremental_vacuum` in maintenance.
- The real growth control is rate limiting + auth (linked issues); this issue is the storage-side backstop.

Related: #44, #111 (Postgres inherits mature quota/monitoring tooling).

---
Part of #114.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.