Page MenuHomePhabricator

[electrum] Implement SLIP-0039 wallet recovery.
ClosedPublic

Authored by PiRK on Thu, Jan 23, 12:41.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCfb94895b4483: [electrum] Implement SLIP-0039 wallet recovery.
Summary

This implements recovery of a wallet from a Shamir's secret-sharing scheme.

Current limitations:

  • we can only recover a wallet from an existing set of mnemonic shares, we don't generate new ones
  • the mnemonic shares are not saved to storage (wallet file), so users can't see their "seed" via the "Wallet > Show" seed menu (the action is disabled in the GUI)
  • we don't autodetect the seed type, the user needs to click the option button and select "slip39" explicitely

This is a backport of electrum#6917 and electrum#9059

Depends on D17576

Test Plan

python test_runner.py

Import a wallet from a SLIP39 share, test that it works (receive a send a transaction), close it and reopen it and test again (make sure the wallet file has all the info needed to open the wallet). Test the derivation path scanner.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
trezor_stuff
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32185
Build 63860: Build Diffelectrum-tests
Build 63859: arc lint + arc unit

Event Timeline

PiRK published this revision for review.Thu, Jan 23, 12:58
PiRK added inline comments.
electrum/electrumabc/base_wizard.py
568 ↗(On Diff #52342)

we don't need to detect the seed_type automatically. That was legacy code left over from Electrum, that have a complete zoo of seed_type for their standard "electrum" type (p2sh_segwit, native_segwit...)

PiRK planned changes to this revision.Thu, Jan 23, 13:00

found a couple of minor fixups to backport

PiRK retitled this revision from Implement SLIP-0039 wallet recovery. to [electrum] Implement SLIP-0039 wallet recovery..Thu, Jan 23, 14:01
This revision is now accepted and ready to land.Thu, Jan 23, 14:04