익명 01:21

bitcoin core quickest method legacy -> descriptor wallet migration

bitcoin core quickest method legacy -> descriptor wallet migration

I had a power outage recently and realized my current setup needs to change.

The old ass laptop that I use for just bitcoin core needs to be retired. I've been running a pruned node on it forever. it's been OS updated recently and the blockchain is catching up once again. I'm thinking to move to Sparrow wallet synced to a Raspiblitz instance (over tor) and the have a method for importing the bitcoin core wallet via output descriptors.

However the few times I've tried to migrate the legacy wallet bitcoin core (v31 now) have complained about the process and demanded a blockchain re-index. ex:

[error] Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of a pruned node)

That's not really feasible even if I wanted to since this old machine is struggling even to catch up to the last week of being offline, nor do I even have the space on it anymore for a full blockchain.

So the question is, how can I just migrate the legacy wallet -> descriptor one without needing a fully synced bitcoincore node ?

Before anyone suggests it I'd rather not sweep the keys and broadcast a transaction, this machine mostly stays offline / airgapped except via tor proxy.



Top Answer/Comment:

When migrating a Legacy wallet into a Descriptor wallet, the node tries to load the wallet by default after migrating. If the node is pruned below the wallet birthday it will be unable to load it. This is because the wallet might have some transactions in blocks that the node no longer has. So it is missing some wallet information.

Sine #35266 you can migrate the wallet without loading it by setting load_wallet argument to False. This option is not yet available in an official release, but it is expected to be included in Bitcoin Core v32.0, which should be released around October/November.

Note: To use it before the v32.0 release you can compile Bitcoin Core's master branch, which already includes the feature. It is not recommended to run nodes with unofficial releases, so first be sure to manually backup the old wallet file, just in case.

Note that by using load_wallet=False the new wallet will still not be able to be loaded in the node anyway if it is pruned. The problem will remain the same, but at least the wallet will be able to be migrated. A non-pruned node will be needed to load the wallet.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다