-
Notifications
You must be signed in to change notification settings - Fork 260
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
Support different RPC calls for different versions of Core #355
Comments
It's a bit tough with Rust lacking dependent types, and the "version of Core" being a runtime thing. But one idea is that the Oooor, we could have separate tokens for each version we support, each of which implement some sort of |
One problem I had with I considered on multiple occasions just adding a |
Better late than never! I think this would be a great idea. It's probably a fairly common thing for people to block the |
What would be a good return value for a {
"version": "27.0rc1"
} or, for example, the following based on https://github.com/bitcoin/bitcoin/blob/v27.0rc1/configure.ac#L2-L6 {
"major": 27,
"minor": 0,
"build": 0,
"release_candidate": 1
} or maybe even both? Also note that Bitcoin Core does not follow the semver standard. edit: had a quick look at what version and client information is possible to expose in a Bitcoin Core RPC: {
"short": "27.99.0",
"long": "v27.99.0-b10ca895160a-dirty",
"numeric": 279900,
"client": "Satoshi",
"major": 27,
"minor": 99,
"build": 0,
"release_canidate": 0,
"is_release": false
} |
I like your last choice. I woudn't bother splitting up the string. It's easy to do after-the-fact and reconstructing it might be hard to do consistently across different RPC clients. |
I've opened bitcoin/bitcoin#30112 - feel free to leave a Concept ACK if you think this would be useful for rust-bitcoincore-rpc (and others). |
Knots often has features before Core, so version numbers should not be used for this kind of thing. Just check if the feature(s) you want are available... |
Knots can simply disable the |
That would be backward. Knots is a superset of Core functionality. But just because Core 39.x is missing a feature does not imply Knots 39.x is also missing it. |
We try to support various versions of Core. We only test up to
v0.21.0
.The RPC API for Core is different in different versions, it would be nice to have some mechanism for using the correct RPC API for the version of Core we are hitting. Currently we add adhoc data structures with options, as is done in #353
The text was updated successfully, but these errors were encountered: