Wallet downgrade tool #11716

issue Sjors opened this issue on November 18, 2017
  1. Sjors commented at 11:54 AM on November 18, 2017: member

    The issue of downgrading a wallet came up in a gist related to #11403.

    Use cases I've seen so far:

    1. downgrade future SegWit format to v0.15.1 compatible format
    2. ~opt-out of HD (e.g. by saving individual keys and deleting the seed)~ (see discussion on #11730)

    A separate tool (~or RPC command~) would allow keeping the wallet code itself less complex.

  2. fanquake added the label RPC/REST/ZMQ on Nov 18, 2017
  3. fanquake added the label Wallet on Nov 18, 2017
  4. Sjors commented at 12:02 PM on November 18, 2017: member

    I'll try (2). Not that I would recommend anyone to opt out of HD, but it's probably easier for me to build. Someone else can build (1) on top of it.

  5. Sjors renamed this:
    Wallet downgrade tool / RPC command
    Wallet downgrade tool
    on Nov 20, 2017
  6. Sjors commented at 1:03 PM on November 20, 2017: member

    Feedback on #11730 (@TheBlueMatt, @luke-jr, @jonasschnelli, @laanwj) suggests that, if done at all, this should be an external tool, not an RPC command. I also removed HD downgrade as an example use case.

  7. TheBlueMatt commented at 11:43 PM on November 21, 2017: member

    I can't say I'm a huge fan of HD-downgrade. I'd like to understand a use-case for it before we go and check in a tool to do it.

    On November 18, 2017 3:54:21 AM PST, Sjors Provoost notifications@github.com wrote:

    The issue of downgrading a wallet came up in a gist related to #11403.

    Use cases I've seen so far:

    1. downgrade future SegWit format to v0.15.1 compatible format
    2. opt-out of HD (e.g. by saving individual keys and deleting the seed)

    A separate tool (or RPC command) would allow keeping the wallet code itself less complex.

    -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/bitcoin/bitcoin/issues/11716

  8. Sjors commented at 9:37 AM on November 22, 2017: member

    @TheBlueMatt I removed that use case from the description. It was mainly there because it's easier to implement than downgrading a future SegWit (or otherwise strongly refactored) wallet format.

    The idea came from this discussion between you and @sipa in the above linked Gist:

    It seems much easier to just automatically upgrade, and provide a recovery tool in case you need to force your wallet to work with an old version.

    Hmm, a recovery tool is another option, I suppose. I guess I would be perfectly fine with that option instead as well, but certainly one is required IMO.

    From this I gather that if you implemented auto-upgrade, then there should be a way to downgrade. I don't know if that's true under all circumstances.

  9. MarcoFalke commented at 3:04 PM on November 22, 2017: member

    I tend to Concept NACK a wallet downgrade tool. The upgrade paths are already non-trivial to reason about, not to mention that most of them are untested (only implicitly tested on real developers' testnet/mainet wallets).

    I don't think we can support a wallet downgrade tool (regardless of the interface) in rpc, command line or separate tool. Instead, I'd suggest that the proposed way of downgrading a wallet is by not upgrading. That means to create regular backups of the wallet and only upgrade after backing up the wallet.

    In case we add auto-upgrade, there should be an option to disable auto-update (advertised in the release notes and command line option help).

  10. Sjors commented at 3:56 PM on November 22, 2017: member

    Maybe any auto-upgrade should check / ask the user to confirm that a backup was made? I wouldn't want to count on people reading release notes.

  11. TheBlueMatt commented at 7:20 PM on November 22, 2017: member

    I'm rather strongly against auto-upgrade in any form, but a downgrade tool for something like SegWit wallet may make sense, but it obviously depends on how SegWit wallet ends up being implemented.

    On November 18, 2017 3:54:21 AM PST, Sjors Provoost notifications@github.com wrote:

    The issue of downgrading a wallet came up in a gist related to #11403.

    Use cases I've seen so far:

    1. downgrade future SegWit format to v0.15.1 compatible format
    2. opt-out of HD (e.g. by saving individual keys and deleting the seed)

    A separate tool (or RPC command) would allow keeping the wallet code itself less complex.

    -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/bitcoin/bitcoin/issues/11716

  12. MarcoFalke commented at 9:16 PM on November 22, 2017: member

    I still don't get the purpose of a wallet downgrade tool. Why would you create a wallet with feature XYZ and then remove that feature right after creation?

    Reasonable options are:

    • Create wallet with Bitcoin Core version n-1, which does not support feature XYZ. Then use wallet with current Core version
    • Current core version can support a -nouseXYZ, similar to -nousehd to create a wallet without feature XYZ. (This option also works with auto upgrade: Just specify -nouseXYZ to prevent auto upgrade)
  13. luke-jr commented at 11:52 PM on November 22, 2017: member

    Note that we never intentionally auto-upgrade...

  14. TheBlueMatt commented at 12:13 AM on November 23, 2017: member

    @MarcoFalke see discussion on the gist at https://gist.github.com/sipa/125cfa1615946d0c3f3eec2ad7f250a2

    On November 22, 2017 1:16:31 PM PST, MarcoFalke notifications@github.com wrote:

    I still don't get the purpose of a wallet downgrade tool. Why would you create a wallet with feature XYZ and then remove that feature right after creation?

    Reasonable options are:

    • Create wallet with Bitcoin Core version n-1, which does not support feature XYZ. Then use wallet with current Core version
    • Current core version can support a -nouseXYZ, similar to -nousehd to create a wallet without feature XYZ. (This option also works with auto upgrade: Just specify -nouseXYZ to prevent auto upgrade)

    -- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/bitcoin/bitcoin/issues/11716#issuecomment-346475025

  15. jnewbery commented at 8:57 PM on March 27, 2018: member

    I'm a concept NACK on a downgrade tool. It just seems too difficult to work through all the edge cases and be satisfied that there isn't some way to lose money.

    OTOH, I'm very concept ACKish on a generalised wallet tool. If you're interested in that, take a look at @jonasschnelli's PR here: #8745.

  16. MarcoFalke commented at 10:04 PM on March 27, 2018: member

    I think this can be closed?

  17. Sjors closed this on Mar 28, 2018

  18. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me