Skip to content

Bitcoind REST sync #496

Closed
Closed

Description

@TheBlueMatt

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?

Activity

  1. tnull commented on Mar 19, 2025

    @tnull
    Collaborator

    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.

  2. TheBlueMatt commented on Mar 21, 2025

    @TheBlueMatt
    ContributorAuthor

    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.

  3. tnull commented on Mar 21, 2025

    @tnull
    Collaborator

    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.

  4. enigbe commented on Apr 5, 2025

    @enigbe
    Contributor

    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?

  5. tnull commented on Apr 7, 2025

    @tnull
    Collaborator

    Hi @tnull, happy to take this on if it's unassigned.

    Cool, go for it!

    Are there any specific considerations or preferences you'd like me to keep in mind before I get started?

    I think generally you'll want to keep it as analogous / DRY as possible w.r.t. the RPC variant. You'll want to use
    https://docs.rs/lightning-block-sync/latest/lightning_block_sync/rest/struct.RestClient.html for it.

    Also note that we're planning to do a bunch of cleanups/refactors/code moves in the chain module after #486 lands, so you might or might not want to wait on that, as it could bring some rebase pain.

  6. enigbe commented on Apr 8, 2025

    @enigbe
    Contributor

    Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions