inflate_update
logic to not depend on Cow
As mentioned by @LLFourn: 1. We have a "sparse chain" from which there is a subset of txids M that are missing from graph. 2. There is also another subset C that are in the graph but their positions have changed. 3. We used the Cow to avoid copying/duplicating in memory transactions in subset C and M Instead in inflate_update we could remove transactions in subset M and just clone data in subset C (which is usually tiny).
The Bitcoin Dev Kit
BDK

A modern, lightweight, descriptor-based wallet library written in Rust!
Project Homepage | Documentation
About
The bdk
libraries aims to provide well engineered and reviewed components for Bitcoin based applications.
It is built upon the excellent rust-bitcoin
and rust-miniscript
crates.
⚠ The Bitcoin Dev Kit developers are in the process of releasing a
v1.0
which is a fundamental re-write of how the library works. See for some background on this project: https://bitcoindevkit.org/blog/road-to-bdk-1/ (ignore the timeline 😁) For a release timeline see thebdk_core_staging
repo where a lot of the component work is being done. The plan is that everything in thebdk_core_staging
repo will be moved into thecrates
directory here.
Architecture
The project is split up into several crates in the /crates
directory:
bdk
: Contains the central high levelWallet
type that is built from the low-level mechanisms provided by the other componentschain
: Tools for storing and indexing chain datafile_store
: A (experimental) persistence backend for storing chain data in a single file.esplora
: Extends theesplora-client
crate with methods to fetch chain data from an esplora HTTP server in the form that [bdk_chain
] andWallet
can consume.electrum
: Extends the [electrum-client
] crate with methods to fetch chain data from an electrum server in the form that [bdk_chain
] andWallet
can consume.
Fully working examples of how to use these components are in /example-crates