Prepare the Network
Overview
Each node who wants to participate as validator in the blockchain network must generate their own private/public keys. In this section, we will generate two keys for the 2 validator nodes - Alice
and Bob
.
Option 1: Subkey
Subkey
is a tool that generates keys specifically designed to be used with Substrate. The installation instructions can be found here.
After you've installed the tool, it's time to generate the validator keys. We need to generate sr25519
keys that will be used by Aura for block production.
You should see output similar to this:
Important
Make sure to save your mnemonic phrase, public key and SS58 address variables as they will be used later.
Perform the key generation twice, for both of the nodes and save the mnemonic, public key and SS58 address for the second generation as-well.
Option 2: PolkadotJs
You can also generate your own keys using PolkadotJs interface. In the Accounts tab, select Add Account button. This will generate sr25519
keys by default. Again, make sure to save your mnemonic seed and public key.
For example:
Modify the Chain Spec
We have already done this step in the last guide and in the Development section. So the default content of chain-spec.json
looks like this:
aura.authorities
property in the chain spec defines the list of public keys or authorities that have the right to produce blocks. Delete the already specified authority in the list and add the 2 SS58 addresses that you generated
And don't forget to convert your modified chain spec into raw:
Last updated