Satoshi BrotherYour brother in the market
EN

Streamlining Bitcoin Wallet Recovery: New Proposal from Developer Craig Raw

Craig Raw proposes a standardized backup format to simplify Bitcoin wallet recovery, addressing descriptor inconsistencies without altering network rules.

Streamlining Bitcoin Wallet Recovery: New Proposal from Developer Craig Raw

Introduction

Craig Raw, a prominent Bitcoin developer, has put forth a new proposal aimed at simplifying the wallet recovery process for users managing wallets that utilize multiple signing keys. In a recent update posted on December 1 to the Bitcoin Development Mailing List, Raw pointed out a significant inconsistency in how wallet backups are formatted. This inconsistency can lead to confusion, as two backups containing the same underlying wallet instructions might appear different when users attempt to recover their wallets.

Core Issues with Wallet Backups

The core issue arises from the way various wallet applications generate output descriptors—critical components that outline the necessary instructions for constructing Bitcoin addresses and managing the spending of funds. For instance, a typical two-of-three multisignature (multisig) wallet can define its operations by specifying three public keys or derivations alongside a spending policy that mandates at least two of the designated signing keys be used to authorize any transactions.

During recovery, cosigners might try to compare these descriptors to verify that their backups indeed reflect the same wallet setup. However, discrepancies in how wallet software encodes these instructions can complicate this verification process. The Bitcoin Improvement Proposal 380 (BIP 380) sought to mitigate this issue by introducing an eight-character checksum system, which is derived from the descriptor's text to help identify possible errors.

Checksum Challenges

A notable aspect of this system is that wallet applications can use either an apostrophe or the character 'h' to denote the same type of key derivation step; however, the checksum treats them as distinct characters, leading to situations where two valid descriptors could generate identical Bitcoin addresses yet possess different checksums. To illustrate this point, Raw provided examples where similar descriptors for a two-of-three multisig wallet yielded different checksums—one producing xmwawk45 with apostrophes and the other generating tj77jlvt using the letter 'h'. Though these descriptors yielded the same Bitcoin scripts because of their sortedmulti construction sorting, their differences complicated the recovery process.

Proposed Standardized Format

To tackle this inconsistency, Raw has introduced a standardized format that proposes uniform rules for wallet applications to follow before displaying or exporting descriptors. By replacing apostrophes with 'h' and reorganizing the key expressions in a consistent order, the suggested protocol could generate matching descriptor strings and checksums—specifically achieving a unified checksum of jecfc8v2—without necessitating changes to the core wallet scripts or the key derivation process itself.

Benefits and Limitations

Implementing these formatting rules would enhance the capability of wallet applications to compare descriptors during recovery, thereby minimizing confusion that might arise from differing formats. However, it is essential to note that while matching checksums would strengthen the assurance of descriptor equivalence, they would not provide absolute certainty that the corresponding private keys are controlled by cosigners or that all necessary elements for fund recovery are present. Additionally, not every variation that leads to equivalent scripts would be addressed—such as cases where one descriptor directly specifies a public key while another derives it from an extended public key.

Current Status

As of December 3, Raw's proposal is still in the draft phase and lacks an official number. Its eventual success relies on the willingness of wallet developers to embrace these proposed formatting changes, while existing wallet applications would continue to support the currently valid descriptor formats.

Also in other languages: РусскийDeutschFrançaisItalianoEspañol

Editorial & AI policy · Contact