0

I followed the below link and successfully create two nodes, but it looks like Alice and Bob is hardcoded!. Is there a way to list down the nodes in the network? https://substrate.dev/docs/en/tutorials/start-a-private-network/

  • Welcome to StackOverflow community! It is better to include the essential parts related to the question here and provide the link for reference. Link-only question can become invalid if the linked page changes. – Jackdaw Jan 04 '21 at 12:42

1 Answers1

2

As you can see in that tutorial when you are launching the nodes you add the --alice flag as well as the --bob flag, each one for each node. The explanation given in the tutorial for this flags is the following:

Puts the predefined Alice keys (both for block production and finalization) in the node's keystore. Generally one should generate their own keys and insert them with an RPC call. We'll generate our own keys in a later step. This flag also makes Alice a validator.

These keys are considered well known keys, and this group of keys are used for development purposes, they have a prefilled balance so you don't have to worry about creating custom accounts when developing. These are not meant to be used in production environments under any circumstance! As you can imagine.

More info about well known keys here https://substrate.dev/docs/en/knowledgebase/integrate/subkey#well-known-keys

Also, for having a list of the nodes in your network you may be interested in having a look at the monitoring & telemetry resources, I will drop here a pair of links for you :)

https://wiki.polkadot.network/docs/en/build-node-management#monitoring-and-telemetry

https://github.com/paritytech/substrate-telemetry

EDIT: adding well known keys link

  • 1
    But I generated Own Keys with Option 1: Subkey tool and then created a Custom Chain Spec, then created Private Network. After creating using https://polkadot.js.org/apps/#/settings?rpc=ws://127.0.0.1:9944 I was able to see the 1 peer node as well as in both the nodes console logs. But the thing is I did not see MyNode01 and MyNode02 in the Accounts tab. – Kiran Kumar HM Jan 04 '21 at 13:53
  • Oh, could it be that you are mistaken what those generated keys, and _including_ them means ? Those keys you generate for the nodes are for block producing and finalization only, so for example, you will want to use the polkadot.js browser extension with the app to inject keys, so they appear in the accounts section. Node keys, the ones used for block production and finalization will not be showing there. I'm talking from the top of my head, if this doesn't clear everything just reach out again :) – Alejandro Martínez Jan 05 '21 at 08:50