chainID
1002, as you can see in the blue border box in the figure below.homi
is a utility that automatically generates scripts, configuration files, and private keys necessary to configure the Klaytn blockchain. You can execute homi from any Linux/Mac PC.bin
folder and execute homi
with following options to generate the files. homi setup local --cn-num 4 --test-num 1 --servicechain --chainID 1002 --p2p-port 22323 -o homi-output
Since Baobab's chainID
is 1001, for convenience, the chainID
of the ServiceChain constructed in this example is set to 1002. When operating a blockchain by launching an actual service, it is recommended to use it after registering a new chainID value at https://chainlist.defillama.com/ so that chainID does not overlap with other ServiceChains. The ServiceChain port is set to 22323, which is the default port.nodekey*
, genesis.json
and static-nodes.json
in the subsequent steps.homi-output/scripts/static-nodes.json
in a text editor then update the IP addresses and ports with the actual values of your nodes. In this example, it is assumed that the IP of each SCN node in the ServiceChain is as shown in the figure below. Remember the port you assigned here, as it will be used later in step 4.static-nodes.json
, upload the output folders(homi-output
) to all SCNs, i.e. SCN-L2-01, SCN-L2-02, SCN-L2-03, SCN-L2-04 nodes in this example.--datadir
directive. In this example, we set the data folder to \~/data
.nodekey
and static-nodes.json
static-nodes.json
to the data folder.nodekey
to each SCN's data folder. For example, use nodekey1
for SCN-L2-01(192.168.0.1) node and use nodekey2
, nodekey3
and nodekey4
for SCN-L2-02(192.168.0.2), SCN-L2-03(192.168.0.3) and SCN-L2-04(192.168.0.4) respectively.conf/kscnd.conf
as follows. PORT
is the port used to set up homi
, and SC_SUB_BRIDGE
is required for connecting bridges in the next section. For now, just set it to 0. In DATA_DIR
, enter the data folder used in step 3.klay.blockNumber
. If this number is not 0, the node is working fine.kscnd stop
testkey1
was automatically generated by homi
in step 1. KLAY is allocated to the test account as described in the genesis.json
which was also generated by homi
.testkey1
.--cn-num 1
instead of --cn-num 4
to homi in 'Step 1:Create genesis.json and nodekeys'.