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

Bitcoind REST sync #496

Open
TheBlueMatt opened this issue Mar 18, 2025 · 4 comments
Open

Bitcoind REST sync #496

TheBlueMatt opened this issue Mar 18, 2025 · 4 comments

Comments

@TheBlueMatt
Copy link

Its probably not all that important and most folks wouldn't use it, but if its possible to do a sync via bitcoind REST easily, it'd be nice to support. I assume BDK would have to support it and that's kinda it since LDK already does?

@tnull
Copy link
Collaborator

tnull commented Mar 19, 2025

Its probably not all that important and most folks wouldn't use it, but if its possible to do a sync via bitcoind REST easily, it'd be nice to support.

Hmm, I'm not fully convinced, could you reiterate the benefits over RPC, besides the absence of any authentication method?
I think there are performance benefits, but can't fully recall how impactful they are?

I assume BDK would have to support it and that's kinda it since LDK already does?

No, actually we're not using the bdk_bitcoind_rpc crate but chose to unify chain polling for both LDK and BDK based on lightnig-block-sync, so if we want we should be able to add REST support independently from BDK.

@TheBlueMatt
Copy link
Author

Hmm, I'm not fully convinced, could you reiterate the benefits over RPC, besides the absence of any authentication method?

Abscence of auth is really important, eg it means you can run one bitcoind and have multiple services talk to it, without the ability to do things like stop the node, disconnect all its peers, etc.

I think there are performance benefits, but can't fully recall how impactful they are?

Nontrivial - you skip the JSON + hex encoding for various things and can fetch straight binary. Maybe more important, you can trivially slap nginx in front of it and cache block data and the like rather than having bitcoind load it from disk.

@tnull
Copy link
Collaborator

tnull commented Mar 21, 2025

Nontrivial - you skip the JSON + hex encoding for various things and can fetch straight binary. Maybe more important, you can trivially slap nginx in front of it and cache block data and the like rather than having bitcoind load it from disk.

Ah, right. Thanks for refreshing my memory. I agree we should go for it, should be easy enough.

@enigbe
Copy link
Contributor

enigbe commented Apr 5, 2025

Hi @tnull, happy to take this on if it's unassigned. Are there any specific considerations or preferences you'd like me to keep in mind before I get started?

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

3 participants