Implement `bdk_nakamoto` chain-source crate
This crate should use https://github.com/cloudhead/nakamoto to implement a chain-source crate.
Relevant Work
- #1055 This is based off an older version of BDK 1.0. BDK has changed a lot since then. However, this can be used as a template for future work.
I think the cbf_node make sense. Weather we have it as lib crate or not, its still gonna be a "mininode". We can also later on create a standalone binary that can be synced with a descriptor, so that it can be used outside of context of BDK too?? But thats for far future.
I think existing codes in current compact_filters module can used to work on top of it. Having a separate repo will help in issue tracking too. Something like rust-electrum-client makes perfect sense..
Depending on how things go with #680 we may be able to close this.
This is being done via the Alpha 1.0.0 changes with a new bdk_nakamoto crate.
I have re-purposed this ticket to track the bdk_nakamoto crate implementation.
I'd be interested in picking this up if no one has yet started. I may have questions. I can see some working examples such as #1055 and also LLFourn/bdk_core_staging#153. If anyone knows of other examples in the wild demonstrating how nakamoto can be used to get chain data, let me know.
Ideally, BDK and nakamoto should depend on the same version of rust bitcoin, or else we run into type mismatch errors that are cumbersome to try to work around. If we can get the dependencies in sync, it's still worth a try at implementing.
Another approach worth exploring is to use get_block_filter from bitcoincore-rpc, and match the filter against a set of SPKs with BlockFilter::match_any. Since this needs bitcoincore-rpc crate, I guess it could be a new module in bdk_bitcoind_rpc to supplement the current block Emitter.
Oh nice, I see cloudhead/nakamoto#145 is underway