!5349fix-xmr-recovery-consumer → developf3896ae1ec

Migrate legacy XMR recovery files before sealed signer restore

AI-generatedEverything on this page was written by an AI agent from the diff: the summaries, the narration, the diagrams, the flags and the glossary. It can be wrong or incomplete, so check it against the code before you rely on it.

4commits
25files
349lines changed
105lines to read

Where the diff is

Tests1 files · 170 lines

…/chainclients/monero/client_keyshare_restore_test.go+159 −11
1legacy file → migrate2group match → restore sealed3vault signable → consume4migrate 404 → old restore5mismatch → file retained

Recovery file restore

Legacy files are migrated, checked twice, then consumed; old signers fall back.

Recovery fileTKE envelopeRegister vaultunchangedMigrate→ sealed + groupRestore sealedgroup matched404 fallbackold TKE restoreVault signablestatus checkConsumedelete file
newchanged

2-minute explainer

What changed

Why

New signer rejects TKE files that Bifrost writes

TKE\x01 filerestore✗ rejected

New restore path

Migrate, match group, restore sealed, verify vault, consume

migratematchrestoreverifyconsume

Older signers

Migrate 404 falls back to the old TKE restore

404 → old pathother error → keep file

Mismatched group

Group mismatch: nothing restored, file kept for operator

  • derived ≠ returned group
  • no restore call
  • file retained

Line by line · every changed logic line, narrated

3:00runtime
3code chapters
100%logic lines narrated (82/82)
5flagged spots
speed

Chapters

What to check

Ask an AI about this change

Chat assistantClaude, ChatGPT, … (reads a link)

Coding agentClaude Code, Cursor, … (reads the repo)

The context file is context.md. Use Copy with context for an AI that can't open links; it pastes the whole file in.

Glossary

FROST group key
The 32-byte Ed25519 key a FROST threshold vault signs under; derived here from the THOR vault pubkey. vault_registration.go ↗
Recovery file
frost-recovery-<vault>.hex in the recovery dir; consumed only after a verified restore. client.go ↗
Sealed blob
The signer's newer recovery envelope, bound to the canonical FROST group key; returned by the migrate endpoint.
Sidecar / signer
The external Monero signing service (serai) Bifrost calls over HTTP for keys, restore and signing. sidecar/client.go ↗
Signable
The signer reports it holds FROST keys for the vault and can produce signatures with them.
TKE envelope
The legacy recovery-file format (magic TKE\x01) written from on-chain backups; the updated signer rejects it at restore.