Skip to content

fix(bitcoind_rpc): backport PR#2167#2198

Merged
evanlinjin merged 1 commit into
bitcoindevkit:release/chain-0.23.xfrom
oleonardolima:backport/pr-2167
May 9, 2026
Merged

fix(bitcoind_rpc): backport PR#2167#2198
evanlinjin merged 1 commit into
bitcoindevkit:release/chain-0.23.xfrom
oleonardolima:backport/pr-2167

Conversation

@oleonardolima
Copy link
Copy Markdown
Collaborator

Description

It's a backport for the the bdk_bitcoind_rpc fix introduced by #2167. If you're interested in the original fix, check the original PR for discussion/rationale.

Notes to the reviewers

The introduced tests needs a review, as I had to update it use the older Emitter and TestEnv APIs.

Changelog notice

### Fixed:
- `Emitter` producing un-connectable checkpoints when `start_height` is above the agreement point after a reorg.

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

…e agreement point

When a reorg drops the agreement point below `start_height`, the emitter
would skip directly to `start_height`, producing a checkpoint that could
not connect with the caller's local chain (`CannotConnectError`).

Fix: override `start_height` to the agreement height when a reorg is
detected (agreement point below both `start_height` and `last_cp`), so
the emitter revisits the invalidated block heights.
@oleonardolima oleonardolima added this to the Chain 0.23.4 milestone May 8, 2026
@oleonardolima oleonardolima self-assigned this May 8, 2026
@oleonardolima oleonardolima added bug Something isn't working backport A bug fix or security patch to be ported to a previous release labels May 8, 2026
@oleonardolima oleonardolima moved this to Needs Review in BDK Chain May 8, 2026
@oleonardolima oleonardolima marked this pull request as ready for review May 8, 2026 21:44
Copy link
Copy Markdown
Member

@luisschwab luisschwab left a comment

Choose a reason for hiding this comment

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

ACK 4d862fd

Copy link
Copy Markdown
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

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

ACK b5af3c7

@evanlinjin evanlinjin merged commit 2efbfcf into bitcoindevkit:release/chain-0.23.x May 9, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in BDK Chain May 9, 2026
@oleonardolima oleonardolima deleted the backport/pr-2167 branch May 11, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport A bug fix or security patch to be ported to a previous release bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants