Seele Doc
Search…
挖矿

欢迎windows用户尝试一键挖矿

  • 使用说明参考zip中的readme.txt。

挖矿

下载

下载最新可执行档和配置模板。zip文件夹格式如下:
1
mac/linux/win32_v#.#.#
2
├── node1.json //片1节点配置模板
3
├── node2.json //片2节点配置模板
4
├── node3.json //片3节点配置模板
5
├── node4.json //片4节点配置模板
6
└── build
7
├── client //client可执行档:使用节点服务
8
├── discovery
9
├── light
10
├── node //node可执行档:启动节点
11
├── tool
12
└── vm
Copied!
以下操作用终端进入build文件夹内执行

账户

生成:根据片数生成公私钥对
1
$ ./client key --shard 1
2
public key: 0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451
3
private key: 0x85c7d55a434037336a094575506229d82f771d14e9ba6e8c8ffc6e5c1f21de8a
Copied!
验证:验证公钥或私钥理性和公私钥片数
1
$ ./client getshardnum --account 0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451
2
shard number: 1
3
$ ./client getshardnum --privatekey 0x85c7d55a434037336a094575506229d82f771d14e9ba6e8c8ffc6e5c1f21de8a
4
shard number: 1
Copied!
保存:密码、名称、私钥来生成keyfile
1
$ ./client savekey --privatekey 0x85c7d55a434037336a094575506229d82f771d14e9ba6e8c8ffc6e5c1f21de8a --file shard1account
2
Password:
3
Repeat password:
4
store key successfully, the key file path is shard1account
Copied!
还原:用keyfile和密码还原私钥
1
$ ./client deckeyfile --file shard1account
2
Please input your key file password:
3
public key: 0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451
4
private key: 0x85c7d55a434037336a094575506229d82f771d14e9ba6e8c8ffc6e5c1f21de8a
Copied!

配置 node.json

  1. 1.
    修改挖矿账户
    • 若在片1挖矿,要生成片1的公私钥对,并将片1公钥填入node1.json节点配置模板。
    • 若在片2挖矿,要生成片2的公私钥对,并将片2公钥填入node2.json节点配置模板。
    • 片3、4以此类推。
  2. 2.
    修改节点id
    • 生成公私钥对,片数无所谓,取私钥填入挖矿所用的配置文档。
片1挖矿配置节点例子:
配置前
1
{
2
"basic":{
3
...
4
"coinbase": "0xcee66ad4a1909f6b5170dec230c1a69bfc2b21d1", ← 挖矿公钥
5
...
6
},
7
"p2p": {
8
"privateKey": "0xf65e40c6809643b25ce4df33153da2f3338876f181f83d2281c6ac4a987b1479", ← 节点id
9
...
10
},
11
...
12
}
Copied!
配置后
1
{
2
"basic":{
3
...
4
"coinbase": "0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451", ← 片1公钥
5
...
6
},
7
"p2p": {
8
"privateKey": "0xa12b2ef3e40389ef2e0e3130a88674071760a283c5ed53dfeae40a10cdedb9a8", ← 片2私钥
9
...
10
},
11
...
12
}
Copied!

启动 node 挖矿

启动挖矿节点:线程数12,用node1.json的配置文档
1
./node start -c ../node1.json --threads 12
Copied!
启动节点、不挖矿:
1
./node start -c ../node1.json -m stop
Copied!

使用 node 服务

每次节点启动会先检查本地数据库完整性,每秒10000块左右。之后会启动节点服务,用户可以用client来使用各种服务。
  • 片1的监听端口:8027
  • 片2的监听端口:8028
  • 片3的监听端口:8029
  • 片4的监听端口:8026
余额:
1
$ ./client getbalance --account 0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451 -a 104.218.164.169:8027
2
{
3
"Account": "0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451",
4
"Balance": 0 ←余额,单位为fan,1seele=1亿fan
5
}
Copied!
节点信息:
1
$ ./client getinfo -a 127.0.0.1:8027
2
{
3
"BlockAge": 54, ←最高块距今秒数
4
"Coinbase": "0x43ff8ee89e56de149fd29bedbf8f3f4094cfe451", ←挖矿账户
5
"CurrentBlockHeight": 1225756, ←高度
6
"HeaderHash": "0xa12b2ef3e40389ef2e0e3130a88674071760a283c5ed53dfeae40a10cdedb9a8", ←节点id
7
"MinerStatus": "Stopped", ←是否在挖矿
8
"PeerCnt": "162 (19 54 45 44)", ←连接总节点数(来自片1 2 3 4)
9
"Shard": 1, ←片数
10
"Version": "v1.2.4" ←版本
11
}
Copied!
直接打./client可见可用命令,用-h查看命令使用方法,如./client sendtx -h查看如何用keyfile做交易。

编译 node

以下示例为ubuntu和mac命令,

检查git,gcc,go版本

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!

下载go-seele

下载go-seele:首先在根目录里创建路径:~/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!

编译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!