Transfer value between sibling service chains
This section will explain how to enable value transfer between ServiceChain networks. The main features provided by ServiceChain, data anchoring and value transfer, can be used independently. That is, you can use only data anchoring or only value transfer, regardless of whether you use the other feature.
As shown in the figure below, if there are two ServiceChains (chainID 1002 and 1004) connected to Kairos, since each servicechain performs data anchoring with Kairos, data anchoring is not required between each other, only value transfer is required.
To transfer value when there is no bridge between two ServiceChains, first transfer value from the ServiceChain (chainID 1002) to kairos (chainID 1001), and then transfer value from kairos (chainID 1001) to the ServiceChain (chainID 1004) again. This is inefficient than providing value transfer directly from the ServiceChain (chainID 1002) to the ServiceChain (chainID 1004) at once. Therefore, by creating a bridge between ServiceChains directly, we can transfer value efficiently .
Prerequisites
- We assume that you installed two ServiceChains, Each servicechain is connected to the kairos EN. Refer to Connecting to Kairos.
- We also assume that you have experienced value transfer through Cross-Chain Value Transfer.
Repeat Connecting to Kairos as shown in the picture above to additionally install ServiceChain (chianID 1004).
A node can have only one main-bridge and one sub-bridge each. In this example, for convenience of explanation, we are going to connect a bridge to SCN-L2-03 and SCN-L2-07, which are nodes that do not have both main-bridge and sub-bridge yet.
Step 1: Check KNI of SCN-L2-03 Node
Take note of SCN-L2-03's KNI which is the information used to connect from an SCN node. This value will be used in the next step when generating main-bridges.json
SCN-L2-03$ kscn attach --datadir ~/data> mainbridge.nodeInfo.kni"kni://...39047242eb86278689...@[::]:50505?discport=0"