Testnet Phase 2 lotus v0.3.0 安装

Testnet Phase 2 lotus v0.3.0 安装

  • 1,Testnet Phase 2 lotus v0.3.0 安装
    • 1.1,ADM编译
  • 2,运行lotus
  • 3,创建矿工
  • 4,初始化矿工
  • 5,随机存储扇区
  • 6,~~更新代码~~

1,Testnet Phase 2 lotus v0.3.0 安装

  • 终端代理 (使用木马troj)
  • 设置环境变量
# export ALL_PROXY=socks5://127.0.0.1:1080
# git config --global http.proxy 'socks5://127.0.0.1:1080'
# export GO111MODULE=on
# export GOPROXY=https://goproxy.cn
  • 克隆lotus源码分支master
git clone https://github.com/filecoin-project/lotus.git
  • 编译安装
make clean all && make install

1.1,ADM编译

env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean all
make install
  • 或者
env RUSTFLAGS="-C target-cpu=native -g" FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1  FFI_BUILD_FROM_SOURCE=1 make clean all bench

2,运行lotus

  • 设置环境变量vim .bashrc
# lotus
export LOTUS_PATH=/storage/lotuswork/lotus
export LOTUS_STORAGE_PATH=/storage/lotuswork/lotusstorage
export WORKER_PATH=/storage/lotuswork/lotusworker
export TMPDIR=/storage/lotuswork/tmpdir

export FIL_PROOFS_PARAMETER_CACHE=/storage/filecoin-proof-parameters-v26/parameters-v26
  • 运行lotus守护进程
nohup lotus daemon >> /storage/lotus.log 2>&1 &
  • 查看区块同步
lotus sync status
lotus sync wait

3,创建矿工

  • 查看钱包地址
lotus wallet list
  • 创建钱包
lotus wallet new bls
  • 访问官方水龙头创建矿工
  • 官方水龙头

4,初始化矿工

  • 初始化矿工,时间有点久(用时40分钟)
lotus-storage-miner init --actor=t03 --owner=t3s
  • 设置环境变量,日志输出
  • RUST_LOG日志
  • FIL_PROOFS_USE_GPU_COLUMN_BUILDER GPU计算Precommit2
  • FIL_PROOFS_MAXIMIZE_CACHING 最大化内存参数,不设置这个seal_pre_commit_phase1一层layer会超过2小时,设置以后可以缩短到20分钟
# vim .bashrc
export RUST_LOG=info
export FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1
export FIL_PROOFS_MAXIMIZE_CACHING=1
# source .bashrc
  • 运行矿工
nohup lotus-storage-miner run >> /storage/miner.log 2>&1 &

5,随机存储扇区

  • 存储扇区
lotus-storage-miner sectors pledge

6,更新代码

# git show
commit f86a2ced06b8fe88043a1874d21c0da8d2778570 (HEAD -> master, origin/master, origin/HEAD)
Merge: e9eaee6e f7a45f6c
Author: Aayush Rajasekaran 
Date:   Thu May 14 18:34:59 2020 -0400

    Merge pull request #1747 from filecoin-project/asr/docs

    Fix 3 typos
# lotus --version
lotus version 0.3.0'+gitf86a2ced'
  • 拉取最新代码
# git pull
# git show
commit 54b3eafd6d541a68199965bbf13ec2e339c625f5 (HEAD -> master, origin/master, origin/HEAD)
Merge: 5c73602d f6589407
Author: Whyrusleeping 
Date:   Fri May 15 13:05:27 2020 -0700

    Merge pull request #1758 from filecoin-project/fix/lotus-bench-secp

    register secp signatures for lotus bench usage
  • 重新编译安装
  • kill进程lotus-storage-miner runlotus daemon
  • lotus目录不用删除
# make clean all && make install
# lotus --version
lotus version 0.3.0'+git54b3eafd.dirty'

参考:

  1. filecoin proof parameters v26 下载
  2. CoinSummer实验室Filecoin资源分享

你可能感兴趣的:(#,lotus)