Skip to content

build slave network instruction

Liu Peng edited this page Sep 2, 2020 · 14 revisions

DISCLAIMER: TTC Foundation makes its contribution on a voluntary basis as a member of the TTC community and is not responsible for ensuring the overall performance of the software or any related applications. We make no representation, warranty, guarantee or undertaking in respect of the software or any related documentation, whether expressed or implied, including but not limited to the warranties or merchantability, fitness for a particular purpose and noninfringement. In no event shall we be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or documentation or the use or other dealings in the software or documentation. Any test results or performance figures are indicative and will not reflect performance under all conditions. Any reference to any third party or third-party product, service or other resource is not an endorsement or recommendation by TTC Foundation We are not responsible, and disclaim any and all responsibility and liability, for your use of or reliance on any of these resources. Third-party resources may be updated, changed or terminated at any time, so the information here may be out of date or inaccurate.

Step 0 : Preparation

Download and build gttc from branch sc-t1, which is the gttc version for this t1 Slave Network. You can find more information about how to build gttc on Building GTTC.

Notice:

  1. Make sure you are building sc-t1, not release/v0.2.1 (Mainnet still use relase/v0.2.1)
  2. After building gttc, to avoid further confusion, rename 'gttc' to 'gttc-t1', (gttc-t1 is used for deploy the slave network.)

Afterward, you need to create a new miner address for slave network. If you are operating more than one Representative node, please make sure to build one new address for each Representative node. You can create miner address using TTC connect or the following command:

./gttc-t1 --datadir your_slave_network_node_dir/ account new

Step 1 : Setup Coinbase for Slave Network

Each Representative should assign a miner address to delegate in order to mine on t1 slave network. This can be done through a customized transaction, signed by a Representative.

This need to be done by Representatives on Mainnet

./gttc attach your_mainnet_node_dir/gttc.ipc 
> eth.sendTransaction({from:eth.accounts[0],to:"76378fc59f3c5a69ee5ba6c23d525ae9f8421992",value:web3.toWei(10),data:web3.toHex("ufo:1:sc:setcb:0x3210000000000000000000000000000000000000000000000000000000000000:")})

Notice: replace "76378fc59f3c5a69ee5ba6c23d525ae9f8421992" by your own slave network miner address, which created in step 0.

Step 2 : Start Running Slave Network

Command

./gttc-t1 --datadir your_slave_network_node_dir/ --port 30312 --sca --sca.mainrpcaddr "34.74.182.148" --sca.mainrpcport 8501 -unlock '76378fc59f3c5a69ee5ba6c23d525ae9f8421992' --password pass.txt --mine

Notice:

  1. replace "76378fc59f3c5a69ee5ba6c23d525ae9f8421992" by your own slave network miner address, which created in step 0.
  2. write your password when you create account into pass.txt

Official RPC server

If you do not have local RPC server, please choose one to replace the ip and port in sample code .

  • IP:35.190.239.155 Port:80/8501/8502/8503/8504
  • IP:34.77.28.121 Port:80/8501/8502
  • IP:34.74.182.148 Port:80/8501/8502
  • IP:34.85.14.244 Port:80/8501/8502/8503/8504

If you prefer to use local RPC server(recommend), please make sure alien,eth,net,web3 is contained in --rpcapi

Slave Network enode list (NOT Mainnet)

admin.addPeer("enode://67ede5fccd49d37e13984725142ba27af44f5bf6ffc8e31f271fb9ae0a847aa2b61e182a0fed2a419c6542702324f3426d06e67b44bce9232160d1592ace950d@35.243.161.121:30311")
admin.addPeer("enode://cca8b5e6b082a13bdd769b7f35b3e1cc19dff9041249c710c43f8d38073864b9b2dec495c4578ddb562248128536a59bdb5267e5cd0b19f49595ddc37977a26a@35.243.161.121:30312")
admin.addPeer("enode://7750a0d2d2b905aa95bbce1dbe0a48aa077ff19847ddd466c83ee05d3c01f5d0b40858466d71287489546aea7c173cdcc6b97c67e39b24826b03c6dc2eb8b123@35.243.161.121:30313")
admin.addPeer("enode://aaf5978703c2dca8ed7980c7da43caf8ceaea392a531feff3908b80f3f4af2a2f51630598ad8258b94b28a9a2b6951adca4fc498c86e0c23ed7f7f0fc8a46091@35.243.161.121:30314")


admin.addPeer("enode://ada3ef43b295aad615aaa1646e9cb0f0fa1d715fdb5314c8ae80b3c723dbdc73bbce8f2ff261ae82f26410ffecd1bd378960158666114d210f1063ec6d594097@35.200.80.194:30311")
admin.addPeer("enode://380b33cfdbf33836a1d72a19245ad72a2a82762ef62502e6892af7596579aae359a6a464b4fbe19c8c654911599fe7d766aeac3de9d95fb4b93ecad9f07565a1@35.200.80.194:30312")
admin.addPeer("enode://d14c73dd03c1e0c48e0f93451bb44f85aac57dc3a68f973b65b8bb1261f94d0806a5184bac912fb644285320651fa02439fd9e3694224add917b8aac943aaf9d@35.200.80.194:30313")
admin.addPeer("enode://9f1443b88f0b5a5023e451eca2b7b1138e857ed2b504bc7387c1b721915ccd56a55b08cb2efb2f6e0896cdbf737f22dbae6d995134b8d3f537e33be0e7441de7@35.200.80.194:30314")
admin.addPeer("enode://1981a505c59084f051b7c870211cdb3e026169fd805b4e46f8de09cf29370089d105d41db8e3d673d1d2a245b6b5e5d0ed1697918faf12aa421401a8f5781562@35.243.118.24:30321")


admin.addPeer("enode://c75a5a1d05e999f76a8acdaed67d0f66a5d28b419cf798df5b2a9dd71c9c9f65448997a63a2a7eb310ae8bd849288fd4d0b6d2873a7d156630dbc8e24f8a6da2@35.205.95.24:30311")
admin.addPeer("enode://9a0c622e409c95efd6c3a17fc8d11d9dcfd1b54efc2e953e371618a6e57ab91d4254bf6bf8328340e0724f2a0364a661e3b0d99da636b1a75d1e9f7874cff7ba@35.205.95.24:30312")
admin.addPeer("enode://8194510038957b9b90d11de43eea36ee6d2cfe345478737916eb0c578b89ff87e07da97d0bfa26b89c19ed2085e596fa7cf7f5367120e529687fe259aacbec6b@35.205.95.24:30313")
admin.addPeer("enode://7293850641a83e62dbb637c18bfc83ef8d23847ee36bed2677d7f9cb7298a95293402e882205f722bad79ff05c39a011fdbeff7c9a5ab21f8476eacb87cf4a58@35.205.95.24:30314")

Step 3 : Add Slave Network to Main Network

This need to be done by Representatives on Mainnet

./gttc attach your_mainnet_node_dir/gttc.ipc 
> eth.sendTransaction({from:eth.accounts[0],to:eth.accounts[0],value:0,data:web3.toHex("ufo:1:event:declare:hash:t0dde2f9ae9d23611bd4bc9b1f999e4acb600fe6f200266e82682e7d8c0b2214d3:decision:yes")})

Step 4 : Charge tgas for Slave Network

This need to be done by Representatives on Mainnet

./gttc attach your_mainnet_node_dir/gttc.ipc 
> eth.sendTransaction({from:eth.accounts[0],to:eth.accounts[0],value:0,data:web3.toHex("ufo:1:event:declare:hash:t029ce4cc6c2f87ba5f8ec9353ace460d0606e9c61678278e12cc03a14afb762ba:decision:yes")})
Clone this wiki locally