Comments (7)
Hey all just a reminder that @danielabrozzoni and I are in Nashville so may not get too much testing done this week, but I propose to help us divide and conquer we each focus on one of the blockchain clients and do at least one or two manual + integration tests .. and as we go along we can compare approaches and results. Would this division work for everyone?
- electrum: @notmandatory
- esplora: @vladimirfomene
- rpc: @rajarshimaitra
- cbf: @danielabrozzoni
from bdk_core_staging.
We should first cover all the basic tests included in the BDK blockchain tests before considering all the edge cases of bdk_core.
We can organize them in a separate integration test module following the standard integration test guidelines of rust.. https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/book/second-edition/ch11-03-test-organization.html#integration-tests
This will include
- The test framework with
bitcoind
regtest. - Helper functions to scan the tracker with bitcoin core RPC. Code already available in the RPC example PR.
- Include all the tests covered in BDK's Blockchain module.
More tests covering edge cases and other behaviors not covered by the BDK wallet can be added to the same test module.
from bdk_core_staging.
Helper functions to scan the tracker with bitcoin core RPC. Code already available in the RPC example PR.
Why would this be necessary when we are testing Electrum/Esplora?
I think it will make sense to focus on the result of scanning/syncing in BDK Core. Some tests in BDK don't have this focus.
We want to have a pre-existing history of transactions under a descriptor, and sync BDK Core with it and call methods on the tracker to see if it makes sense.
An example checklist will be the following:
- Are all
TxOut
s indexed? - Do all relevant transactions exist in sparsechain?
- Is the returned UTXO set correct?
- Is the balances correct?
- Are the checkpoints correct? Do they exist in the "real" history?
- Is the last used index, next unused undexes correct?
from bdk_core_staging.
Removing myself as I will only be able to focus on testing for one example and preferably RPC.
I am not fully clear on some points like If we provide the methods with "already-reorged" data
as there doesn't seem to be any method taking in any blockchain-related data. But looking forward to seeing the full scenario list, and I will try to reproduce them with RPC example and bitcoind
.
from bdk_core_staging.
Removing myself as I will only be able to focus on testing for one example and preferably RPC.
I am not fully clear on some points like
If we provide the methods with "already-reorged" data
as there doesn't seem to be any method taking in any blockchain-related data. But looking forward to seeing the full scenario list, and I will try to reproduce them with RPC example andbitcoind
.
No worries Raj.
Methods take in checkpoints. That is "Blockchain-related" data. We emulate a situation when we already have pre-existing data existing before call to the methods.
from bdk_core_staging.
Methods take in checkpoints. That is "Blockchain-related" data. We emulate a situation when we already have pre-existing data existing before call to the methods.
Okay. If I am thinking right, then we can also do the same by reorging bitcoind
and resanning with the previous chain-state of the tracker. Won't that be a more "real" scenario than trying to feed the data manually in the wallet_txid_scan
function?
Anyway, I think it will be clearer to talk over code than words. I will try to sketch up something by the end of the week.
from bdk_core_staging.
I think esplora, electrum and the bitcoin rpc wallet are ready to test. What it exactly means to test CBF is not really clear to me. The only thing I can think of is that there is a API in CBF that when given a list of checkpoints (block height and hash) returns a stream of blocks starting at the block after the last checkpoint it found that is still in the chain.
from bdk_core_staging.
Related Issues (20)
- `KeychainTxOutIndex::script_pubkeys_of_keychain` might be broken HOT 1
- Inflate_changeset must not produce a changeset that has conflicts HOT 3
- Add `TxGraph` fee test with missing inputs
- new address and next_unused should return a changeset HOT 1
- Add more cases for `append_keychain_derivation_indices` test
- "ChangeSet" API is error prone in multi-threaded contexts HOT 1
- Inflate_changeset is unsound in multi-threaded contexts
- KeychainTxOutIndex should look ahead
- Make CLI output nice HOT 2
- Esplora and Electrum should not have Reorg error
- Add async API for esplora HOT 2
- Allow marking utxos as "spent" even when they're not HOT 3
- Decide on MSRV for bdk_chain HOT 4
- Add KeychainTxOutIndex::reserve_next_unused_spk
- `KeychainTracker` should be `Tracker<T>`
- Iterators over spks should have their own iterator type
- Applying block APIs
- Extract file_store out of bdk_chain
- ARCHIVE THIS REPO
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bdk_core_staging.