The PN configuration is to create a data directory and set up several values in the configuration file
- 1.Create a PN Data Directory
- 2.Install node key
- 4.Configure the PN with
Considering the fact that the size of Klaytn blockchain data is always increased, it is recommended to use a big enough storage. You may need to create the directory on your desired path.
$ mkdir -p /var/kpnd/data
In order to operate a PN, a
nodekeyis required. The KPN binary will create a new one for you if you do not have it. If you have one, you need to put your
nodekeyinto the PN data directory. The way to create a
nodekeyis in the "Before You Install" section. The following command line copies the
nodekeyinto the PN data directory.
$ cp nodekey /var/kpnd/data
static-nodes.jsonshould be created from the PN operator. It contains the addresses that your PN is connected to. It is recommended to add the addresses including your CN and a PN from another Core Cell. Please contact to the Klaytn official email for more details (
[email protected]for Cypress or
[email protected]for Baobab).
The node URI of the PN is in the "Before You Install" section. (Note: This IP address is different from CN public IP.) The following command line copies the
static-nodes.jsonfile into the PN data directory.
$ cp static-nodes.json /var/kpnd/data
Configuration File Location:
- For the archive distribution, the config directory location defaults to
- For the package distribution, the config directory defaults to
You should update the the data directory environment variable
$DATA_DIRon the configuration file
Each PN maintains a copy of the network's chain data. If a node is out of sync, it can obtain this data from other nodes in the network -- a process known as syncing. When a new PN is first started, it must download the entire chain data from the network.
To accelerate this process, you may perform a fast sync by downloading a snapshot of the chain data before starting the PN. This can dramatically reduce the time the PN will spend syncing on first start.
$ tar -C /var/kpnd/data -xvf klaytn-cypress-chaindata-latest.tar.gz
$ tar -C /var/kpnd/data -xvf klaytn-baobab-chaindata-latest.tar.gz
After the data is extracted, you may start the PN normally.