Launch Validator Nodes
Introduction
We are going to launch the 2 validator nodes of the network - Alice and Bob.
Alice Starts the Node
The prerequisite for this step is a compiled runtime and generated chain spec file. Refer to Development section or to previous guide on how to do it.
Alice runs the following commands inside the Subsembly project root folder:
make run-node \
NAME=node01 \
PORT=30333 \
WS-PORT=9944 \
RPC-PORT=9933 \
spec=raw-chain-spec.json \
-- --validatorWhat do those flags represent?
NAME= Specifies the name of your Node
PORT = Specifies the port that your node will listen for p2p traffic on
WS-PORT = Specifies the port that your node will listen for p2p traffic on
RPC-PORT = Specifies the port that your node will listen for incoming RPC traffic on
spec = Specifies path to the raw chain spec file
OTHER = Specifies additional flags/options to provide to the node. In this case, we want our node to be validatorMore details about the flags and other options for the node, can be explored with the following command:
After launching the node, you should see the following output:
We copy Alice's node identity to use it when we are connecting other nodes to Alice's:
Connect to PolkadotJs
Once your node is running, go to PolkadotJS interface at https://polkadot.js.org/apps. PolkadotJS interface provides an interface for interacting with your node and it should automatically connect to your local node:

Bob Joins
In a separate terminal, run the node for Bob:
We can notice some differences compared to the command used to run Alice's node. We changed the ports and name of the node, since two nodes can not have the same name and one port can not be exposed from two different nodes.
Most importantly, we added a --bootnodes flag, to specify a single boot node of Alice. Here, the value of --bootnodes flag is comprised of following properties:
Alice's IP Address, localhost or
127.0.0.1Alice's Port, she specified
30333Alice's Peer ID, we copied it in the Alice's section
After running the command you should see the output similar to this:
As you see from the output (1 peers), Bob successfully connected to the Alice's node:
You can also connect this node to PolkadotJs interface. To do that, you will need to change the ws port in the left tab in the main page (9945 in this case)

Insert Keys
After we launched the nodes and they are successfully connected, we have to insert their respective Aura keys to start the block production.
Important
The params that you are providing in the curl request are the mnemonic and public key generated in step 1.
Insert the keys for Alice:
Keep in mind that your params will be different, since the generated mnemonic/pub key tuple will be different from this one! The first part of the "params" is the mnemonic and the last parameter is the public key both derived the subkey generation.
We do the same for Bob:
If you see this output, you have successfully inserted the keys:
You will notice that nodes will start producing new blocks:
If you inserted the keys for both nodes correctly, you should see blocks beeing produced every 5 seconds.
Last updated
Was this helpful?