# Review Club notes
- BDK is a Rust library with the goal of making it easier for devs to build Bitcoin wallets
- The BDK project is a [Rust workspace](https://doc.rust-lang.org/cargo/reference/workspaces.html), composed of various crates. There are two types of crates: the ones that contain logic ([`crates`](https://github.com/bitcoindevkit/bdk/tree/master/crates)) and the ones that contain examples ([`example-crates`](https://github.com/bitcoindevkit/bdk/tree/master/example-crates))
- The `crates` directory is composed of various projects, the most relevant are:
- `chain`: contains the structures needed for organizing the data synched from a blockchain source (could be esplora, electrum, bitcoind - more on that later).
- `esplora`, `electrum`, `bitcoind_rpc`: contain the methods needed for downloading data from esplora/electrum/bitcoind and inserting it in the `chain` structures
- `bdk`: uses the `chain` structures to create a high-level [`Wallet`](https://docs.rs/bdk/1.0.0-alpha.7/bdk/wallet/struct.Wallet.html). This is eventually going to be renamed to `bdk_wallet` (see [#1305](https://github.com/bitcoindevkit/bdk/issues/1305))
- Today's PR changes bits of logic in the `bdk_esplora` crate. More specifically, it makes sure that the update we download from esplora includes the txouts needed for fee calculation.
- We don't store the tx fee in BDK, it is calculated on the fly when needed
- To calculate the fee, we need to know the previous txouts, which we wouldn't have by default for transactions received from an external wallet
- For more details, see issue [#1265](https://github.com/bitcoindevkit/bdk/issues/1265)
- You can see that the code in the PR is duplicated. This is because we have two versions of esplora, one async and one blocking. The two versions must be functionally the same, but since async and blocking code don't play together nicely, we had to create two separate but very similar crates.
- Optional reading: If you want to know more about Rust async vs blocking, see https://nullderef.com/blog/rust-async-sync/ or issue [#559](https://github.com/bitcoindevkit/bdk/issues/559)