Skip to content

Allow ledger replay after Mithril snapshot conversion failure - #3438

Open
disassembler wants to merge 1 commit into
masterfrom
mithril-converter-ledger-replay
Open

disassembler wants to merge 1 commit into
masterfrom
mithril-converter-ledger-replay

Conversation

@disassembler

Copy link
Copy Markdown
Collaborator

When Mithril downloads and verifies a snapshot but snapshot conversion fails, Daedalus currently discards the downloaded blocks. Retrying repeats the same failing conversion, while syncing from genesis downloads the blockchain again.

Add Keep blocks and replay ledger to the conversion error screen. This retains the verified immutable blocks, discards the unusable ledger/LSM state, and starts the node to rebuild its ledger locally. It supports first bootstrap, partial sync, and rebuilds, with English and Japanese copy. The option is available in the current watchdog session; retry, cancellation, and explicit genesis sync remain available.

Installation continues to use the existing network checks and interrupted-install safeguards. Replay omits the clean sentinel so the node validates the retained blocks. The PR includes the feature specification, plan, and task checklist.

Verification

  • 363 watchdog unit tests passed.
  • 19 Mithril regression integration tests passed; all six conversion-recovery integration tests passed after the final changes.
  • 244 focused Jest tests passed across MithrilSyncContainer, BackendStore, and WatchdogManager.
  • TypeScript compilation, Clippy with warnings denied, treefmt, and translation descriptor consistency checks passed.

Tests

  • Recovery tests cover retaining staging, replay after bootstrap/partial sync/rebuild, no second download, removal of stale ledger state, explicit genesis selection, and retry/cancel.
  • Renderer tests restrict the replay action to conversion failures and verify command dispatch.

@disassembler disassembler self-assigned this Oct 28, 2026
@disassembler
disassembler force-pushed the mithril-converter-ledger-replay branch from 6d4524b to b68e03a Compare October 29, 2026 11:54
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.

1 participant