0

in this doc it says the following:

By default, the node will refuse to start if you try to expose an RPC interface and run a validator node at the same time. The --unsafe-* flags allow you to suppress this security measure. Exposing RPC interfaces can open up a huge surface of attacks and has to be carefully reviewed.

however when i start a local chain using the following command:

./target/release/node-template \
--base-path /tmp/alice \
--chain local \
--alice \
--port 30333 \
--ws-port 9945 \
--rpc-port 9933 \
--node-key 0000000000000000000000000000000000000000000000000000000000000001 \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--validator

1- it started with no problems, its supposed to refuse to start since its both a validator and is exposing an RPC port but it didnt, why?

2- how to modify the allowed origins?

3- the doc also said the following:

There are quite a few RPC methods that you can use to control the node's behavior, but you should avoid exposing. For example, you should not expose the following RPC methods:

submit_extrinsic - allows submitting transactions to local pool.

however im able to submit extrinsics, the extrinsic gets passed to the node and it gets added to the pool.

1 Answer 1

1

The flags it is referring to are --ws-external and --rpc-external. If you try to run your node with these flags and --validator it will throw an error:

Input("--rpc-external and --ws-external options shouldn't be used if the node is running as a validator. Use --unsafe-rpc-external or --rpc-methods=unsafe if you understand the risks. See the options description for more information.")

see ./target/release/node-template --help for more info

6
  • you mean if i remove the --alice and create a real chain spec it wouldnt start if keep specifing the rpc and validator options?
    – dadzerlaze
    Jan 17 at 14:12
  • 1
    Misunderstood it the first time, changed my answer Jan 17 at 15:32
  • how users are able to get the runtime information and create and send extrinsics if all ports are closed?
    – dadzerlaze
    Jan 17 at 15:56
  • As a network you need at least one rpc node to be able to query this yes Jan 17 at 16:02
  • do you mean as long as that node is not a validator its okey to open the ports and in turn that node will forward the transactions(extrinsics) to the validators, but how so? if all the validator ports are closed, how is this node able to communicate with other validators, in fact how validators will communicate at all?
    – dadzerlaze
    Jan 17 at 16:09

Your Answer

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

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