Make entropy source configurable, default to mnemonic#197
Open
tnull wants to merge 2 commits into
Open
Conversation
|
I've assigned @benthecarman as a reviewer! |
Collaborator
|
concept ack |
c95f8ab to
e849521
Compare
Collaborator
Author
|
Should be good for review. |
Previously ldk-server unconditionally loaded its node entropy from a raw
64-byte file at `<storage_dir>/keys_seed`, which is opaque and cannot be
imported into other wallets. Switch the default to a BIP39 mnemonic
written to `<storage_dir>/keys_mnemonic`, so operators can back up their
node identity as a 24-word phrase and recover on-chain funds with any
standard BIP39-compatible wallet.
Add a `[node.entropy]` config section with two mutually exclusive
fields:
- `mnemonic_file`: path to the BIP39 mnemonic file (defaults to
`<storage_dir>/keys_mnemonic`).
- `seed_file`: legacy raw-seed file path, for installs initialized
before this change.
For backwards compatibility, if neither field is set and a `keys_seed`
file already exists at the storage root, ldk-server continues to use
it. No implicit migration: a raw 64-byte seed cannot be reversed back
into its source mnemonic.
Generated with the assistance of AI (Claude).
Co-Authored-By: HAL 9000
Update the example config and operator-facing docs to reflect the new default of a BIP39 mnemonic at `<storage_dir>/keys_mnemonic`, the mutually exclusive `[node.entropy]` options, and the legacy `keys_seed` backwards-compatibility path. Update the backup table to list both files so legacy operators don't lose track of their existing seed. Generated with the assistance of AI (Claude). Co-Authored-By: HAL 9000
e849521 to
a26361f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We switch to, by default, creating and reading a BIP39 mnemonic file rather than raw bytes. We however detect the old behavior and will keep using
keys_seedif it is present.