-
Notifications
You must be signed in to change notification settings - Fork 1
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
EXP-189: replace homegrown Bitcoin RPC for bitcoind-json-rpc-types
#251
EXP-189: replace homegrown Bitcoin RPC for bitcoind-json-rpc-types
#251
Conversation
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## master #251 +/- ##
==========================================
+ Coverage 56.53% 58.20% +1.67%
==========================================
Files 132 133 +1
Lines 14223 14404 +181
==========================================
+ Hits 8041 8384 +343
+ Misses 6182 6020 -162
|
rust-bitcoincore-rpc
official craterust-bitcoind-json-rpc
f2da3f7
to
198cc2d
Compare
rust-bitcoind-json-rpc
rust-bitcoind-json-rpc-client
d3fc8fd
to
171f4e8
Compare
rust-bitcoind-json-rpc-client
rust-bitcoind-json-rpc-types
and jsonrpsee
rust-bitcoind-json-rpc-types
and jsonrpsee
bitcoind-json-rpc-types
and jsonrpsee
ef450e4
to
5feee87
Compare
@bewakes can you help me debug what's going with the functional tests? |
bitcoind-json-rpc-types
and jsonrpsee
bitcoind-json-rpc-types
and jsonrpsee
bitcoind-json-rpc-types
and jsonrpsee
bitcoind-json-rpc-types
and jsonrpsee
Ok we are hitting paritytech/jsonrpsee#888 which exactly mentions Theoretically this is fixed in bitcoin/bitcoin#27101 but I cannot see from the release notes which version this was included. |
bitcoind-json-rpc-types
and jsonrpsee
bitcoind-json-rpc-types
0c57eda
to
f2579b8
Compare
f008d22
to
4373844
Compare
Ok this is ready for the reviews. I have no idea why some functional tests are failing. |
4373844
to
1480c85
Compare
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.
Generally looks good. Possibly could be using the storage ops interface in one place but I'm not completely sure.
7eac515
to
f6194c5
Compare
f6194c5
to
10b8f69
Compare
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.
Looks good, minor comments.
fe4dbb6
to
643d7d3
Compare
8ec5d4f
to
51cc522
Compare
Description
Replacing our homegrown solution with an off-the-shelf crate,
bitcoind-json-rpc-types
(https://crates.io/crates/bitcoind-json-rpc-types).Also tried to improve all the docstrings of the functions that I had to touch.
I gave up going full
rust-bitcoin
and replacing allu64
s with properbitcoin::Amount
andbitcoin::absolute::Height
.This PR is huge as it is. I'll open a new ticket.
We have 4 kinds of traits for clients that somehow interface with the bitcoin blockchain/node:
BitcoinReader
: these only consume stuff from the blockchain.BitcoinBroadcaster
: can broadcast things to the blockchain (for now only has thesend_raw_transaction
).BitcoinSigner
: the one that signs, i.e. has the private keys.BitcoinWallet
: could be a watch-only wallet that only has Xpubs.Right now I don't see a huge advantage in that, hence I'll move that to a ticket.
I also got rid of a bunch of custom types and tried to use the ones
bitcoind-json-rpc-types
provided, and if not possible I've create some new types following the convention ofbitcoind-json-rpc-types
. These might be upstreamed later as a PR to it. These are:ListUnspent
: the result of the calllistunspent
ListTransactions
: the result of calllisttransactions
SignRawTransactionWithWallet
: the result of callsigntransactionwithwallet
Type of Change
Checklist
Related Issues
EXP-189
Closes #81.