lotus环境搭建(一)

一.根据官方文档,参与测试网需要的配置要求为

1.8核16线程的cpu

2.16G内存,512G SSD

3.2T机械硬盘

4.GPU显卡N卡1060,6G

二.安装ubuntu操作系统(目前暂不支持windows)

可以到ubuntu官方去下载安装,下载链接:https://ubuntu.com/download/desktopUbuntu

三.安装好系统后配置环境(本教程以ubuntu系统为例)

1安装以下相关组件

2右键打开一个终端命令行,依次输入以下命令

sudo add-apt-repository ppa:longsleep/golang-backports

扫描二维码关注公众号,回复: 8700832 查看本文章

sudo apt update

sudo apt install golang-go gcc git bzr jq pkg-configmesa-opencl-icd ocl-icd-opencl-dev

sudo apt installllvm

sudo apt installclang

curlhttps://sh.rustup.rs-sSf | sh

四.安装Fliecoin-Lotus

  1. 下载源码

git clone https://github.com/filecoin-project/lotus.git

2.进入lotus目录下

cd lotus

3.编译源码

make clean && make all

五.开始运行Filecoin测试网节点

1.启动运行同步区块命令

lotus daemon

2.刚运行的终端不要关闭,接下来,打开一个新的终端界面,用来查看节点状态

lotus net peers | wc -l (检查区块链节点连接数量)

lotus sync wait (检查区块链同步高度)

lotus wallet new bls (创建钱包地址)

lotus wallet balance [optionaladdress] (查看钱包余额)

六.初始化矿工

1.打开官方指定地址https://faucet.testnet.filecoin.io/,领取测试FIL代币,并且创建一个矿工

2.点击Create Miner

3.输入完成后,再点击点击 Create Miner。不要关闭此窗口

4.进入到终端命令行,初始化矿工

lotus-storage-miner init --actor=t0xx

--owner=t3wxxxxxxxxk6phtoc(输入你刚生成的挖矿信息)

七.开始挖矿

  1. lotus-storage-miner run (开始挖矿)

  2. lotus-storage-miner pledge-sector (密封随机数提交时空证明)

八.检查挖矿状态

根据矿工ID 查询矿工功率和扇区使用情況:

1.查看全网有效存储

lotus-storage-miner state power

2.查看当前矿工有效存储

lotus-storage-miner state power ‘minerid’

3.查看当前矿工密封扇区

lotus-storage-miner state sectors ‘minerid’

Filecoin官方浏览器上查看当前矿工状态,链接 https://stats.testnet.filecoin.io

相关链接

Filecoin-Lotus测试网教程
Lotus 低配置运行

猜你喜欢

转载自www.cnblogs.com/tomtellyou/p/12212581.html