bdk icon indicating copy to clipboard operation
bdk copied to clipboard

nakamoto as Compact Block Filter Blockchain

Open rajarshimaitra opened this issue 1 year ago • 5 comments

Description

An implementation of nakamoto as a BDK Blockchain to serve as an alter BIP157 syncing mechanism.

Commit 1 : adds a new module src/blockchain/compact_filters/nakamoto.rs which defines a CbfNode struct which holds the namakoto-client handlers. Which the implements Blockchain traits. 222a2b466626c07cae4db048c10014ca44514c3e

Commit 2 : Integrates the CbfNode backend with the bdk's blockchain test framework.

Notes to Reviewers

The current CI tests won't work because nakamoto doesn't support our MSRV. Though you can run the modified tests in your local with toolchain 1.63 or higher.

Few of the tests are intermittently failing and needs further investigation. But overall this PR is ready for review of to be used for testing..

Thanks for all the help and support from @cloudhead and others who pitched in for various fixes in upstream.

Checklists

All Submissions:

  • [x] I've signed all my commits
  • [x] I followed the contribution guidelines
  • [x] I ran cargo fmt and cargo clippy before committing

rajarshimaitra avatar Sep 13 '22 06:09 rajarshimaitra

Thanks @cloudhead for the review and suggestion.. It seems the structure of the crate has changed in recent master.. So I pinned the rev to 14902d3d5cc9442cdda82419f0f24277d86b243b. I couldn't find any release tag in github, and the published v0.3.0 in crates.io doesn't seem to include some latest fixes.. Anyway, this works for now, until we get a more stable release of nakamoto out in crates.io..

rajarshimaitra avatar Oct 12 '22 07:10 rajarshimaitra

@thunderbiscuit this now includes AnyBlockhain and ConfigurableBlockchain updates..

rajarshimaitra avatar Oct 12 '22 07:10 rajarshimaitra

@thunderbiscuit updated as suggested..

rajarshimaitra avatar Oct 13 '22 04:10 rajarshimaitra

One more extra commit is added to disable to existing compact_filters logic, so we don't need to unnecessarily build rocksdb and other stuffs not used for nakamoto client..

rajarshimaitra avatar Oct 13 '22 04:10 rajarshimaitra

Working on the FFI integration here: bitcoindevkit/bdk-ffi#207 With this wallet: Devkit Wallet Nakamoto branch

thunderbiscuit avatar Oct 13 '22 14:10 thunderbiscuit

Hey, we are in the process of releasing BDK 1.0, which will under the hood work quite differently from the current BDK. For this reason, I'm closing all the PRs that don't really apply anymore. If you think this is a mistake, feel free to rebase on master and re-open!

danielabrozzoni avatar Mar 16 '23 17:03 danielabrozzoni