Connecting to TRON

To carry out cross-chain communication between the two chains, they need to be each other's parachain, that is, to bid for each other's parachain slot successfully, and get connected as each other's parachain. Currently, a whitelist method is provided to put TRON into its slot to avoid TRON from bidding for its slot. If the whitelist method is used, all nodes of the parachain need to Add the whitelist to the node configuration file.

Whitelist Configuration

example:

crossChain = {
 refresh = false
 whiteList = [
    {
       ownerAddress = "41A1FA2B6729C898ADB9AE752F879F0AE405408E49"
       proxyAddress = "41A1FA2B6729C898ADB9AE752F879F0AE405408E49"
       chainId = "000000000000000019b59068c6058ff466ccf59f2c38a0df1c330b9b7e8dcc4c"
       srList = ["4154D65E4EBFAA5F7DCC3FBBA318A029EA95CD9CCE","41DDFA2D6F062941A779B7BE09493D352A17FEE64D","419B9FD7014AE4C62ADCB4ABC7A18517BA22941C3B","4175FB40C9CCC98A7DCD7FE33595D11787388A5B56","4195DDDA5C3C40E18458EFEE274B498087D4A9081E","41A1FA2B6729C898ADB9AE752F879F0AE405408E49"]
       beginSyncHeight = 1
       maintenanceTimeInterval = 300000
       parentBlockHash = "000000000000000019b59068c6058ff466ccf59f2c38a0df1c330b9b7e8dcc4c"
       blockTime = 1619330610000
     }
 ]
}

params

owner_address: registration owner address, hexString

proxy_address: proxy address, hex String

chain_id: parachain ID, genesis block hash of the parachain

sr_lis: SR list of TRON

begin_sync_height: the block that the parachain start synchronising from. The parachain will synchronise the block header from this block of TRON for SPV verification.

maintenance_time_interval: maintenance interval

parent_block_hash: the parent block hash of begin_sync_height

block_time: the block time of begin_sync_height

📘

Note

When refresh is true, the node will initialize the cross-chain whitelist every time it starts. Otherwise, the node will only initialize the cross-chain whitelist at the first startup after the whitelist is configured.

Parachain Connecting

After the parachain obtain TRON's slot, it can configure a messenger (a special type of full node responsible for establishing cross-chain connections, synchronising the block headers of the parachain, and forwarding cross-chain transactions) to communicate with TRON’s messenger node to establish cross-chain connections.

example:

node.crossChain {
   port = 16001 #Customise with your need
   ip =[
     "127.0.0.1:16003" #The IP and port of the TRON main chain messenger node that needs to be connected
     # "ip:port"
   ]
 }

TRON messenger configuration

node.crossChain {
   port = 16003 #Customise with your need
   ip =[
     "127.0.0.1:16001" #The IP and port of the parachain messenger node that needs to be connected
     # "ip:port"
   ]
 }

📘

Note

The winning parachain can build its own messenger node on TRON.

When the messenger nodes of the two chains are started, the messenger nodes will establish a cross-chain connection and start to synchronize the block headers.

The log example is as follows: