Skip to content
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

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

Open
ltfschoen opened this issue May 26, 2023 · 0 comments

Comments

@ltfschoen
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant