Make sure you're using different seed for each node.
Option 1: using script
Use the get_session_keys_from_seed.sh:
liberland_substrate (develop)> ./scripts/get_session_keys_from_seed.sh
Provide your seed. If you don't have one, feel free to copy this freshly generated one:
strong uncover fossil tag because announce coast mom blue endless file warrior
Seed: <<YOUR_SEED_HERE>>
gran (ed25519): 8280a7b1f74bc53e6fb2cf686566fbdcc850a61014e96a457e7d763a5e67a3e7
babe (sr25519): 0caf07d84a96f800892699d69eb74d963ae2d8c5ced5c54199c061a270d2b827
imon (sr25519): 509cd46a791813b05615a14b240319c56bc2f7a19106aadb26193bb126e27c40
audi (sr25519): 7c5f75b761139f09b612b4457f24615080dcb0721ba8eb88ee7571d9f4589731
Option 2: manually
Notice that first command (for grandpa) uses ed25519 scheme and others use sr25519 scheme.
While it's possible to create the spec file manually, it's recommended to build it from code.
Make sure you have the correct version of code checked out. Go to bin/node/cli/src/chain_spec.rs and find the fn staging_testnet_config_genesis() function. In there, do the following changes:
Stash's public key (SS58)
Controller's public key (SS58)
Grandpa public key (hex)
Babe public key (hex)
Im_online public key (hex)
Authority_discovery public key (hex)
Update the citizens. Each address on this list will be a valid citizen with a KnownGood judgement and will receive 10^18 LLD.
Update the registrar_key - it's the address of Citizenship Registrar that will be able to provide identity judgements for citizenship.
Update the root_key - it's the account capable of executing sudo calls
Update the technical_committee
After updating the code, we may now generate the human-readable template for spec:
Open the generated new_chain_spec.json file in your editor. You may want to adjust things like name, id, properties.displayName to match your new testnet.
The generated new_chain_spec.raw.json is the file that should be distributed to all participants of the network and will be used to run our initial nodes.
5. Running our first node
Inserting session keys
Option 1: using script
If you've generated session keys using get_session_keys_from_seed.sh, you may now run insert_session_keys_from_seed.sh with the same seed. Make sure you pass the correct chain spec and path where node should store its data:
liberland_substrate (develop)> ./scripts/insert_session_keys_from_seed.sh --chain new_chain_spec.raw.json -d /data/liberland_node/
Provide your seed. If you don't have one, feel free to copy this freshly generated one:
strong uncover fossil tag because announce coast mom blue endless file warrior
Seed: <<YOUR_SEED_HERE>>
gran (ed25519): 8280a7b1f74bc53e6fb2cf686566fbdcc850a61014e96a457e7d763a5e67a3e7
babe (sr25519): 0caf07d84a96f800892699d69eb74d963ae2d8c5ced5c54199c061a270d2b827
imon (sr25519): 509cd46a791813b05615a14b240319c56bc2f7a19106aadb26193bb126e27c40
audi (sr25519): 7c5f75b761139f09b612b4457f24615080dcb0721ba8eb88ee7571d9f4589731
Option 2: manually
Run following commands. Make sure you pass proper chain spec file, path to node storage and insert the same seed as one used for preparing keys for chain spec. Notice that first command (for grandpa) uses ed25519 scheme and others use sr25519 scheme.
Make sure it shows (1 peers) (or more) in the logs after a minute. If not, verify that your initial node is running and bootnode address is correct. It's OK if it doesn't produce/finalize blocks yet, we need all nodes for that.
6. Verify
Now that we've added all initial nodes, we should see that blocks are getting finalized.