-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add testing on Compact Block filters in CI #668
Add testing on Compact Block filters in CI #668
Conversation
Setup testing on Compact block filters blockchain backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall concept ACK on the idea of testing compact filter syncing in regtest.. Thanks for opening this up.. We might need this after integrating nakamoto too.. See here #680 (comment)
But it needs the following additions to work properly..
let bitcoind_port = test_client.bitcoind.params.rpc_socket.port(); | ||
let num_threads = 2; | ||
let mempool = Arc::new(Mempool::default()); | ||
let peers = (0..num_threads) | ||
.map(|_| Peer::connect(format!("localhost:{}", bitcoind_port), Arc::clone(&mempool), Network::Regtest)) | ||
.collect::<Result<_, _>>().unwrap(); | ||
CompactFiltersBlockchain::new(peers, "./wallet-filters", Some(0)).unwrap() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested yet, but I don't think this logic will work..
- You can't get compact filters from rpc port. You have to connect to the p2p port.
- The test client doesn't serve compact filters by default. You need to set a extra bitcoind args parameter accordingly to turn that on the test client.. Which can be done under a feature gate..
@rajarshimaitra , I will definitely get back to this once we integrate with Nakamoto. |
Upon further thinking.. I think this can go into bdk even without nakamoto.. From the PoV of a testing framework we will always have only one single backend.. And CBF operation with single peer will be same between current bdk's cbf module and nakamoto.. So it might make sense to get this done even before we get nakamoto and bring the bdk's cbf impl into testing.. In that case, was when we shift to nakamoto we will already have a something to test it against, at least single peer scenario.. On high level what needs to be done to get compact_filters to testing is
@vladimirfomene if you are open to work on this I would suggest to carry on, as you are already quite close to the final thing.. |
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! |
Setup testing on Compact block filters blockchain
backend.
Description
While working on #634, I realized we don't have a setup for carrying out test on Compact Block Filters blockchain in CI. This PR is a work in progress solution to get that setup.
Notes to the reviewers
For some reason the tests are taking too long to run.
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
CHANGELOG.md
Bugfixes: