Skip to content
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

Test blockchain backend #543

Open
LLFourn opened this issue Feb 16, 2022 · 7 comments
Open

Test blockchain backend #543

LLFourn opened this issue Feb 16, 2022 · 7 comments
Labels
discussion There's still a discussion ongoing module-blockchain tests

Comments

@LLFourn
Copy link
Contributor

LLFourn commented Feb 16, 2022

Rather than running a regtest node it would be cool if we just had a simulated blockchain that we could do things to from test code.

idea originally from: #446

@casey
Copy link

casey commented Jul 30, 2022

Ideally it would also be fast. We're running tests against regtest nodes, and our main issue is that it's very slow.

@LLFourn
Copy link
Contributor Author

LLFourn commented Aug 1, 2022

Happy to mentor someone on this issue if anyone wants to have a shot. It looks like fun!

@casey
Copy link

casey commented Aug 1, 2022

See my comment here: #690 (comment)

TL;DR Maybe we should implement a dummy RPC server instead of a dummy bdk::blockchain::Blockchain?

@danielabrozzoni
Copy link
Member

Where we would use this backend, btw? In src/testutils/blockchain_tests.rs, I suppose?

TL;DR Maybe we should implement a dummy RPC server instead of a dummy bdk::blockchain::Blockchain?

Eh, to me it looks more though to implement a dummy RPC server, but I don't really know...

@rajarshimaitra
Copy link
Contributor

One thing I was wondering was, for this to work, we need to mock a considerable portion of bitcoin core's mempool and other behaviors too, if we wanna use it for any meaningful testing situation.. Not sure how difficult or worthwhile its gonna be..

@notmandatory notmandatory added the discussion There's still a discussion ongoing label Aug 25, 2022
@notmandatory
Copy link
Member

@vladimirfomene as we discussed on discord, with the new 1.0 bdk electrum/esplora/rpc clients it's worth taking another look at using a mocking framework instead of or in addition to our current integration tests. One framework that looks like it could do the job is https://docs.rs/mockall/latest/mockall/.

@notmandatory notmandatory added this to BDK Sep 21, 2023
@notmandatory notmandatory moved this to Todo in BDK Sep 21, 2023
@nondiremanuel nondiremanuel added this to the 1.0.0-beta.0 milestone Sep 26, 2023
@evanlinjin evanlinjin moved this from Todo to Discussion in BDK Jan 25, 2024
@evanlinjin evanlinjin modified the milestones: 1.0.0-beta, 1.0.0 Jan 25, 2024
@notmandatory notmandatory modified the milestones: 1.0.0-alpha, 1.0.0-beta Mar 18, 2024
@notmandatory
Copy link
Member

Moved to beta release since this is a testing issue. Due to level of work to do this may have to push it out to a post 1.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion There's still a discussion ongoing module-blockchain tests
Projects
Status: Discussion
Development

No branches or pull requests

7 participants