A Floresta-powered chain source crate for BDK (WIP 🏗️)
  • Rust 82.1%
  • Shell 14.6%
  • Just 3.3%
Find a file
merge-script d327b73259
Merge luisschwab/bdk-floresta#128: Pin all dependencies to =MAJOR.MINOR.patch
c40f6ed11b chore(deps): pin all dependencies to `=MAJOR.MINOR.patch` (Luis Schwab)

Pull request description:

ACKs for top commit:
  luisschwab:
    ACK c40f6ed11b

Tree-SHA512: d3bf6324325df8371e2d857dcec1513adaad24896fa1073c2ceab2b97fd0062a113f88286ba03d42429916c6fe19f04db52525e32512b496902fcb56b5cad480
2026-05-28 17:30:38 -03:00
.cargo chore(deps): bump floresta-* to 55c563d 2026-05-27 02:00:18 -03:00
.github feat(ci): run cargo-audit on all lockfiles on CI 2026-05-27 00:33:34 -03:00
contrib feat(ci): add contrib/prune-audit-ignores.rs 2026-05-27 00:34:10 -03:00
examples chore(deps): bump floresta-* to 55c563d 2026-05-27 02:00:18 -03:00
src chore(deps): bump floresta-* to 55c563d 2026-05-27 02:00:18 -03:00
.gitignore chore(doc): fix doc nits 2026-03-31 20:28:38 -03:00
build.rs refactor!: clean up errors and improve error handling 2026-04-28 18:59:21 -03:00
Cargo-minimal.lock chore(deps): pin all dependencies to =MAJOR.MINOR.patch 2026-05-28 17:23:05 -03:00
Cargo-recent.lock chore(deps): pin all dependencies to =MAJOR.MINOR.patch 2026-05-28 17:23:05 -03:00
Cargo.toml chore(deps): pin all dependencies to =MAJOR.MINOR.patch 2026-05-28 17:23:05 -03:00
justfile chore(deps): bump halfin to v0.3.7 2026-05-27 01:42:16 -03:00
LICENSE-APACHE chore(doc): dual license this crate under MIT OR Apache-2.0 2026-02-23 22:35:17 -03:00
LICENSE-MIT chore(doc): dual license this crate under MIT OR Apache-2.0 2026-02-23 22:35:17 -03:00
LICENSE.md chore(doc): rename LICENCE > LICENSE.md and fix docs 2026-03-20 00:11:54 -03:00
rbmt-version chore: bump cargo-rbmt to v0.3.0 and update nightly toolchain 2026-05-18 13:01:07 -03:00
README.md fix(ci): run toolchain+lockfile test matrix locally 2026-05-27 00:34:13 -03:00
rustfmt.toml chore(node)!: rename Node.action to Node.actions 2026-05-06 15:10:19 -03:00

bdk-floresta

A Floresta-powered chain-source crate for BDK.

Synopsis

This crate is a novel chain-source crate implementation meant for wallet applications built with BDK, allowing for zero-trust and completely local wallet synchronization, by embedding a lightweight full node direcly inside a wallet application.

By leveraging Utreexo and Floresta, it's possible to implement a lightweight full node with minimal resource requirements, making it possible for every wallet to have it's own node.

Developing

This project uses just for command running, and cargo-rbmt to manage everything related to cargo, such as formatting, linting, testing and CI. It also uses uv to run Zizmor, for GitHub Action static analysis.

To install them with cargo, run:

~$ cargo install just

~$ cargo install cargo-rbmt

~$ cargo install uv

Alternatively, use your preferred package manager to install just and uv.

A justfile is provided for convenience. Run just to see available commands:

~$ just
> bdk-floresta
> A Floresta-powered chain-source crate for BDK

Available recipes:
    audit                   # Run `cargo audit` on all lockfiles and prune ignored advisories [alias: a]
    build                   # Build `bdk-floresta` and examples [alias: b]
    check                   # Check code formatting, compilation, linting [alias: c]
    check-commit-signatures # Check if commits are PGP-signed
    check-features          # Check that all feature combinations compile
    delete item="data"      # Delete files: data, target, lockfiles [alias: d]
    doc                     # Generate documentation
    doc-open                # Generate and open documentation
    example-client-regtest  # Run the `client_regtest` example [alias: cr]
    example-client-signet   # Run the `client_signet` example [alias: cs]
    fmt                     # Format code [alias: f]
    lock                    # Regenerate `Cargo-recent.lock` and `Cargo-minimal.lock` [alias: l]
    pre-push                # Run pre-push checks [alias: p]
    shellcheck              # Run ShellCheck [alias: sc]
    test                    # Run tests across with relevant toolchain and lockfile combinations [alias: t]
    toolchains              # Install and/or Update `cargo-rbmt` and Stable and Nightly toolchains
    zizmor                  # Run Zizmor [alias: z]

Architecture

This crate is implemented on top of libfloresta, a set of libraries for building lightweight Bitcoin nodes, and is composed of two main components: the Builder and the Node.

Wallet updates can either stem from new blocks that the Node validates, which can then be applied to the wallet, or from a blockchain scan using Compact Block Filters.

libfloresta

The crates below are used to implement the Node:

  • floresta-chain: Implements the Node's chain state, and validates blocks and transactions.

  • floresta-compact-filters: Implements a storage mechanism for Compact Block Filters, used to figure out which blocks to request from the P2P network to update the wallet.

  • floresta-mempool: Implements the Node's mempool, used to relay and cache transactions, as well as generating fee estimates.

  • floresta-wire: Implements all of the Node's peer-to-peer logic.

Minimum Supported Rust Version

This library should compile with any combination of features on Rust 1.85.0.

To build with the MSRV toolchain, copy Cargo-minimal.lock to Cargo.lock.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.