-
Notifications
You must be signed in to change notification settings - Fork 3
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
Should we remove sudo_sessionKeys_unstable_generate
?
#105
Comments
The problem is that you need to insert the keys in the keystore as well. We could in principle instead add a JSON-RPC function to add a private key to the keystore, and let the JSON-RPC client do the runtime call, but sending private keys over the Internet or even in memory isn't the greatest idea. |
In Substrate the host functions for generating the key are storing the private keys. The RPC implementation isn't involved in this at all. The RPC implementation doesn't know what the runtime is doing. |
Just for reference, this is how the sessionsKeys implementation in substrate looks like, will put on hold that PR until we decide what's best |
Ah I see. There's still a problem, though: since |
Nodes that are validators should not expose any RPC functionality at all and for full nodes we could let them run with a ephemeral keystore. |
If I got this right, we could remove the |
I'm not sure. It's clear to me that the runtime calls done through Another point is that it doesn't really make sense to be able to call I also disagree with "validator nodes should simply not allow public JSON-RPC requests". If we go this direction, it would be a subtle thing that validator operators should know, and if they don't know this they can suffer massive fuck ups. We should prevent potential fuck ups as much as possible instead of going the direction of "well people should just know better". |
Good point! I also realized that we actually do this already, aka register the keystore as extension for these runtime calls. So, they would fail in Yeah, then this issue is actually not required! Ty for the input. However, I will open a pr to change the spec in the light of: paritytech/polkadot-sdk#1739 |
As described in spec for
sudo_sessionKeys_unstable_generate
, this only maps to theSessionKeys
runtime api. Given that, clients can just usestate_call
for calling theSessionKeys
api.The text was updated successfully, but these errors were encountered: