feat(rpc): introduce FilterIter
The PR adds a bip158 module to the bdk_bitcoind_rpc crate along with a new type FilterIter that can be used for retrieving blocks from a full node which contain transactions relevant to a list of script pubkeys.
Notes to the reviewers
Changelog notice
bdk_bitcoind_rpc: Added bip158 module as a means of updating bdk_chain structures
Checklists
All Submissions:
- [x] I've signed all my commits
- [x] I followed the contribution guidelines
- [x] I ran
cargo fmtandcargo clippybefore committing
New Features:
- [x] I've added tests for the new feature
- [x] I've added docs for the new feature
This is what we've all been waiting for.
ConceptACK. Don't have time for a full review now. @evanlinjin?
Thanks for the review @oleonardolima
Rebased and addressed comments from @oleonardolima
In the last push
- Removed unneeded
next_filterfield - Fixed up test checking for
Error::NoScripts - Added test
filter_iter_returns_matched_blocks
CI failure seems unrelated
Rebased
Rebased
Thanks @notmandatory
We need to test this against reorgs. It seems like the architecture of this may result in inconsistent state of checkpoints during reorgs.
- Have a chain with blocks
.. [100:A] [101:B]with relevant txs in both A and B. - Sync up to 100 (calling
.next). - Reorg so that blocks from 100 are replaced (inclusive).
.. [100:A'] [101:B']. - Call
.nextagain. - Check that checkpoints end in
.. [100:A'] [101:B']and we have emitted relevant txs inA'andB'.