dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

backport: bitcoin#18836, #19046, #19490, #20403, #21127, #21238, #21329 - descriptor wallets part V & sethdseed #6017

Closed knst closed 4 months ago

knst commented 5 months ago

Issue being fixed or feature implemented

Next batch of backports related to descriptor wallets. See related issue to track a progress: https://github.com/dashpay/dash-issues/issues/59 Changes in this PR also used in "hardware signing" feature (coming later)

What was done?

  1. It implements a new rpc sethdseed that is based on bitcoin#12560 and newer related changes.
  2. refactoring to rename hdChain to m_hd_chain (see bitcoin#17681 which is DNM).
  3. Bitcoin backports (some of them uses sethdseed, and requires m_hd_chain to reduce conflicts):
    • bitcoin/bitcoin#19046
    • bitcoin/bitcoin#19490
    • bitcoin/bitcoin#18836
    • bitcoin/bitcoin#20403
    • bitcoin/bitcoin#21127
    • bitcoin/bitcoin#21238
    • bitcoin/bitcoin#21329

How Has This Been Tested?

Run unit/functional tests. The backports #18836 and #20403 are heavily modified to adopt wallet_upgradewallet.py to our codebase.

Breaking Changes

N/A Though, sethdseed implementation is not a final version as it is now, can be removed (superseeded by upgradetohd or got mnemonic-feature and super-seed upgradetohd).

Checklist: