substrate-contracts-node icon indicating copy to clipboard operation
substrate-contracts-node copied to clipboard

`--ws-external` is said to be the same as `--unsafe-ws-external` in CLI help but that does not appear to be the case

Open ltfschoen opened this issue 2 years ago • 0 comments

If I run substrate-contracts-node --help part of the output is:

      --ws-external
          Listen to all Websocket interfaces. Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: <https://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs>. Use `--unsafe-ws-external` to suppress the warning if you understand the risks

      --unsafe-ws-external
          Listen to all Websocket interfaces. Same as `--ws-external` but doesn't warn you about it

But I was able to use --unsafe-ws-external instead of just --ws-external to be able to connect to https://contracts-ui.substrate.io/?rpc=ws://127.0.0.1:9944, as i've described in the solution to the error API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure that was produced otherwise here https://substrate.stackexchange.com/a/8648/83

So I don't think the statement Same as --ws-external but doesn't warn you about it is accurate, because what I found was that it doesn't just avoid you encountering warnings, it avoids you encountering errors, and I was able to overcome the error by using --unsafe-ws-external instead of just --ws-external.

So I think it should say Same as --ws-external but doesn't give you errors about it., otherwise users might choose to use --ws-external instead thinking that they'll just get some harmless warnings, but then might encounter the error and not realise why.

I think --unsafe-rpc-external might need to be updated too.

ltfschoen avatar May 26 '23 01:05 ltfschoen