Repository navigation
fix(htnwallet): explain the ML-DSA-44 multisig backup in dump-unencrypted-data - #133
Merged
MattF42 merged 1 commit intoNov 30, 2026
Conversation
…pted-data For a multisig wallet with ML-DSA-44 cosigner keys, dump-unencrypted-data now says that the mnemonics and extended public keys alone do not restore the ML-DSA-44 multisig addresses, and how to export and import the cosigner key hashes that do. AI disclosure: prepared with AI assistance (OpenAI Codex and Claude by Anthropic). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
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.
Depends on: nothing.
Problem. An ML-DSA-44 multisig address is built from every cosigner's ML-DSA-44 public key hash at that index. Those hashes come from the cosigners' mnemonics, not from their extended public keys. A multisig backup made the usual way (this wallet's mnemonics plus the cosigners' extended public keys, as printed by
dump-unencrypted-data) therefore cannot rebuild the ML-DSA-44 multisig addresses. If a cosigner is gone and no keys file or export with their hashes is left, coins on those addresses cannot be found or spent. Nothing in the dump said so.Change. For a multisig wallet that holds ML-DSA-44 cosigner keys,
dump-unencrypted-dataends with a notice: the network and secp256k1 signing mode to restore with; that restoring the ML-DSA-44 multisig addresses needs the key hashes of every cosigner; to keep an export covering every cosigner and every used index on both key chains (export-mldsa44-keys --output <file>), to refresh it after growing or importing pools, and to restore it withimport-mldsa44-keys --input <file>; and that an available mnemonic can regenerate its own cosigner's pool withgenerate-mldsa44-keys --count <n>. Single-sig wallets and multisig wallets without ML-DSA-44 keys print nothing new.Validation.
TestMLDSA44BackupNoticechecks the notice for a multisig wallet with ML-DSA-44 keys (both signing modes), and that it is absent for a single-sig wallet and a multisig wallet without them. With the old code a dump of such a wallet has no notice; the test calls the new function, so it does not build on the base.gofmt -l,go vet ./cmd/htnwallet/...andgo test -race -count=1 ./cmd/htnwallet/...pass with Go 1.27.4 on linux/amd64.Compatibility and limits. Output only; no change to keys, files or the daemon. This is a notice, not a fix: a backup that does not depend on an export file would need a code change that is not part of this PR.
AI disclosure: prepared with AI assistance (OpenAI Codex and Claude by Anthropic).