Skip to content

Refactor: update bdk-bitcoind-rpc to use bdk-bitcoind-client#2119

Draft
tvpeter wants to merge 2 commits intobitcoindevkit:masterfrom
tvpeter:refactor/use-bitcoind-client
Draft

Refactor: update bdk-bitcoind-rpc to use bdk-bitcoind-client#2119
tvpeter wants to merge 2 commits intobitcoindevkit:masterfrom
tvpeter:refactor/use-bitcoind-client

Conversation

@tvpeter
Copy link
Copy Markdown
Collaborator

@tvpeter tvpeter commented Feb 9, 2026

Description

This PR replaces bitcoincore-rpc with bdk-bitcoind-client in bdk-bitcoind-rpc library and its tests and examples.

Depends on bdk-bitcoind-client#5

Notes to the reviewers

  • changed the Emitter to a concrete type
  • In the example crate, I replaced the shared client between threads with two different clients (will come back to improve this later)

Changelog notice

  • replace bitcoincore-rpc with bdk-bitcoind-client

Checklists

All Submissions:

- replace bitcoincore-rpc with bdk_bitcoind_client
- update usage in lib.rs and bip158.rs modules
- Enable bitcoind-client v28_0 and set as
default in bitcoind_rpc
- Update example_bitcoind_rpc_polling to use
bitcoind-client
- Update tests to use bitcoind-client
@oleonardolima oleonardolima self-requested a review February 11, 2026 16:45
@oleonardolima oleonardolima added module-blockchain dependencies Pull requests that update a dependency file api A breaking API change labels Feb 11, 2026
@oleonardolima oleonardolima moved this to In Progress in BDK Chain Feb 11, 2026
@ValuedMammal
Copy link
Copy Markdown
Collaborator

Concept ACK

Copy link
Copy Markdown
Collaborator

@oleonardolima oleonardolima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK 44bfbf9

[dependencies]
bitcoin = { version = "0.32.0", default-features = false }
bitcoincore-rpc = { version = "0.19.0" }
bdk-bitcoind-client ={ git = "https://github.com/bitcoindevkit/bdk-bitcoind-client", rev = "06526db5c25047b61d29f81b25cfee7bd0f3abc8"}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tvpeter you can keep it referencing to master branch instead, while we don't have a release for bdk-bitcoind-client.

default = ["std", "bitcoind_28_0"]
std = ["bitcoin/std", "bdk_core/std"]
serde = ["bitcoin/serde", "bdk_core/serde"]
bitcoind_28_0 =["bdk-bitcoind-client/28_0"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we should probably establish a policy here similar to bdk-bitcoind-rcp ones, that it support the latest 3 versions (exposed as features too).

Comment on lines +369 to 389
/// Extends [`bdk_bitcoind_client::Error`].
pub trait BitcoindRpcErrorExt {
/// Returns whether the error is a "not found" error.
///
/// This is useful since [`Emitter`] emits [`Result<_, bitcoincore_rpc::Error>`]s as
/// This is useful since [`Emitter`] emits [`Result<_, bdk_bitcoind_client::Error>`]s as
/// [`Iterator::Item`].
fn is_not_found_error(&self) -> bool;
}

impl BitcoindRpcErrorExt for bitcoincore_rpc::Error {
impl BitcoindRpcErrorExt for bdk_bitcoind_client::Error {
fn is_not_found_error(&self) -> bool {
if let bitcoincore_rpc::Error::JsonRpc(bitcoincore_rpc::jsonrpc::Error::Rpc(rpc_err)) = self
if let bdk_bitcoind_client::Error::JsonRpc(bdk_bitcoind_client::jsonrpc::Error::Rpc(
rpc_err,
)) = self
{
rpc_err.code == -5
} else {
false
}
}
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tvpeter can't we have this in bdk_bitcoind_client instead ?

@oleonardolima oleonardolima added this to the Chain 0.24.0 milestone Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api A breaking API change dependencies Pull requests that update a dependency file module-blockchain

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants