0xMiden / 0xMiden/note-transport-service
Node runs without persistence by default (--database-url :memory:) and loses all notes silently
- Linguagem predominante
- Rust
- Estrelas
- 3
- Forks
- 10
- Merge médio
- 2h 23min
- PRs com merge (30d)
- 4
Descrição
### 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
```
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.