Skip to content

HOWTO BUILD SUPERNODE

TTC.ECO edited this page Feb 15, 2023 · 18 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: Apply on our Website

Please visit TTC Representative Election

Step 1: Install gttc

Please follow the instructions on Building GTTC to install gttc on server (make sure is release/v0.2.1)

Step 2: Try Testnet (optional)

Please follow the instructions on TRY AS SUPERNODE ON TESTNET do connection test on our Testnet.

Step 3: Create your address

PLEASE MAKE SURE THE PRIVATE KEY OF THIS ADDRESS SECURITY !!!

DO NOT USE THE SAME ADDRESS ON TESTNET

DO NOT USE THE ADDRESS HAVE LARGE AMOUNT OF TTC

The address can be created by the gttc command or TTC Connect

Choice 1: Create your new account(address) by gttc

mkdir mynode
gttc --datadir mynode/ account new

Your new address will show on the screen, key file will be found in mynode/keystore/. Do not forget the password when you create this address, you need this password to unlock your account or get your private key from key file.

Choice 2: Use the address create on TTC Connect

  1. Export your private key from TTC Connect
  2. Build ethkey
cd $GOPATH/src/github.com/TTCECO/gttc/cmd/ethkey
go build 
  1. Make key file from private key
echo 358af7a90596f0cee9d0a98ed24668096acd34dd353c79dacdb7b74e003a66f7 > pkfile
ethkey generate --privatekey pkfile
rm pkfile
mkdir mynode
mkdir mynode/keystore
mv keyfile.json mynode/keystore/

Please replace 358af7a90596f0cee9d0a98ed24668096acd34dd353c79dacdb7b74e003a66f7 with your own private key, make sure you remove your pkfile after create key file.

You could inspect your keystore file (or get your private key from key file)

ethkey inspect mynode/keystore/UTC--2019-04-04T23-12-39.782156000Z--217f8723d255f0ce25e1467f9cd35dd191ad029f --private

By type in your password, the result should like:

Passphrase: 
Address:        0x217F8723d255F0Ce25e1467f9CD35DD191AD029F
Public key:     0404e64f34abc2db1c828200382efae917f7bcada845a927fa4ee25a4a162bd80ac57d6e4473e88508e0a71fa1311cf8c45afc46fa2bc9777adc33aa5731baca97
Private key:    5b5100c2e4283f4208241267c4ce01a1582825372d53fbf87c7eee8a50cfda79

Please replace mynode/keystore/UTC--2019-04-04T23-12-39.782156000Z--217f8723d255f0ce25e1467f9cd35dd191ad029f with your own path.

Step 4: Run Supernode

Use the follow command to start node as super node

gttc --datadir mynode/ -unlock '1F1e2e04Fa8153C7349De27De87439E4a32c1Cd9' --password pass.txt --mine

replace 1F1e2e04Fa8153C7349De27De87439E4a32c1Cd9 with the address you create in last step, and make sure your password saved in pass.txt file

Now you will see the log like :

INFO [04-05|07:15:07] Maximum peer count                       ETH=25 LES=0 total=25
INFO [04-05|07:15:07] Starting peer-to-peer node               instance=gttc/v0.2.1-stable/darwin-amd64/go1.11.4
INFO [04-05|07:15:07] Allocated cache and file handles         database=/Users/liupeng/tmp/mynode/gttc/chaindata cache=768 handles=128
INFO [04-05|07:15:09] Persisted trie from memory database      nodes=5 size=839.00B time=12.405µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [04-05|07:15:09] Initialised chain configuration          config="{ChainID: 8341 Homestead: 1 EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: <nil> Engine: alien}"
INFO [04-05|07:15:09] Initialised alien configuration          config="{Period:3 Epoch:201600 MaxSignerCount:21 MinVoterBalance:+100000000000000000000 GenesisTimestamp:1554004800 SelfVoteSigners:[[190 104 101 255 203 190 95 151 70 190 245 200 75 145 47 42 217 229 32 117] [73 9 180 229 67 149 222 158 49 58 216 162 37 79 226 220 218 153 233 28] [160 52 53 12 142 128 235 77 21 172 98 49 6 87 178 156 113 27 179 213]] SideChain:false MCRPCClient:<nil> PBFTEnable:false TrantorBlock:+2968888 TerminusBlock:<nil> LightConfig:<nil>}"
INFO [04-05|07:15:09] Initialising TTC protocol                versions="[63 62]" network=8341
INFO [04-05|07:15:09] Loaded most recent local header          number=68275 hash=2b9e11…3f1b3a td=68276
INFO [04-05|07:15:09] Loaded most recent local full block      number=68275 hash=2b9e11…3f1b3a td=68276
INFO [04-05|07:15:09] Loaded most recent local fast block      number=68275 hash=2b9e11…3f1b3a td=68276
INFO [04-05|07:15:09] Loaded local transaction journal         transactions=0 dropped=0
INFO [04-05|07:15:09] Regenerated local transaction journal    transactions=0 accounts=0
INFO [04-05|07:15:09] Starting P2P networking 
INFO [04-05|07:15:11] UDP listener up                          self=enode://6a20aeac7332e1b0140c247b8209fb75a7e31d26fcf9d77fdf5f0f139f17957cc80f74db1bea24e2362f592f5e83c41b893cebda871a41298fb2397706633893@10.141.161.80:30303
INFO [04-05|07:15:11] RLPx listener up                         self=enode://6a20aeac7332e1b0140c247b8209fb75a7e31d26fcf9d77fdf5f0f139f17957cc80f74db1bea24e2362f592f5e83c41b893cebda871a41298fb2397706633893@10.141.161.80:30303
INFO [04-05|07:15:11] IPC endpoint opened                      url=/Users/liupeng/tmp/mynode/gttc.ipc
INFO [04-05|07:15:12] Unlocked account                         address=0x1F1e2e04Fa8153C7349De27De87439E4a32c1Cd9
INFO [04-05|07:15:12] Transaction pool price threshold updated price=18000000000
INFO [04-05|07:15:12] Etherbase automatically configured       address=0x1F1e2e04Fa8153C7349De27De87439E4a32c1Cd9
INFO [04-05|07:15:12] Starting mining operation 
INFO [04-05|07:15:12] Commit new mining work                   number=68276 txs=0 uncles=0 elapsed=222.521µs
INFO [04-05|07:15:12] Mapped network port                      proto=udp extport=30303 intport=30303 interface="UPNP IGDv1-IP1"
INFO [04-05|07:15:13] Mapped network port                      proto=tcp extport=30303 intport=30303 interface="UPNP IGDv1-IP1"
INFO [04-05|07:15:15] Commit new mining work                   number=68276 txs=0 uncles=0 elapsed=300.194µs
WARN [04-05|07:15:15] Block sealing failed                     err=unauthorized
INFO [04-05|07:15:18] Commit new mining work                   number=68276 txs=0 uncles=0 elapsed=304.569µs
WARN [04-05|07:15:18] Block sealing failed                     err=unauthorized
INFO [04-05|07:15:21] Commit new mining work                   number=68276 txs=0 uncles=0 elapsed=345.815µs
WARN [04-05|07:15:21] Block sealing failed                     err=unauthorized
INFO [04-05|07:15:21] Block synchronisation started 
INFO [04-05|07:15:21] Mining aborted due to sync 
WARN [04-05|07:15:21] Block sealing failed                     err=unauthorized
INFO [04-05|07:15:21] Imported new chain segment               blocks=2 txs=0 mgas=0.000 elapsed=2.954ms   mgasps=0.000 number=68277 hash=0b7fe6…9d174f cache=3.05kB
INFO [04-05|07:15:21] Starting mining operation 
INFO [04-05|07:15:21] Commit new mining work                   number=68278 txs=0 uncles=0 elapsed=525.903µs
INFO [04-05|07:15:24] Imported new chain segment               blocks=1 txs=0 mgas=0.000 elapsed=1.036ms   mgasps=0.000 number=68278 hash=59cebf…0ba0d9 cache=4.70kB
INFO [04-05|07:15:24] Commit new mining work                   number=68279 txs=0 uncles=0 elapsed=260.935µs
WARN [04-05|07:15:24] Block sealing failed                     err=unauthorized
INFO [04-05|07:15:24] Imported new chain segment               blocks=1 txs=0 mgas=0.000 elapsed=1.036ms   mgasps=0.000 number=68278 hash=59cebf…0ba0d9 cache=4.70kB

Means you sync block from our Mainnet.

INFO [04-05|07:15:24] Commit new mining work                   number=68279 txs=0 uncles=0 elapsed=260.935µs
WARN [04-05|07:15:24] Block sealing failed                     err=unauthorized

Means you already try to seal block as supernode, but do not have enough vote till now.

Next Step: waiting for the election of supernode

First loop of vote will be on April 11 - April 15, 2019

Clone this wiki locally