Create a Private Chain - nknorg/nkn GitHub Wiki
This page shows you how to create a private chain. You shouldn't do this until you have a very good reason.
We will assume here that all nodes are running on locally on your machine.
-
Create several directories (one per node you want to run).
-
Copy (or create symbolic link)
nknd,nkncto each directory. Skip this step if you are using docker. -
Create a new wallet in each directory.
-
Create a
config.jsonin each directory from the templateconfig.local.json. All of them should put the same public key as the GenesisBlockProposer. Note that ports in differentconfig.jsoncan be the same, conflict in ports will be resolved automatically.
Start a bootstrap node by creating a network
$ ./nknd -c
Start other nodes by joining the network
$ ./nknd
Or provide a seed node to override the one in config.json
$ ./nknd -seed http://$RemoteNodeIP:$HttpJsonPort
When the network contains enough nodes (more than the length of successor list plus one, by default 9+), stop the node that created the network in order for the relay service to work properly. Nodes joining the network later should use a live node as seed.