BlockchainCommons / BlockchainCommons/Learning-Bitcoin-from-the-Command-Line

Outdated wallet RPC usage: `dumpwallet` and legacy wallet no longer supported in modern Bitcoin Core

Open
#639 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
3.4k
Forks
818
PR merge metrics
No merged PRs in 30d

Description

## Summary

Chapter 3 of the course material rely on legacy wallet behavior that is no longer supported in recent versions of Bitcoin Core. Commands like `dumpwallet` fail with unhelpful errors, and legacy wallet creation is entirely blocked, making it impossible for learners on current default setups to follow along.

---

## Reproduction

### Issue 1 — `dumpwallet` in the chapter no longer exists

Running the tutorial command:

```bash
bitcoin-cli dumpwallet ~/mywallet.txt
```

Returns:

```
error code: -32601
error message:
Method not found
```

### Issue 2 — Legacy wallet creation is blocked

```bash
bitcoin-cli -named createwallet wallet_name="my_wallet" descriptors=false
```

Returns:

```
error code: -4
error message:
descriptors argument must be set to "true"; it is no longer possible to create a legacy wallet.
```

---

## Root cause

- Bitcoin Core now uses **descriptor wallets by default** since v23
- Legacy (non-descriptor) wallet creation was **fully removed** in v30+
- RPC methods like `dumpwallet` are tied to the legacy key-store model and **do not exist** in descriptor wallets

---

## Suggested fixes

### 1. Migrate to descriptor-based workflow

Replace `dumpwallet` with the modern equivalent:

```bash
bitcoin-cli listdescriptors
```

Add a brief explanation of descriptor structure (`pkh`, `wpkh`, `tr`) and derivation paths.

### 2. Add context

A short note on the legacy → descriptor wallet transition would help learners understand *why* the change happened, not just *what* changed.

---

## Closing note

Updating the course to descriptor-based workflows would make the material more accurate for anyone running a current Bitcoin Core installation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.