0xMiden / 0xMiden/note-transport-service

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

Ouverte
#112 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
3
Forks
10
Merge moyen
2 h 23 min
PR mergées (30 j)
4

Description

### 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
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.