Skip to content

bdk_chain: widen supported rusqlite version range instead of pinning 0.31.0 #2436

Open

Description

@thesimplekid

Describe the enhancement

Widen bdk_chain's optional rusqlite dependency from the "0.31.0" pin to a supported version range, e.g. >=0.31.0, <0.41.0, keeping 0.31.x supported while allowing the resolver to select a single newer version when the dependency graph requires it.

Use case

Because libsqlite3-sys sets links = "sqlite3", Cargo rejects any dependency graph containing two incompatible rusqlite versions (see rusqlite#1727). The 0.31.0 pin therefore forces every project that combines BDK with another sqlite consumer onto rusqlite 0.31.x, which is starting to block real upgrades downstream:

  • CDK would like to update arti-client (Tor) past 0.22, but arti ≥ 0.23 requires rusqlite ≥ 0.32 (arti 0.47 requires ≥ 0.36, < 0.41), which cannot coexist with the pin. (Previously attempted here in #2002 for the same reason.)
  • breez-sdk-spark hit the same wall needing rusqlite 0.32 (#2156).

I understand from #1949 that a straight version bump was deliberately avoided because several projects (BDK/CDK/LDK Node) standardized on 0.31 to keep graphs unifiable. A range addresses that concern directly: nothing forces anyone off 0.31 — graphs that need 0.31 keep resolving to 0.31 — while graphs containing a newer consumer can resolve to one shared newer version.

This is exactly what the other two ecosystem projects did:

  • ldk-node: lightningdevkit/ldk-node#1187 — widened to >=0.31.0, <0.40.0, with CI testing across the range.
  • cdk-sqlite: cashubtc/cdk#2748 — same range, plus a compatibility fixture running the persistence test suite against every minor release from 0.31.0 to 0.39.0 on MSRV.

Impact

  • Blocking production usage
  • Nice-to-have / UX improvement
  • Developer experience / maintainability

Are you using BDK in a production project?

  • Yes
  • No
  • Not yet, but planning to

Which backend(s) are relevant (if any)?

  • Electrum
  • Esplora
  • Bitcoin Core RPC
  • None / not backend-related (e.g. bdk_chain, bdk_core)
  • Other (please specify): ____

Project or organization (optional)

CDK (Cashu Development Kit) — cdk-bdk uses bdk_wallet's rusqlite-backed persistence.

Activity

  1. evanlinjin commented on Oct 24, 2026

    @evanlinjin
    Member

    @thesimplekid thanks for filling this issue, will look into it next week.

  2. self-assigned this
    on Oct 24, 2026
  3. added this to the Chain 0.24.0 milestone on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

dependenciesPull requests that update a dependency filenew featureNew feature or request

Type

No type

Projects

  • Status
    Triage

Relationships

None yet

Development

No branches or pull requests

Issue actions