NODE ONE

NODE ONE

nohup ./target/release/node-unitchain --base-path /tmp/node01 --chain ./customSpecRaw.json --port 30333 --rpc-port 9944 --validator --rpc-methods=Unsafe --name MyNode01 --rpc-cors all --rpc-external >/dev/null 2>&1 &

This command is a Unix/Linux shell command that is used to start a process and detach it from the terminal. Let's break down the components of the command:

  1. nohup: This stands for "no hang up." It is a command that is used to run another command in such a way that it continues running even after the terminal session is disconnected or closed.

  2. ./target/release/node-unitchain: This is the executable that is being run. It seems to be a binary named "node-unitchain" located in the "./target/release/" directory.

  3. --base-path /tmp/node01: This specifies the base path for the node data directory. In this case, it's set to "/tmp/node01".

  4. --chain ./customSpecRaw.json: This specifies the blockchain configuration file. In this case, it's set to "./customSpecRaw.json".

  5. --port 30333: This specifies the port number on which the node will listen for incoming connections.

  6. --rpc-port 9944: This specifies the port number for the RPC (Remote Procedure Call) interface, which allows remote interaction with the node.

  7. --validator: This flag indicates that the node will act as a validator on the network.

  8. --rpc-methods=Unsafe: This specifies that unsafe RPC methods are allowed. It's worth noting that using unsafe methods can have security implications and should be done carefully.

  9. --name MyNode01: This sets a name for the node, in this case, "MyNode01".

  10. --rpc-cors all: This allows Cross-Origin Resource Sharing (CORS) for the RPC interface from any origin.

  11. --rpc-external: This allows external access to the RPC interface.

  12. >/dev/null 2>&1: This redirects standard output (stdout) to /dev/null and combines it with redirecting standard error (stderr) to the same location. This effectively suppresses any output or error messages from the command.

  13. &: This puts the process in the background, allowing you to continue using the terminal for other commands without waiting for this one to finish.

In summary, the command starts a blockchain node named "MyNode01" with specified parameters, runs it in the background, and suppresses both standard output and error messages.

Last updated