Add support for Bitcoin Core 31.0#586
Conversation
|
Thanks for the contribution! Can you please explain how you went about this? Specifically exactly which parts did you use an LLM for? And if I do a review are you going to just feed the comments into an LLM or do the suggestions yourself? Thanks |
|
re: #586 (comment) I used it for copying the modules from v30 (commit 2 was done mostly by the LLM with some tweaks from my side) and gather historical context about how major releases from Core are supported, #387 was my reference.
Definitely myself :) |
6db6237 to
6022508
Compare
| not(feature = "31_0"), | ||
| not(feature = "30_2"), |
There was a problem hiding this comment.
This change confused me. Can you put a patch at the front of this PR that changes this to:
// This makes the build error more succinct if someone tries to build with --no-default-features.
#[cfg(not(feature = "0_17_2"))]
pub const VERSION: &str = "never-used";And the reason this works is that later version features enable previous ones.
|
There is a slight problem here. In Said another way, its unusual that there are no re-exports in Does that make sense? The Thanks for the work! |
6022508 to
882b4e0
Compare
|
re: #586 (comment) Thanks for the review! I've moved away from the copying approach and shifted to re-exporting from v30 as per your suggestion. Additionally, I've created f483441 to relax a check in |
882b4e0 to
bdfa22f
Compare
jamillambert
left a comment
There was a problem hiding this comment.
I've had a look over and it looks good so far. I'll finish the check tomorrow.
How did you determine which RPCs needed updating and had to be marked as TODO in v31?
|
re: #586 (review) Hi, thanks for reviewing the code!
Actually there are more RPCs to be updated besides those I originally listed in the description (which I'll update). Initially I just read the release notes looking for removed/new RPCs and noticed a few with changes in the schema, then more surfaced while running integration tests. |
Can we then err on the side of caution and mark everything TODO unless the RPC has been checked and confirmed to be the same as in the version that v31 is reexporting. For this PR it is fine to have a lot of TODOs and then in follow ups address them or remove them. |
|
re: #586 (comment)
Hi, sorry, I don't get this at all. I thought integration tests already confirmed the re-exported RPCs are correct. |
No they don't unfortunately. #58 explains it a bit further and what is being done to get closer to testing everything. They catch a lot of cases with changes in the return shape of an RPC. But if there are new optional fields that are not returned it will not catch it. The docs of the more recent Core versions are fairly reliable and can be cross checked between versions to see if there are any changes. |
|
Please be warned @xyzconstant this is not a great repo for newer devs, I'm not saying you are one, just giving you a heads up. Also, unless you have some reason to want to continue contributing to this repo I would not think its worth your time to work out all the strangeness of the repo. But by all means don't let me stop you. Also please allow me to re-iterate I am extremely allergic to reviewing LLM code. Please make sure you understand the reason for every single line of code you push. |
Bitcoin Core 31.0 has been released and brings the following RPC changes:
settxfee(deprecated in v30)getmempoolclustergetmempoolfeeratediagramgetprivatebroadcastinfoabortprivatebroadcastgetblock: addedcoinbase_txin the responsegetpeerinfo: droppedstartingheightfieldgettxspendingprevout: added new optional params and response fieldgetmempoolentry: include Chunk size and chunk feesThis PR enables binary downloads for Core 31.0 and re-exports v31 client types from the
bitcoindcrate.Additionally, most of the changes are copies from v30, only
settxfeehas been dropped while updated/new RPCs are marked TODO intypes/src/v31/mod.rsandverify/. Integration tests for the 4 updated RPCs are excluded until typed support is implemented.Commits
bitcoind: add support for Bitcoin Core 31.0 release: Enable downloads for Core 31.0client/types/verify: copy v30 modules to v31:cp -rof v30 tree with label renames only.v31: apply version-specific edits: Adjust new v31 code to release specifics.bitcoind: re-export v31 client types: export client types for v31.0.