-
-
Notifications
You must be signed in to change notification settings - Fork 11
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 Mempool indexer #50
Conversation
Thank you! One small thing: can you pls here and in the other PRs use |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #50 +/- ##
======================================
Coverage 0.0% 0.0%
======================================
Files 11 16 +5
Lines 1165 1436 +271
======================================
- Misses 1165 1436 +271
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Since 80% of the code is duplicated with esplora, I think this should be re-factored just as a wrapper around explora client re-using it
Thank you for your advice. I will make timely changes through |
Understood, the code looks like it can be reused a lot, I try to make a wrapper, streamline the code |
The refactored code now reuses most of the esplora code and removes unnecessary dependencies. Additionally, I've updated the [patch.crates-io] section. If have any further suggestions, please let me know : ) |
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 like it! One small addition - and from my side we are good to go.
Added @zoedberg to review as well
PS. Can you also pls run cargo +nightly fmt --all
?
We also need to fix broken cli feature build: https://github.com/BP-WG/bp-wallet/actions/runs/9937214077/job/27448310034?pr=50 |
Thanks for your suggestion, I will execute 'fmt' simultaneously. When I execute 'fmt' during development, it will automatically 'fmt' other code, I am worried that it will cause inconvenience to the repo, so fmt is very cautious |
I've located the problem. I'll fix it |
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.
ACK 07bf47f
When I try to use either explore or mempool I somehow get For instance, it happens when running $ bp create -n testnet4 --mempool --tr-key-only "[a181fad6/86h/1h/0h]tpubDC8SnPn5p7kso1Wp2wYyziUgisECwdFQQyVUu2viNttcxUFzuHcW1E1UXiETHBCD3YKmoB2oXMkGUnmKsehWtzTK1DhQXmyQ8RoaCDjW3Zc/<0;1>/*" testTrKeyonly |
I tried to run the following command in my local, and the output is as follows
I see that this error is coming from |
Find a solution because a local library is missing, usually due to developers using a new test environment. I'll try and see what else I can find |
Thank you for your help. I know it is unrelated to your PR. Strange it wasn't happening before with esplora... |
I think I may have found the reason, because bp-esplora's dependency And before we rely on all cause by |
Perfect, thank you! After |
Very excited, it's all coming back! :) |
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.
tACK - I was able to use all these changes with actual wallet
Cargo.toml
Outdated
all = ["electrum", "esplora", "fs", "cli", "clap", "log"] | ||
cli = ["base64", "env_logger", "clap", "shellexpand", "fs", "serde", "electrum", "esplora", "log"] | ||
all = ["electrum", "mempool", "fs", "cli", "clap", "log"] | ||
cli = ["base64", "env_logger", "clap", "shellexpand", "fs", "serde", "electrum", "mempool", "log"] |
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.
For now this is correct because mempool
is just an alias for esplora
, but one day the mempool
feature could change (it could drop esplora
) and by mistake we might forget to re-include esplora
to all
/cli
features. Therefore I suggest adding mempool
to all
and cli
instead of replacing esplora
with mempool
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.
This PR adapts bp-wallet to the changes made in bp-invoice for Testnet4 support.
Additionally, it introduces support for the
mempool
Indexer (orResolver
), ensuring compatibility with the any-network.If you have any suggestions, please leave your valuable comments, I will actively cooperate with the revision, thank you very much