Implement the `UtxoSource` interface for REST/RPC clients
authorMatt Corallo <git@bluematt.me>
Sat, 29 Apr 2023 22:32:57 +0000 (22:32 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 23 Aug 2023 21:48:03 +0000 (21:48 +0000)
commit01857b51a1e798ef344af845351b1c05c1c8a677
tree442e457d051d2b6ee78cecbb585fcba8f9069a97
parent8164cb930714129cde4d3f671f6f0b82621285c0
Implement the `UtxoSource` interface for REST/RPC clients

In LDK, we expect users operating nodes on the public network to
implement the `UtxoSource` interface in order to validate the
gossip they receive from the network.

Sadly, because the DoS attack of flooding a node's gossip store
isn't a common issue, and because we do not provide an
implementation off-the-shelf to make doing so easily, many of our
downstream users do not have a `UtxoSource` implementation.

In order to change that, here we implement an async `UtxoSource`
in the `lightning-block-sync` crate, providing one for users who
sync the chain from Bitcoin Core's RPC or REST interfaces.
lightning-block-sync/src/convert.rs
lightning-block-sync/src/gossip.rs [new file with mode: 0644]
lightning-block-sync/src/lib.rs
lightning-block-sync/src/rest.rs
lightning-block-sync/src/rpc.rs