substrate

Can't see the Local Node Identity when I start my node


For some weird reason when I start my node

./target/release/node-template \
  --base-path /tmp/node01 \
  --chain ./customSpecRaw.json \
  --port 30333 \
  --ws-port 9945 \
  --rpc-port 9933 \
  --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
  --validator \
  --rpc-methods Unsafe \
  --name MyNode01 \
  --password-interactive

the output is

./target/release/node-template --base-path /tmp/node01 --chain ./customSpecRaw.json --port 30333 --ws-port 9945 --rpc-port 9933 --telemetry-url "wss:telemetry.polkadot.io/submit/ 0" --validator --rpc-methods Unsafe --name MyNode01 --password-interactive
Keystore password: 
2022-08-04 17:47:16 〽️ Prometheus exporter started at 127.0.0.1:9615    
2022-08-04 17:47:16 creating instance on iface 192.168.194.172    
2022-08-04 17:47:21 💤 Idle (0 peers), best: #0 (0x1395…7396), finalized #0 (0x1395…7396), ⬇ 0 ⬆ 0    
2022-08-04 17:47:26 💤 Idle (0 peers), best: #0 (0x1395…7396), finalized #0 (0x1395…7396), ⬇ 0 ⬆ 0    
2022-08-04 17:47:31 💤 Idle (0 peers), best: #0 (0x1395…7396), finalized #0 (0x1395…7396), ⬇ 0 ⬆ 0    
2022-08-04 17:47:36 💤 Idle (0 peers), best: #0 (0x1395…7396), finalized #0 (0x1395…7396), ⬇ 0 ⬆ 0    
2022-08-04 17:47:36 ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Timeout }    
2022-08-04 17:47:41 💤 Idle (0 peers), best: #0 (0x1395…7396), finalized #0 (0x1395…7396), ⬇ 0 ⬆ 0 

The Local node Identity is nowhere to be found, what i did for the previous tutorial "simulate a network" was to pass the node-key to generate the Local node Identity.

./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
./target/release/node-template key inspect-node-key --file ../bin.txt

the bin.txt file had the node key (i.e 0000000000000000000000000000000000000000000000000000000000000001) which produced the Local node Identity

12D3KooW......

I want to replicate this for the next tutorial but don't know how


Solution

  • Figured it out, Just pass in your very own node key as you start up your first node (i.e --node-key 0000000000000000000000000000000000000000000000000000000000000001) and then use the same procedure to retrieve the PeerID :)