Skip to content

feat(kyoto): bump bdk_kyoto to 0.18.0, add new-wallet sync - #1140

Closed
Romansage6 wants to merge 1 commit into
bitcoindevkit:masterfrom
Romansage6:kyoto-0.18.0
Closed

Romansage6 wants to merge 1 commit into
bitcoindevkit:masterfrom
Romansage6:kyoto-0.18.0

Conversation

@Romansage6

Copy link
Copy Markdown

Description

Bumps bdk_kyoto from 0.17.1 to 0.18.0. The new release replaces
the ScanType enum with a type-state SyncConfig builder
(sync_from_last_checkpoint, new_wallet_sync, wallet_recovery_sync)
and, via the updated bip157 0.7.0 dependency, drops Builder::data_dir
outright — the node no longer persists anything to disk.

CbfBuilder::build is ported to build the right SyncConfig<P> per
scan type. The bdk-ffi-level ScanType enum gains a New variant
wired to SyncConfig::new_wallet_sync(): a headers-only sync to the
active chain tip with filter downloads skipped, intended for wallets
with no revealed scripts. This is the "simpler and more efficient way
to use CBF for fresh wallets" referenced in the issue.

Notes to the reviewers

  • CbfBuilder::data_dir() is removed since bip157 0.7.0 no longer
    supports any node-side persistence (see its changelog: "data_dir
    has been removed. No persistence occurs in the node"). This is a
    breaking FFI change, consistent with the issue's own expectation
    ("I think breaking though").
  • The doc comment on CbfBuilder already read "Sync, recover, or
    start a new wallet" before this change, so the ScanType::New
    addition fills in behavior that was already documented but not yet
    implemented.
  • Updated bdk-android's CbfSyncTest.kt, the only other place in
    the repo calling the now-removed .dataDir(...).

Documentation

Changelog

changelog: breaking (removes CbfBuilder::data_dir)

Checklists

All Submissions:

  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing
  • I've added exactly one changelog:* label — no push access to add labels directly; flagged above as changelog: breaking
  • I've linked the relevant upstream docs or specs above

Bugfixes:

  • This pull request breaks the existing API
  • I'm linking the issue being fixed by this PR

How it was tested

From bdk-ffi/:

  • cargo build --locked
  • cargo fmt --all -- --config format_code_in_doc_comments=true --check
  • cargo clippy --locked --all-targets --features "uniffi/bindgen-tests"
  • CLASSPATH=./tests/jna/jna-5.14.0.jar cargo test --locked --features uniffi/bindgen-tests — 83 passed, 0 failed, 6 ignored (require live MutinyNet Esplora access, pre-existing)
  • cargo check --locked to confirm Cargo.lock isn't stale

Fixes #1139

🤖 Generated with Claude Code

bdk_kyoto 0.18.0 replaces `ScanType` with a type-state `SyncConfig`
builder and, via the updated bip157 0.7.0 dependency, removes
`Builder::data_dir` entirely (no persistence occurs in the node
anymore). Port `CbfBuilder::build` to the new API and drop the now
unsupported `data_dir` option.

Also expose the new headers-only "fresh wallet" sync path as
`ScanType::New`, mapped to `SyncConfig::new_wallet_sync()`: it syncs
block headers to the active chain tip without downloading filters,
which is the efficiency improvement this bump is for.

Fixes bitcoindevkit#1139

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@thunderbiscuit

Copy link
Copy Markdown
Member

We do not appreciate AI bots scanning our issues and one-shotting full solutions. If we don't know you, please start by interacting with us on the issues, reviewing other people's PRs, and generally be useful. This library is used in production, and is not a vibe-coded AI-slopped merging-happy library where we just click merge on any rando's PR just because.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bump Kyoto to 0.18.1

2 participants