bark, bitcoin-ext: Restrict BDK functionality with Rust features

Depends on: https://codeberg.org/ark-bitcoin/bark/pulls/896

Originally I tried to lock all BDK uses behind different features in bark but even in environments where we don't have an onchain wallet we still rely on ChainSourceClient to check VTXO expiry and such. As an alternative I modified bark so it always depends on bdk_core and the bitcoin core/esplora RPC packages. bdk_wallet is only added as a dependency when using the new onchain_bdk feature. This is much more lightweight. Additionally because I added each BDK RPC extension as a unique feature we no longer have to compile the esplora RPC code for bark-server since it exclusively uses bitcoin core.

In terms of naming the feature to enable our bdk_wallet implementation I went through a couple of different names:

  • bdk is too vague, we rely on BDK packages even if this is disabled
  • bdk_wallet we can't use this because it would result in a cyclic dependency
  • onchain_wallet implies that all onchain wallet functionality would be disabled which wouldn't be the case
  • onchain too vague, are we disabling onchain functionality or the bdk wallet?
  • prebuilt_wallet seemed weird to me

Merge request reports

Loading
Loading