-
Notifications
You must be signed in to change notification settings - Fork 23
Add support for bitcoin core 29.0 #131
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
base: master
Are you sure you want to change the base?
Conversation
5438355
to
1dbf4df
Compare
CI fail can be fixed by creating the RPC help file, I haven't downloaded Core v29 yet but I'd expect that on this branch we could do: contrib/run-bitcoind.sh start v29
bt29 help > verify/rpc-api-v29.txt |
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.
Man this is looking pretty good! This crate is hard to work on so don't feel bad if you miss things. I'm having a hard time reviewing because the changeset is so big but I've left a few comments that will make it a fair bit smaller. Keep at it! Appreciate your effort.
I tried running the command after starting the bitcoind v29, but it keeps say the |
dc856f3
to
3c6c22f
Compare
Oh I have a shell alias for each version, for v28 I have bt28: aliased to bitcoin-cli -rpcconnect=localhost:28049 -rpcuser=*** -rpcpassword=*** And fill in the stars for your setup. Remember the leading 280 comes from the config file of |
3c6c22f
to
8135a58
Compare
Thank you... It's done! |
798a62e
to
2308f10
Compare
20080f5
to
87a78dd
Compare
Can you get rid of all the formatting changes please. |
fb921bd
to
5709498
Compare
Done! |
fa9350a
to
1db66bf
Compare
It is surprising to see changes to |
Alright, so for v29, the |
Yes please. Anything that is different in one version to another should have a separate type, errors included. I'm not totally convince that we should re-use errors at all but we already do in submitpackage IIRC and its kinda nice. |
Alright, noted, I am going to do that right away... |
3daa910
to
f9e0d08
Compare
Can you add support to the |
I just merged #142 so the docs format in |
Definitely, although from how the script is, except I add it to the examples there, by default it should work with v29 if it is indicated in the config file. |
Noted! |
oooo, my bad I ran |
Needs a CI job man in the |
If you run Checking that the status claimed in the version specific rustdocs is correct ...
missing model type: dumpwallet DumpWallet
missing return type: signrawtransactionwithwallet SignRawTransactionWithWallet
missing model type: signrawtransactionwithwallet SignRawTransactionWithWallet Looks like the |
Thank you for pointing this out, for the signrawtransactionwithwallet, I missed the type, instead of SignRawTransaction, I used SignRawTransactionWithWallet. |
|
Please I need more clarity on this... I added v29_0 in the |
Very useful. |
On this branch are you able to run the v29 nodes with
|
Can you please update |
client/src/client_sync/mod.rs
Outdated
|
||
/// Arg for the `getblocktemplate` method. (v29+). | ||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default)] | ||
pub struct TemplateRequestV29 { |
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 guy should be in v29/mod.rs
(see how we handle AddressType
in v17 and v23). You'll need to move the other one and remove the V29
from the type name.
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.
Alright, noted...
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 will open another PR that will address moving the one for v17.
On further thought, so that I have a chance of reviewing this with more accuracy can you please split it up so that the first patch adds support for v29 putting 'TODO' for all the new methods. The add the methods as separate patches, either one per method if they are big or all together if it looks easy enough to review. Thanks man. |
woaw. I was able to run the command from my own end. That was what I used to generate the rpc-api txt file for v29. I was also able to run the script for v29 successfully... But I will check it again... |
Done, I observed something, there were no division for util and signer. |
Alright, there is only one new method for v29, which is the |
oh bother, that's not worth the effort splitting man. Leave it as is, I'll work through it. My bad. |
What's the status of this bro? The client still has methods in that are not needed. |
Yes, I want to create another PR to move the other ones out of client to where they belong in |
This PR adds support for the newly released bitcoin core version - v29.0
Updated RPCs
getmininginfo
which now returns nBits and the current target in the target field. It also returns a next object which specifies the height, nBits, difficulty, and target for the next block. (test added)getblock
andgetblockheader
which now return the current target in the target field (test added)getblockchaininfo
andgetchainstates
which now return nBits and the current target in the target field. (test added)getblocktemplate
whose RPC curtime (BIP22) and mintime (BIP23) fields now account for the timewarp fix proposed in BIP94 on all networks. (test added)New RPCs
getdescriptoractivity
rpc method which can be used to find all spend/receive activity relevant to a given set of descriptors within a set of specified blocks. (test added)Closes #129