Skip to content

Building GTTC

MaroDeveloper edited this page Apr 26, 2024 · 21 revisions

Building from source

Install Golang

Install latest distribution of Go (v1.13) if you don't have it already:

See instructions

Building gttc requires Go and C compilers to be installed:

sudo apt-get install -y build-essential golang

Download & Build

Download gttc code by go get

go get github.com/TTCECO/gttc

gttc will be found in $GOPATH/src/github.com/TTCECO/gttc on your server.

Or you can clone the gttc project from github and move the gttc into $GOPATH/src/github.com/TTCECO/

git clone https://github.com/TTCECO/gttc.git

Check out the last release version

cd $GOPATH/src/github.com/TTCECO/gttc
git checkout release/v0.2.5

Finally, build the gttc program using the following command.

make gttc

You can now run build/bin/gttc to start your node and connect to our Mainnet.

(build/bin/gttc --testnet is used to connect our Testnet.)

If the log of your node stop as the follow, mean our default public nodes have reached the maximum connection number。

...
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=/full_path_of_my_node/gttc.ipc

Please find more Mainnet enode address at Public-Enode-address. Keep your node running, use the follow command get into console, and paste the Mainnet Enodes in that console

build/bin/gttc attach /full_path_of_my_node/gttc.ipc

If you want to try as supernode on Testnet, please follow the Try as Supernode on Testnet

Clone this wiki locally