NODE TWO

nohup ./target/release/node-unitchain --base-path /tmp/node02 --chain ./customSpecRaw.json --port 30334 --rpc-port 9945 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRtaQqWNEpBAbXy1kc7WVTHvvC6G1pNDgjdmByhSjLgc9 --validator --rpc-methods Unsafe --rpc-cors all --rpc-external >/dev/null 2>&1 &

This command is similar to the one you provided earlier and is used to start another instance of a blockchain node. Let's break down the components of this command:

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

  2. ./target/release/node-unitchain: This is the executable binary named "node-unitchain" located in the "./target/release/" directory.

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

  4. --chain ./customSpecRaw.json: This specifies the blockchain configuration file. The node will use the configuration provided in "./customSpecRaw.json".

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

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

  7. --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRtaQqWNEpBAbXy1kc7WVTHvvC6G1pNDgjdmByhSjLgc9: This specifies the bootnodes for the network. Bootnodes are initial nodes that help other nodes discover and join the network. The provided value is an example of a bootnode address.

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

  9. --rpc-methods Unsafe: This specifies that unsafe RPC methods are allowed. As mentioned before, using unsafe methods can have security implications and should be done carefully.

  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 another blockchain node instance named "node-unitchain" with specified parameters, runs it in the background, and suppresses both standard output and error messages. It also specifies bootnodes for network discovery and allows external access to the RPC interface.

Last updated