1,依赖安装
- 安装依赖
go
gcc
git
bzr
jq
pkg-config
$ which go
/usr/local/bin/go
$ go version
go version go1.13 darwin/amd64
$ which gcc
/usr/bin/gcc
$ which git
/usr/local/bin/git
$ git version
git version 2.23.0
$ brew search bazaar
==> Formulae
bazaar
$ brew install bazaar
$ bzr --version
Bazaar (bzr) 2.7.0
$ brew install jq
$ jq --version
jq-1.6
$ brew install pkg-config
$ pkg-config --version
0.29.2
- 安装
cmake
$ git clone https://github.com/KhronosGroup/OpenCL-ICD-Loader.git
$ cd OpenCL-ICD-Loader/
$ mkdir build
$ cd build/
2,编译
- 需要挂终端代理
$ git clone https://github.com/filecoin-project/lotus.git
$ cd lotus/
$ make
$ sudo make install
Password:
install -C ./lotus /usr/local/bin/lotus
install -C ./lotus-storage-miner /usr/local/bin/lotus-storage-miner
3,lotus运行
- 更改目录权限
sudo chown $(whoami):admin /var/log
- 后台运行守护进程
lotus daemon > /var/log/lotus.log 2>&1 &
$ lotus net peers | wc -l
34
$ watch lotus sync status
Height: 1977
$ lotus wallet new bls
- 获取测试币
- Lotus 水龙头获取测试代币
https://lotus-faucet.kittyhawk.wtf/
$ lotus wallet balance
500000000
- mining
$ lotus state pledge-collateral
18596947193119270372
- error
$ lotus state pledge-collateral
18596947193119270372
$ lotus wallet balance
500000000
4,删除lotus
参考: