Init Genesis Block


0. Please, execute sudo -i before this progress


1. Copy genesis.json under DATA directory

Genesis file download : https://github.com/klaytn/klaytn-pre-cypress-setup-workshop/blob/main/genesis/pre-cypress-genesis.json

## For CN
$ curl -X GET https://packages.klaytn.net/pre-cypress/genesis.json -o /var/kcnd/data/genesis.json
## For PN
$ curl -X GET https://packages.klaytn.net/pre-cypress/genesis.json -o /var/kpnd/data/genesis.json

2. Init Genesis block under DATA directory

1) CN configuration
$ kcn --networkid 6337 init --datadir /var/kcnd/data genesis.json
2) PN configuration
$ kpn --networkid 6337 init --datadir /var/kpnd/data genesis.json

3. (ONLY PN) Create static-nodes.json and copy it under DATA directory

example : /var/kpnd/data/static-nodes.json (* We will give the details.)

** Generate static-nodes.json **
You have 1 CN and 1 PN, each are cn1, pn1.

1. static-nodes.json in pn
   [
   "CN_KNI_ADDRESS@CN_INTERNAL_IP:PORT?discport=0&ntype=cn",
   "Other_PN_KNI_ADDRESS@Other_pn_1:PORT?discport=0&ntype=pn"
   ]





You can check the more information for installation on the page below.




If you finish this step, please click the next button > on the right side of this page.