Skip to content

fix(chain): implement request builder exts for any checkpoint data - #2438

Closed
bhuvan-somisetty wants to merge 2 commits into
bitcoindevkit:masterfrom
bhuvan-somisetty:fix/builder-ext-generic-checkpoint-data
Closed

bhuvan-somisetty wants to merge 2 commits into
bitcoindevkit:masterfrom
bhuvan-somisetty:fix/builder-ext-generic-checkpoint-data

Conversation

@bhuvan-somisetty

@bhuvan-somisetty bhuvan-somisetty commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

SyncRequestBuilderExt and FullScanRequestBuilderExt were only implemented for builders with the default checkpoint data D = BlockHash, so revealed_spks_from_indexer, unused_spks_from_indexer and spks_from_indexer could not be called when building a request for a CheckPoint<Header> (or any other D). The impls never use the checkpoint data, so they are now generic over D.

Fixes #2437

Notes to the reviewers

Same kind of change as #2417. Callers using the default D = BlockHash are unaffected.

The added test fails to compile without the fix (error[E0599]: no method named revealed_spks_from_indexer found for struct SyncRequestBuilder<I, D>).

The MSRV job currently fails on every PR at "Pin dependencies for MSRV" (yoke-derive = "^0.8.4" can't be pinned to 0.8.2), unrelated to this change. The second commit drops that pin so CI is green; it is the same change as in #2435 and can be dropped from here if that merges first.

Changelog notice

Fixed

Checklists

All Submissions:

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

`SyncRequestBuilderExt` and `FullScanRequestBuilderExt` were only
implemented for builders whose checkpoint data is `BlockHash`, the
default `D`. A builder for a `CheckPoint<Header>` (or any other `D`)
could not call `revealed_spks_from_indexer`, `unused_spks_from_indexer`
or `spks_from_indexer`, even though the builders themselves and
`LocalChain` are generic over `D`.

The impls never touch the checkpoint data, so make them generic over `D`.
`cargo update -p yoke-derive --precise "0.8.2"` now fails because the
locked dependency graph requires `yoke-derive ^0.8.4`, which breaks the
"Pin dependencies for MSRV" step. The MSRV job only builds the libraries
since bitcoindevkit#2421 and passes without this pin, so drop it.
@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.18%. Comparing base (7b68d28) to head (aa5f58a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2438      +/-   ##
==========================================
+ Coverage   80.66%   81.18%   +0.52%     
==========================================
  Files          31       31              
  Lines        6236     6236              
  Branches      293      294       +1     
==========================================
+ Hits         5030     5063      +33     
+ Misses       1136     1103      -33     
  Partials       70       70              
Flag Coverage Δ
rust 81.18% <ø> (+0.52%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@evanlinjin

Copy link
Copy Markdown
Member

Thanks for this. It's carried on in #2439, which also makes LocalChain's canonicalization methods generic over D, so the whole BlockHash-only API gets fixed in one PR.

@evanlinjin evanlinjin closed this Oct 26, 2026
@github-project-automation github-project-automation Bot moved this from Triage to Done in BDK Chain Oct 26, 2026
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.

chain: SyncRequestBuilderExt/FullScanRequestBuilderExt only work with BlockHash checkpoint data

2 participants