Skip to content

Commit ade2e30

Browse files
author
tnull
committed
f - Document explicit legacy entropy selection
Review feedback removed the automatic legacy keys_seed fallback. Update the config docs and sample template so operators know an existing raw seed must be selected explicitly. Document the new CLI and environment names next to the TOML fields so non-file configuration is discoverable. Co-Authored-By: HAL 9000
1 parent 8a23c07 commit ade2e30

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

contrib/ldk-server-config.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ alias = "ldk_server" # Lightning node alias
1111

1212
# Node entropy settings
1313
[node.entropy]
14-
# Path to a BIP39 mnemonic file. If unset and no legacy `keys_seed` file exists, a fresh
15-
# 24-word mnemonic is generated on first start. Defaults to "<storage_dir>/keys_mnemonic".
14+
# Path to a BIP39 mnemonic file. If unset, a fresh 24-word mnemonic is generated on
15+
# first start. Defaults to "<storage_dir>/keys_mnemonic".
16+
# CLI/env: --node-entropy-mnemonic-file / LDK_SERVER_NODE_ENTROPY_MNEMONIC_FILE
1617
#mnemonic_file = "/tmp/ldk-server/keys_mnemonic"
1718
# Legacy: path to a raw 64-byte seed file used by ldk-server installs initialized before
18-
# BIP39 mnemonic support. Mutually exclusive with `mnemonic_file`.
19+
# BIP39 mnemonic support. Configure this explicitly to keep using an existing keys_seed file.
20+
# CLI/env: --node-entropy-seed-file / LDK_SERVER_NODE_ENTROPY_SEED_FILE
21+
# Mutually exclusive with `mnemonic_file`.
1922
#seed_file = "/tmp/ldk-server/keys_seed"
2023

2124
# Storage settings

docs/configuration.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Two resolution methods are supported via the `mode` field:
152152
```
153153
<storage_dir>/
154154
keys_mnemonic # BIP39 mnemonic (default for new installs)
155-
keys_seed # Legacy raw seed (only present on installs initialized before mnemonic support)
155+
keys_seed # Legacy raw seed (only used when explicitly configured)
156156
tls.crt # TLS certificate (PEM)
157157
tls.key # TLS private key (PEM)
158158
<network>/ # e.g., bitcoin/, regtest/, signet/
@@ -174,8 +174,11 @@ defaults can be overridden under `[node.entropy]`:
174174

175175
- `mnemonic_file`: path to the BIP39 mnemonic file. Defaults to `<storage_dir>/keys_mnemonic`. If
176176
the file does not exist on first start, a fresh 24-word mnemonic is generated and written.
177+
CLI/env: `--node-entropy-mnemonic-file` / `LDK_SERVER_NODE_ENTROPY_MNEMONIC_FILE`.
177178
- `seed_file`: path to a raw 64-byte seed file. Provided for backwards compatibility with installs
178179
initialized before BIP39 mnemonic support. Mutually exclusive with `mnemonic_file`.
180+
CLI/env: `--node-entropy-seed-file` / `LDK_SERVER_NODE_ENTROPY_SEED_FILE`.
179181

180-
For backwards compatibility, if neither field is configured and a `keys_seed` file exists at the
181-
storage root, ldk-server will continue to use it.
182+
Legacy raw-seed installs are not auto-detected. To keep using an existing
183+
`<storage_dir>/keys_seed`, set `seed_file` explicitly or use the corresponding CLI argument or
184+
environment variable.

docs/operations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ setup):
4949
| File | Priority | Description |
5050
| -------------------------------------- | ------------ | -------------------------------------------------------------------------- |
5151
| `<storage_dir>/keys_mnemonic` | **Critical** | BIP39 mnemonic. Required to recover on-chain funds. Default for new installs. |
52-
| `<storage_dir>/keys_seed` | **Critical** | Legacy raw seed file. Only present on installs initialized before mnemonic support. |
52+
| `<storage_dir>/keys_seed` | **Critical** | Legacy raw seed file. Only used when explicitly configured. |
5353
| `<network_dir>/ldk_node_data.sqlite` | **Critical** | Channel state and on-chain wallet data. Required to recover channel funds. |
5454
| `<network_dir>/ldk_server_data.sqlite` | Nice-to-have | Payment and forwarding history |
5555

@@ -196,6 +196,6 @@ Data is stored in per-network subdirectories (`bitcoin/`, `testnet/`, `signet/`,
196196
etc.) under the storage root. This means you can run multiple networks from one storage
197197
directory without conflicts.
198198

199-
The `keys_mnemonic` file (or, on legacy installs, `keys_seed`) is shared across networks
200-
(stored at the storage root, not per-network). Keys are split by network at the derivation
201-
path level, so the same mnemonic/seed will produce different keys.
199+
The `keys_mnemonic` file, or an explicitly configured legacy `keys_seed`, is shared across
200+
networks (stored at the storage root, not per-network). Keys are split by network at the
201+
derivation path level, so the same mnemonic/seed will produce different keys.

0 commit comments

Comments
 (0)