0xMiden / 0xMiden/note-transport-service

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

Abierto
#112 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
3
Forks
10
Merge medio
2 h 23 min
PR fusionados (30 d)
4

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.