2

I want to expose an RPC/WS endpoints publicly. What mesures should I take into consideration? Should I just expose RPC/WS using substrate options --unsafe-rpc-external --unsafe-ws-external?

But as I understand --unsafe-rpc-external --unsafe-ws-external are not safe so how to expose ws and rpc safely?

1 Answer 1

0

Use --rpc-external(http) or --ws-external(ws).

--unsafe-x-external is designed for the validator/collator node. It is not recommended to expose the endpoints of an authority node. If you want to do that anyway, use these two unsafe flags.


Why unsafe?

For example:

  • author_insertKeys call will generate session keys files in your disk
  • state_getStoragePaged is a recursive query call, which will cost lots of performance(CPU/MEM)

Tips: --rpc-method auto/unsafe provides more controlling options at a different level.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.