-
Notifications
You must be signed in to change notification settings - Fork 689
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
Make clear which RPC methods are safe/unsafe #68
Comments
Really need this. Thanks. |
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
This would be awesome to track what methods are |
The |
The proper solution IMO, however, is to document this list on a website, rather than use Substrate's source code as the reference point |
Any progress on this? |
@the-right-joyce addding this to SDK node, please remove if off topic. |
Throwing some more weight into this, we'd like to start allowing access to certain unsafe methods for our customers, but without being able to easily determine which methods are unsafe, we can't build an allowlist (without exposing everything). In addition, we can autogenerate documentation using this RPC that lists all available RPC calls as nodes run in safe mode show all safe and unsafe RPC calls. This API isn't really telling the truth for a node run in safe mode. A simple boolean property would suffice |
I am not in the weeds but it sounds to me like a fairly simple fix. I am surprised we don't have this already. |
@kianenigma would you be able to give any indication if this can be added, and if so, any idea on the timeline? |
For indexing, it would be very useful to have the rpc_methods return which methods are "safe" vs "unsafe" and similarly for ws [for our own indexing we check for subscribeStorage availability on public endpoints, and use "unsafe" state_traceBlock a lot] -- We have found many public ws endpoints differ slightly on subscribeStorage for mysterious reasons and this would help. Even more importantly, we request support for some form of permissioning beyond the overly permissive options of "allow ALL unsafe calls on rpc/ws port" vs overly restrictive "deny ALL unsafe calls on rpc/ws port". Specifically, full archive nodes should be able to expose their "unsafe" RPC/WS calls to permissioned entities in the "allowlist" model that @jamesbayly suggests -- could be by IP, putting unsafe calls on another port, a HTTP header, some whitelisted apikeys. Out of these options, there may be better options for node operators that need to meter and rate limit here. Not having this form of permissioning required one node type which is "allow ALL unsafe" and another node which is "deny ALL unsafe", which doesn't make sense. |
Could we at least decorate methods so the https://polkadot.js.org/docs/ site has this? |
Would be very useful just to have some decoration here |
It would be nice to have some sort of list that says which RPC methods are safe or unsafe to make it easier for the user.
Maybe this could be exposed using the RPC that lists all available RPC calls?
CC @Xanewok
The text was updated successfully, but these errors were encountered: