Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Electrum support #196

Open
tnull opened this issue Nov 15, 2023 · 4 comments
Open

Add Electrum support #196

tnull opened this issue Nov 15, 2023 · 4 comments
Milestone

Comments

@tnull
Copy link
Collaborator

tnull commented Nov 15, 2023

We will add Electrum support.

@enigbe
Copy link
Contributor

enigbe commented Sep 28, 2024

Hi @tnull,
I would like to work on this if no one is assigned to it.

I have outlined a strategy to:

  1. Create a new type, i.e. ElectrumSyncClient
  2. Introduce a set_chain_source/set_tx_sync/set_electrum_client function on NodeBuilder to allow users customize their transaction filters, and default to the EsploraSyncClient in the absence of customization.
  3. Test with one or a few electrum servers. Here is a list of some I have read about and/or used. Given that I don't have extensive knowledge of their adoption in the industry, I would appreciate other suggestions from you to trim/expand the list.

@tnull
Copy link
Collaborator Author

tnull commented Sep 30, 2024

Hi @tnull, I would like to work on this if no one is assigned to it.

Ah, thanks for showing interest for this! So, this is still blocked on #358, and a follow-up refactoring our syncing logic I intend to open some time this week. After that it should be relatively easy to add Electrum support. Tbh. I might even try to just do it in a commit as part of that refactor PR, we'll see. Happy to have you pick it up though if it doesn't work out though.

I have outlined a strategy to:

  1. Create a new type, i.e. ElectrumSyncClient
  2. Introduce a set_chain_source/set_tx_sync/set_electrum_client function on NodeBuilder to allow users customize their transaction filters, and default to the EsploraSyncClient in the absence of customization.
  3. Test with one or a few electrum servers. Here is a list of some I have read about and/or used. Given that I don't have extensive knowledge of their adoption in the industry, I would appreciate other suggestions from you to trim/expand the list.

So 1. should already be done in LDK's lightning-transaction-sync (lightningdevkit/rust-lightning#2685), and 2. is part of the syncing (API) refactor mentioned above (at least I hope it will be as easy as I think it is :) ).

Testing (i.e., 3.) sounds good and I'd be very curious to learn if we find any hiccups. I think so far the rust-electrum-client we're building on has been pretty conservative about adding protocol features that aren't widely supported by all server implementations, so I hope we should get good compatibility. But, it would be great to test if this indeed is the case.

@enigbe
Copy link
Contributor

enigbe commented Oct 1, 2024

I might even try to just do it in a commit as part of that refactor PR, we'll see. Happy to have you pick it up though if it doesn't work out though.

If this is still up when you are done with refactoring the syncing logic, I would be happy to pick it up.

So 1. should already be done in LDK's lightning-transaction-sync

Yeah, I spent some time reading electrum and esplora modules to build an understanding of what's required. It looked like adding a concrete type like was done with EsploraSyncClient, and configuring, was all it would require, given that syncing is already implemented in lightning-transaction-sync.
I would like to review this when it is ready as I build more understanding of the project.

pub(crate) type ChainSource = EsploraSyncClient<Arc<FilesystemLogger>>;

Testing (i.e., 3.) sounds good and I'd be very curious to learn if we find any hiccups. I think so far the rust-electrum-client we're building on has been pretty conservative about adding protocol features that aren't widely supported by all server implementations, so I hope we should get good compatibility. But, it would be great to test if this indeed is the case.

Open to working on this when you are done.

@tnull
Copy link
Collaborator Author

tnull commented Oct 17, 2024

This is slipping, but we will land all prerequisites in 0.4. So should do this soon, possibly as a fast-following 0.5.

@tnull tnull modified the milestones: 0.4, 0.5 Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants