From: Steve Myers Date: Tue, 9 Jul 2024 18:56:15 +0000 (-0500) Subject: Merge bitcoindevkit/bdk#1489: feat(electrum)!: Update `bdk_electrum` to use merkle... X-Git-Tag: v1.0.0-beta.1~3 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.EncoderStringWriter.html?a=commitdiff_plain;h=d99b3ef4b449a5c7b8facf04db3cb9be829a0ac1;p=bdk Merge bitcoindevkit/bdk#1489: feat(electrum)!: Update `bdk_electrum` to use merkle proofs 1a62488abfd6213c2780c1465aebe01dfbb6b20a feat(chain)!: Implement `ConfirmationBlockTime` (Wei Chen) e761adf48178e2688a817a2b7466b0ebf7902eeb test(electrum): Imported `bdk_esplora` tests into `bdk_electrum` (Wei Chen) d7f4ab71e22ca3e8868dae22add8839fc25aa7f3 feat(electrum)!: Update `bdk_electrum` to use merkle proofs (Wei Chen) Pull request description: Fixes #980. ### Description This PR is the first step in reworking `bdk_electrum` to use merkle proofs. When we fetch a transaction, we now also obtain the merkle proof and block header for verification. We then insert an anchor only after validation that the transaction exists in a confirmed block. The loop logic that previously existed in `full_scan` to account for re-orgs has also been removed as part of this rework. This is a breaking change because `graph_update`s now provide the full `ConfirmationTimeHeightAnchor` type. This removes the need for the `ElectrumFullScanResult` and `ElectrumSyncResult` structs that existed only to provide the option for converting the anchor type from `ConfirmationHeightAnchor` into `ConfirmationTimeHeightAnchor`. ### Notes to the reviewers ### Changelog notice * `ConfirmationTimeHeightAnchor` and `ConfirmationHeightAnchor` have been removed. * `ConfirmationBlockTime` has been introduced as a new anchor type. * `bdk_electrum`'s `full_scan` and `sync` now return `graph_update`s with `ConfirmationBlockTime`. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [ ] I've added tests for the new feature * [x] I've added docs for the new feature ACKs for top commit: ValuedMammal: ACK 1a62488abfd6213c2780c1465aebe01dfbb6b20a notmandatory: ACK 1a62488abfd6213c2780c1465aebe01dfbb6b20a Tree-SHA512: 77af05bffcb9668ecb99b41abacc6b6aa503dc559226fa88c4cab6863e3af431b937706696ec765bb802c9c152333cd430c284d17a6cd190520e10b13d89e02f --- d99b3ef4b449a5c7b8facf04db3cb9be829a0ac1