Skip to content

Commit 959b4f8

Browse files
committed
Merge #1179: build(esplora): Add async-https-rustls flag to esplora client
6817ca9 ci: pin hyper-rustls version to 0.24.0 for 1.57 MSRV (thunderbiscuit) 4ee41db build(esplora): Add async-https-rustls flag to esplora client (thunderbiscuit) Pull request description: ### Description The bdk_esplora crate currently doesn't expose the [`async-https-rustls` flag offered by the rust-esplora-client](https://github.com/bitcoindevkit/rust-esplora-client/blob/ef1925e1ee1b951f15a9339282858bea27c6168f/Cargo.toml#L44) crate and instead requires users to build using the `default-tls` flag on reqwest, which uses the platform-specific openssl library when compiling. This creates complications for cross-compilation, notably for our Android builds that currently support 3 architectures (`arm64-v8a`, `armeabi-v7a`, and `x86_64`). In order to solve this we can either compile the openssl libraries for each of the platforms we want to support, or use the rustls-tls version of reqwest. The second options is much easier and requires less fiddling with the internals of the Android native development kit and cross-compilation rabbit holes. Before we merge this I want to make sure I understand the tradeoffs between the `native-tls` and the `rustls-tls` and confirm that there are not potential issues there, but from what I understand they should provide the same functionality/security, and because these are already available/exposed in reqwest and rust-esplora-client, I think this should be a fairly straightforward additional feature we offer. ### Changelog notice ```txt Added: - New async-https-rustls feature flag for the bdk_esplora crate, allowing to compile rust-esplora-client using rustls-tls instead of the default native-tls. ``` ### 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 ACKs for top commit: notmandatory: ACK 6817ca9 realeinherjar: ACK 6817ca9 danielabrozzoni: ACK 6817ca9 Tree-SHA512: 1d417da7cf85e157d71f56442a06e817e8741822d7bff9089f7fbb70ff8b4854f1f52befbc348b849e9c98cae848b792d426cd5bf551e7a9089b15467d28efdd
2 parents 55b680c + 6817ca9 commit 959b4f8

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/cont_integration.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ jobs:
3232
run: |
3333
cargo update -p log --precise "0.4.18"
3434
cargo update -p tempfile --precise "3.6.0"
35+
cargo update -p reqwest --precise "0.11.18"
36+
cargo update -p hyper-rustls --precise 0.24.0
3537
cargo update -p rustls:0.21.9 --precise "0.21.1"
3638
cargo update -p rustls:0.20.9 --precise "0.20.8"
3739
cargo update -p tokio --precise "1.29.1"
3840
cargo update -p tokio-util --precise "0.7.8"
3941
cargo update -p flate2 --precise "1.0.26"
40-
cargo update -p reqwest --precise "0.11.18"
4142
cargo update -p h2 --precise "0.3.20"
4243
cargo update -p rustls-webpki:0.100.3 --precise "0.100.1"
4344
cargo update -p rustls-webpki:0.101.7 --precise "0.101.1"

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ To build with the MSRV you will need to pin dependencies as follows:
6969
cargo update -p log --precise "0.4.18"
7070
# tempfile 3.7.0 has MSRV 1.63.0+
7171
cargo update -p tempfile --precise "3.6.0"
72+
# reqwest 0.11.19 has MSRV 1.63.0+
73+
cargo update -p reqwest --precise "0.11.18"
74+
# hyper-rustls 0.24.1 has MSRV 1.60.0+
75+
cargo update -p hyper-rustls --precise 0.24.0
7276
# rustls 0.21.7 has MSRV 1.60.0+
7377
cargo update -p rustls:0.21.9 --precise "0.21.1"
7478
# rustls 0.20.9 has MSRV 1.60.0+
@@ -79,8 +83,6 @@ cargo update -p tokio --precise "1.29.1"
7983
cargo update -p tokio-util --precise "0.7.8"
8084
# flate2 1.0.27 has MSRV 1.63.0+
8185
cargo update -p flate2 --precise "1.0.26"
82-
# reqwest 0.11.19 has MSRV 1.63.0+
83-
cargo update -p reqwest --precise "0.11.18"
8486
# h2 0.3.21 has MSRV 1.63.0+
8587
cargo update -p h2 --precise "0.3.20"
8688
# rustls-webpki 0.100.3 has MSRV 1.60.0+

crates/esplora/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ default = ["std", "async-https", "blocking"]
3030
std = ["bdk_chain/std"]
3131
async = ["async-trait", "futures", "esplora-client/async"]
3232
async-https = ["async", "esplora-client/async-https"]
33+
async-https-rustls = ["async", "esplora-client/async-https-rustls"]
3334
blocking = ["esplora-client/blocking"]

0 commit comments

Comments
 (0)