bitcoindevkit / bitcoindevkit/bdk

Update bdk_bitcoind_rpc module to work with a pruned bitcoind node

Open
#2,050 21 comments 2 reactions 1 assignee Claimed by @luisschwab View on GitHub
summer-of-bitcoin
Dominant language
Rust
Stars
1.1k
Forks
483
Avg merge
20d 3h
Merged PRs (30d)
3

Description

# Summer of Bitcoin Project Proposal

**Description**

The current `bdk_bitcoind_rpc` module requires full access to transaction history using a non-pruned node (a node storing the full blockchain, which at the time of writing is over 400GB).

However, even without a wallet's full transaction history it is still possible to compute the wallet balance and be able to spend with only a pruned bitcoind node using the RPC method `scantxoutset`. This project will update the existing `bdk_bitcoind_rpc` module to work with a pruned bitcoind node.

**Expected Outcomes**

* Update`full_scan` to use the `scantxoutset` if the bitcoind node is pruned.
* Create tests to confirm `full_scan` works with a pruned node.
* Update rpc examples and test with a pruned bitcoind node.

**Resources**
- [bitcoin core node setup](https://bitcoin.org/en/download).
- [bitcoin rpc commands](https://developer.bitcoin.org/reference/rpc/).
- [issue 895](https://github.com/bitcoindevkit/bdk/issues/895#issuecomment-1475766797).
- https://developer.bitcoin.org/reference/rpc/scantxoutset.html
- https://github.com/bitcoindevkit/bdk/pull/1041
- https://github.com/bitcoindevkit/bdk/pull/1172

**Skills Required**
- Experience with git. [Guide](https://git-scm.com/book/en/v2)
- Experience with rust. [First seven chapters of the book](https://doc.rust-lang.org/book/)
- Able to setup a local core node in regtest and testnet mode.
- Familiarity with bitcoind RPC commands.

**Mentor(s)**
@notmandatory

**Difficulty**
Hard

**Competency Test**
* Install rust, compile and run all bdk examples and tests.
* Setup a local Bitcoin Core pruned node daemon in regtest mode.
* Make a wallet with `example_bitcoind_rpc_polling` example wallet and receive and send regtest bitcoin.

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.