mac/linux/win32_v#.#.#
├── node1.json //shard1 config template
├── node2.json //shard2 config template
├── node3.json //shard3 config template
├── node4.json //shard4 config template
└── build
├── client //client executable: for using node services
├── discovery
├── light
├── node //node executable: for runnig a node
├── tool
└── vm
Use the following commands in the build directory.
Accounts
Generate: generate keypairs using shard numbers.
Validate: check privatekey or pulickey validity and key shard number.
Save: Create keyfile using privatekey, filename, password.
Restore: restore privateKey with keyfile and password.
Configure node.json
Change mining account:
To mine in shard 1, generate a shard 1 keypaire, then place the publickey in node1.json template.
To mine in shard 2, generate a shard 2 keypaire, then place the publickey in node2.json template.
Similarly for 3 and 4.
Change node id:
Generate a keypair whose shard matters not, and fill the template with the privatekey.
Example with configuring shard1 template.
Before:
After:
Run node
Run mining node: with 12 threads,using node1.json as configuration file.
Run node without mining:
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:
Node info:
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
Download go-seele
Download go-seele: configure the path ~/go/src/github.com/seeleteam。
$ ./client getbalance --account 0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451 -a 104.218.164.169:8027
{
"Account": "0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451",
"Balance": 0 ←balance, fan as unit, 1seele=100million fan
}
$ ./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
}
$ 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
~/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$