Skip to content

Implement RPC changes in v30 - #412

Merged
tcharding merged 4 commits into
rust-bitcoin:masterfrom
jamillambert:1107-v30-RPC-update
Nov 9, 2025
Merged

Implement RPC changes in v30#412
tcharding merged 4 commits into
rust-bitcoin:masterfrom
jamillambert:1107-v30-RPC-update

Conversation

@jamillambert

@jamillambert jamillambert commented Nov 7, 2025

Copy link
Copy Markdown
Collaborator

There are four remaining RPCs that have changes in v30 that need to be implemented:

  • settxfee is deprecated in v30 and removed in v31. Feature gate the test to v30 and below and for v30 add the required -deprecatedrpc=settxfee flag. Remove TODO from the types table.
  • In v30 it is no longer possible to create a legacy wallet. This means that migratewallet cannot be tested using only v30. There are no changes to the RPC in v30 so the v29 test is still valid. Add a comment to the types table and test.
  • getwalletinfo had some return fields removed in v30 and a new flags field was added. Update the model to make the removed fields options and add the new flags. Update all the into functions. Redefine the type, error and into function for v30. Remove the TODO from the types table. Remove the v29_and_below feature gate from the test.
  • listwalletdir has a new warnings field was added in v30. Redefine the type for v30, there is no model. Remove the TODO from the types table. Remove the v29_and_below feature gate from the test.

Together with #387, #388, #409 and #410 Closes #384

settxfee is deprecated in v30 and removed in v31.

Feature gate the test to v30 and below and for v30 add the required
`-deprecatedrpc=settxfee` flag. Remove TODO from the types table.
In v30 it is no longer possible to create a legacy wallet. This means
that migratewallet cannot be tested using only v30.

Add a comment to the types table and test.
Some return fields were removed in v30 and a new flags field was added.

Update the model to make the removed fields options and add the new
flags. Update all the into functions.

Redefine the type, error and into function for v30. Remove the TODO from
the types table. Remove the `v29_and_below` feature gate from the test.
A new `warnings` field was added in v30.

Redefine the type for v30, there is no model. Remove the TODO from
the types table. Remove the `v29_and_below` feature gate from the test.

@tcharding tcharding left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 2343534

@tcharding
tcharding merged commit c77da63 into rust-bitcoin:master Nov 9, 2025
30 checks passed
@tcharding

Copy link
Copy Markdown
Member

Nice work man. This PR highlights an interesting thing about the version specific types (we really need a shorter name for those) and the model types. As the library progresses to support new versions of Core users using the model types face breakage when they upgrade but users of the version specific types (vs-types?) do not. I.e., the vs-types should be stable across releases except for bug fixes but the model types are perma-unstable. Interesting, I never thought of it like this before.

@jamillambert

Copy link
Copy Markdown
Collaborator Author

One (annoying) solution is to make everything in the model an Option?

@tcharding

Copy link
Copy Markdown
Member

Interesting idea, doesn't help with when Core adds new fields though. We could have non_exhaustive but I think that both these 'solutions' make the crate to annoying to use. Better just to be perma-unstable I rekon. Lets wait and see if any user ever asks us wen-1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Bitcoin Core v30.0

2 participants