Run mining node: with 12 threads,using node1.json as configuration file.
./node start -c ../node1.json --threads 12
Run node without mining:
./node start -c ../node1.json -m stop
Using node services
When node starts, it checks the completeness of its database at a speed of roughly 10,000 blocks per second. Then the node will launch its services, which the client executable can access.
shard 1 listening port:8027
shard 2 listening port:8028
shard 3 listening port:8029
shard 4 listening port:8026
Balance:
$ ./client getbalance --account 0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451 -a 104.218.164.169:8027
{
"Account": "0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451",
"Balance": 0 ←balance, fan as unit, 1seele=100million fan
}
Node info:
$ ./client getinfo -a 127.0.0.1:8027
{
"BlockAge": 54, ←seconds since the heighest block created
"Coinbase": "0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451", ←mining acount
"CurrentBlockHeight": 1225756, ←height
"HeaderHash": "0xa12b2ef3e40389ef2e0e3130a88674071760a283c5ed53dfeae40a10cdedb9a8", ←node id
"MinerStatus": "Stopped", ←minging or not
"PeerCnt": "162 (19 54 45 44)", ←total peer number(peers connected from 1 2 3 4)
"Shard": 1, ←shard number
"Version": "v1.2.4" ←version
}
Use ./client to view all available commands, and -h to see details of how to use them, for example ./client sendtx -h to see how to send transactions with keyfile.
Compile node
The following commands work on ubuntu and mac.
Check git,gcc,go version
$ git --version
git version 2.17.1
$ gcc --version
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ go version
go version go1.10.4 linux/amd64
Download go-seele
Download go-seele: configure the path ~/go/src/github.com/seeleteam。
~/go/src/github.com/seeleteam$ cd go-seele
~/go/src/github.com/seeleteam/go-seele$ make all
go build -o ./build/discovery ./cmd/discovery
Done discovery building
go build -o ./build/node ./cmd/node
Done node building
go build -o ./build/client ./cmd/client
Done full node client building
go build -o ./build/light ./cmd/client/light
Done light node client building
go build -o ./build/tool ./cmd/tool
Done tool building
go build -o ./build/vm ./cmd/vm
Done vm building
~/go/src/github.com/seeleteam/go-seele$