Skip to content

fix(htnwallet): explain the ML-DSA-44 multisig backup in dump-unencrypted-data - #133

Merged
MattF42 merged 1 commit into
HoosatNetwork:2.19.2from
Evern00b-fi:fix/htnwallet-mldsa44-backup-notice
Nov 30, 2026
Merged

MattF42 merged 1 commit into
HoosatNetwork:2.19.2from
Evern00b-fi:fix/htnwallet-mldsa44-backup-notice

Conversation

@Evern00b-fi

Copy link
Copy Markdown

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-data ends 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 with import-mldsa44-keys --input <file>; and that an available mnemonic can regenerate its own cosigner's pool with generate-mldsa44-keys --count <n>. Single-sig wallets and multisig wallets without ML-DSA-44 keys print nothing new.

Validation. TestMLDSA44BackupNotice checks 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/... and go 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).

…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>
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6af6efde-87e3-4f1a-a800-2d965f895463

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@MattF42
MattF42 merged commit fab7af5 into HoosatNetwork:2.19.2 Nov 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants