I want to write a script that runs node01, node02, node03 in relay chain network setup.
How do I get local node identity generated from running node 01? Also I am confused on how the first validator node decides the order to use keys from chain-spec. Chain is either substrate/polkadot/rococo-local
./target/release/polkadot \
--base-path /data/node01 \
--chain ./customSpecRaw.json \
--port 30333 \
--ws-port 9944 \
--rpc-port 9933 \
--no-telemetry \
--validator \
--rpc-methods Unsafe \
var local_id = ??
echo "Run node02"
./target/release/polkadot --base-path /data/node02 --chain ./customSpecRaw.json --port 30334 --ws-external --ws-port 9945 --rpc-external --rpc-port 9934 --rpc-cors all --no-telemetry --validator --rpc-methods Unsafe --name MyNode02 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/$local_id
Please help me in writing a script that uses node1's peerID to run other validator nodes