bitcoindevkit / bdk

A modern, lightweight, descriptor-based wallet library written in Rust!
Other
796 stars 284 forks source link

Integrated TOR proxy #66

Open notmandatory opened 3 years ago

notmandatory commented 3 years ago

Create example code and blog post for how to use integrated rust tor client to sync bdk wallet with tor enabled blockchain service such as blockstream.info (http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/).

see:

https://github.com/MagicalBitcoin/libtor https://gitlab.torproject.org/tpo/core/arti

notmandatory commented 1 year ago

Arti has made it to a 1.0 release! https://blog.torproject.org/arti_100_released/

notmandatory commented 9 months ago

@oleonardolima has experience with this from his work adding arti in the fedimint client.

oleonardolima commented 8 months ago

@notmandatory I still need to get up to date on the changes BDK went through in the past months, but the syncing and data fetching are either done through rust-esplora-client or rust-electrum-client, is that right?

Adding Tor (or any other general anonymized transport protocol), as a feature to each crate would be a better approach?

This would allow any user of the crate to have Tor support too 🤔

I need to take a deeper look at reqwest, minreq and double-check the required changes, but as far as I can tell the minreq changes seem somewhat straightforward (at least at a first sight level).

oleonardolima commented 8 months ago

I created a new issue on rust-esplora-client with the approach, the idea basically adding the support by arti-hyper as a new feature flag.

Adding support to rust-electrum-client would be "easier", as it's based on the ClientType, but the problem is that arti-client usage requires async, which is currently not supported 😢

notmandatory commented 8 months ago

Targeting this for BDK 1.1 milestone for now. Would be a great feature to have.