Seele Doc
Search…
Mining

Windows users tryout seele-one-click-mining!

  • Refer to the readme.txt in zip for user instructions.

Mining

Download

Download the newestexecutables and configuration templates. The extracted directory has the following structure:
1
mac/linux/win32_v#.#.#
2
├── node1.json //shard1 config template
3
├── node2.json //shard2 config template
4
├── node3.json //shard3 config template
5
├── node4.json //shard4 config template
6
└── build
7
├── client //client executable: for using node services
8
├── discovery
9
├── light
10
├── node //node executable: for runnig a node
11
├── tool
12
└── vm
Copied!
Use the following commands in the build directory.

Accounts

Generate: generate keypairs using shard numbers.
1
$ ./client key --shard 1
2
public key: 0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451
3
private key: 0x85c7d55a434037336a094575506229d82f771d14e9ba6e8c8ffc6e5c1f21de8a
Copied!
Validate: check privatekey or pulickey validity and key shard number.
1
$ ./client getshardnum --account 0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451
2
shard number: 1
3
$ ./client getshardnum --privatekey 0x85c7d55a434037336a094575506229d82f771d14e9ba6e8c8ffc6e5c1f21de8a
4
shard number: 1
Copied!
Save: Create keyfile using privatekey, filename, password.
1
$ ./client savekey --privatekey 0x85c7d55a434037336a094575506229d82f771d14e9ba6e8c8ffc6e5c1f21de8a --file shard1account
2
Password:
3
Repeat password:
4
store key successfully, the key file path is shard1account
Copied!
Restore: restore privateKey with keyfile and password.
1
$ ./client deckeyfile --file shard1account
2
Please input your key file password:
3
public key: 0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451
4
private key: 0x85c7d55a434037336a094575506229d82f771d14e9ba6e8c8ffc6e5c1f21de8a
Copied!

Configure node.json

  1. 1.
    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.
  2. 2.
    Change node id:
    • Generate a keypair whose shard matters not, and fill the template with the privatekey.
Example with configuring shard1 template.
Before:
1
{
2
"basic":{
3
...
4
"coinbase": "0xcee66ad4a1909f6b5170dec230c1a69bfc2b21d1", ← publickey for mining
5
...
6
},
7
"p2p": {
8
"privateKey": "0xf65e40c6809643b25ce4df33153da2f3338876f181f83d2281c6ac4a987b1479", ← node id
9
...
10
},
11
...
12
}
Copied!
After:
1
{
2
"basic":{
3
...
4
"coinbase": "0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451", ← shard1 account publickey
5
...
6
},
7
"p2p": {
8
"privateKey": "0xa12b2ef3e40389ef2e0e3130a88674071760a283c5ed53dfeae40a10cdedb9a8", ← shard2 privatekey
9
...
10
},
11
...
12
}
Copied!

Run node

Run mining node: with 12 threads,using node1.json as configuration file.
1
./node start -c ../node1.json --threads 12
Copied!
Run node without mining:
1
./node start -c ../node1.json -m stop
Copied!

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:
1
$ ./client getbalance --account 0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451 -a 104.218.164.169:8027
2
{
3
"Account": "0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451",
4
"Balance": 0 ←balance, fan as unit, 1seele=100million fan
5
}
Copied!
Node info:
1
$ ./client getinfo -a 127.0.0.1:8027
2
{
3
"BlockAge": 54, ←seconds since the heighest block created
4
"Coinbase": "0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451", ←mining acount
5
"CurrentBlockHeight": 1225756, ←height
6
"HeaderHash": "0xa12b2ef3e40389ef2e0e3130a88674071760a283c5ed53dfeae40a10cdedb9a8", ←node id
7
"MinerStatus": "Stopped", ←minging or not
8
"PeerCnt": "162 (19 54 45 44)", ←total peer number(peers connected from 1 2 3 4
9
"Shard": 1, ←shard number
10
"Version": "v1.2.4" ←version
11
}
Copied!
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

1
$ git --version
2
git version 2.17.1
3
4
$ gcc --version
5
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
6
Copyright (C) 2017 Free Software Foundation, Inc.
7
This is free software; see the source for copying conditions. There is NO
8
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
10
$ go version
11
go version go1.10.4 linux/amd64
Copied!

Download go-seele

Download go-seele: configure the path ~/go/src/github.com/seeleteam。
1
~$ cd
2
~$ mkdir -p go/src/github.com/seeleteam
3
~$ cd go/src/github.com/seeleteam
4
~/go/src/github.com/seeleteam$ git clone https://github.com/seeleteam/go-seele.git
5
6
Cloning into 'go-seele'...
7
remote: Enumerating objects: 53, done.
8
remote: Counting objects: 100% (53/53), done.
9
remote: Compressing objects: 100% (48/48), done.
10
remote: Total 10032 (delta 13), reused 15 (delta 4), pack-reused 9979
11
Receiving objects: 100% (10032/10032), 12.25 MiB | 18.45 MiB/s, done.
12
Resolving deltas: 100% (5804/5804), done.
Copied!

Compile go-seele:

1
~/go/src/github.com/seeleteam$ cd go-seele
2
~/go/src/github.com/seeleteam/go-seele$ make all
3
go build -o ./build/discovery ./cmd/discovery
4
Done discovery building
5
go build -o ./build/node ./cmd/node
6
Done node building
7
go build -o ./build/client ./cmd/client
8
Done full node client building
9
go build -o ./build/light ./cmd/client/light
10
Done light node client building
11
go build -o ./build/tool ./cmd/tool
12
Done tool building
13
go build -o ./build/vm ./cmd/vm
14
Done vm building
15
~/go/src/github.com/seeleteam/go-seele$
Copied!