-
Notifications
You must be signed in to change notification settings - Fork 21
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
soroban-rpc: add an endpoint on soroban RPC to self report versions for downstream clients #10
Comments
Things we could also add:
|
Related: stellar/stellar-core#3960 (comment) |
relaying some info from stellar/stellar-core#3960 for posterity: core won't start if its own protocol version doesn't match env's interface version. So interface version isn't exposed in core's info endpoint to avoid confusion. Interface version also contains "pre-release version" used for development; this version can be obtained via |
Thanks @2opremio and @marta-lokhova for the context Few questions:
@janewang we get following information when we run
|
@2opremio Need your input on 3rd question:
Also currently from what I know, we do not expose interface version from soroban-env-host. if thats the case, I would like to track it in follow up issue/PR to update the rust bindings. |
Yes, technically it can happen that the versions are different, particularly since soroban-rpc is not multiversion. I bet there is a simple way to get the protocol (i.e. interface) version from the library. @dmkozh may be able to assist |
I think we're overloading the term 'protocol version' - there is the 'current' protocol version that is set in the ledger header and upgraded via vote, and there is 'maximum' protocol version supported by a given library. The actual behavior and supported interface is always defined by the 'current' protocol version, not the maximum one.
|
If we're planning to report the maximum supported protocol version and the current protocol version from the RPC, we can look to Horizon for how to do that because Horizon has done that for a long time with little confusion as far as I'm aware. Horizon exposes three fields: "current_protocol_version": 19, // current protocol version of the network
"supported_protocol_version": 20, // max supported protocol version of horizon
"core_supported_protocol_version": 20 // max supported protocol version of core that horizon is using It's worthwhile exposing all three on the endpoint that returns versions. Given that these fields have caused little confusion, probably worth using the same or similar names if there's no value in innovating on that. |
What problem does your feature solve?
To help downstream clients that depend on the RPC to versions (such as XDR), the RPC could provide an endpoints to self report build stamp, release semver, xdr versions, and rs/contract interface versions, giving any remote rpc client as much info to interrogate the rpc capabilities.
What would you like to see?
A new endpoint on the RPC that reports this information, similar to the information provided by Horizon's root url (horizon.stellar.org)
The text was updated successfully, but these errors were encountered: