0xMiden / 0xMiden/note-transport-service

Node runs without persistence by default (--database-url :memory:) and loses all notes silently

オープン
#112 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
3
フォーク
10
平均マージ
2時間 23分
マージ済み PR(30日)
4

説明

### Packages versions

miden-note-transport-node: v0.4.0 (default still present on main)

### Bug description

The node defaults to --database-url :memory:, and the Dockerfile CMD doesn't override it, so containers run with zero persistence unless the operator adds a flag.
Worse than losing data on restart: for :memory: the pool holds a single connection, and if it's ever discarded, deadpool transparently opens a new one, a brand-new empty database, migrations auto-run, no log, no downtime.
One dropped connection means total data loss on a healthy process.

Suggested fixes:
- Default --database-url to a file path (or make it required); :memory: should be explicit opt-in.
- Dockerfile CMD should pass a persistent path and declare a VOLUME.
- Log a prominent warning when running in-memory.

Happy to contribute a PR.

### How can this be reproduced?

1. Run the image with defaults, send a note, confirm it's fetchable.
2. Restart the container (or force the pooled connection to be recycled — no restart needed).
3. All notes are gone; the service stays healthy and logs nothing.

### Relevant log output

```shell
Database: :memory: # startup, the only signal — nothing is logged when the data is lost
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。