rust-electrum-client icon indicating copy to clipboard operation
rust-electrum-client copied to clipboard

Async support?

Open Kixunil opened this issue 2 years ago • 14 comments

As a networking-related dependency, this would be a great candidate for making it async.

Kixunil avatar Feb 15 '23 12:02 Kixunil

As I mentioned at https://github.com/bitcoindevkit/bdk/issues/66 I guess it would also make it possible to add Tor support using arti-client.

oleonardolima avatar Oct 24 '23 00:10 oleonardolima

@oleonardolima I think just make it possible to switch up any transport layer using a trait. Probably tokio::AsyncRead etc.

Kixunil avatar Oct 24 '23 08:10 Kixunil

Good, that makes sense. I'll try to take a look at it after adding the support on rust-esplora-client

oleonardolima avatar Oct 26 '23 22:10 oleonardolima

@oleonardolima FYI I hand-wrote an async client with a few methods that were required for my project. I may be able to publish it as it may serve as a starting point.

Kixunil avatar Oct 27 '23 10:10 Kixunil

@Kixunil Cool! Thanks, that would be really helpful and a great starting point.

oleonardolima avatar Oct 27 '23 23:10 oleonardolima

I just finished here thinking to trying to use arti_client with rust-electrum-client but noting that is async based while this is not.

Even some temporary hack like SyncIoBridge seems not easily applicable here, because the stream is not handled splitted (separated Read/Write)

RCasatta avatar Dec 14 '23 13:12 RCasatta

@RCasatta yeah, IIRC that's why I ended up writing my own and as I did I found that the whole thing is quite involved.

@oleonardolima sorry to keep you waiting this long I will try soon.

Kixunil avatar Dec 14 '23 17:12 Kixunil

@Kixunil No worries, I'm still working on fedimint and rust-esplora-client tor support at the moment, but let me know when you do it.

oleonardolima avatar Dec 15 '23 00:12 oleonardolima

It's out now: https://github.com/Kixunil/async-electrum-client

Kixunil avatar Dec 15 '23 23:12 Kixunil

update: I'll probably start working on this during this week, using the @Kixunil work as a starting point.

Do you have any other approach in mind @RCasatta ?

oleonardolima avatar Feb 05 '24 11:02 oleonardolima

Do you have any other approach in mind @RCasatta ?

No

RCasatta avatar Feb 12 '24 17:02 RCasatta

@oleonardolima curious, are you still actively working on this?

jurvis avatar May 02 '24 21:05 jurvis

@jurvis I'm not currently working on this, other issues took priority, although it's still on my list. Is it a pressing issue/feature that you need?

oleonardolima avatar May 03 '24 14:05 oleonardolima

@oleonardolima not pressing, just asking! do you have a draft branch going somewhere?

jurvis avatar May 03 '24 14:05 jurvis