其他分享
首页 > 其他分享> > lotus v0.4.0 testnet 测试

lotus v0.4.0 testnet 测试

作者:互联网

lotus v0.4.0 testnet 测试

1,二进制安装包下载

1.1 下载源码编译

  1. 设置环境变量 vim /root/.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

#parameters
export FIL_PROOFS_PARAMETER_CACHE=/storage/filecoin-proof-parameters-v27
export IPFS_GATEWAY=https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/

export RUST_LOG=info
export FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1
export FIL_PROOFS_MAXIMIZE_CACHING=1
  1. 下载源码编译
# 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
git clone https://github.com/filecoin-project/lotus.git
# cd lotus/
# git show
commit ffa7be86fe6ee738ab4b095469029b9fac51e090 (HEAD -> master, tag: v0.4.0, origin/master, origin/HEAD)
Merge: b99b8f55 c41c210c
Author: Łukasz Magiera <magik6k@users.noreply.github.com>
Date:   Fri Jun 19 01:29:01 2020 +0200

    Merge pull request #2070 from filecoin-project/feat/reset-genesis

    New Genesis
env RUSTFLAGS="-C target-cpu=native -g" FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1  FFI_BUILD_FROM_SOURCE=1 make clean all bench
go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.ffa7be86" -o lotus ./cmd/lotus
go: downloading github.com/filecoin-project/sector-storage v0.0.0-20200618073200-d9de9b7cb4b4
go: downloading github.com/filecoin-project/specs-actors v0.6.2-0.20200617175406-de392ca14121
go: downloading github.com/filecoin-project/storage-fsm v0.0.0-20200617183754-4380106d3e94
+go run github.com/GeertJohan/go.rice/rice append --exec lotus -i ./build
rm -f lotus-storage-miner
go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.ffa7be86" -o lotus-storage-miner ./cmd/lotus-storage-miner
go run github.com/GeertJohan/go.rice/rice append --exec lotus-storage-miner -i ./build
rm -f lotus-seal-worker
go build  -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.ffa7be86" -o lotus-seal-worker ./cmd/lotus-seal-worker
go run github.com/GeertJohan/go.rice/rice append --exec lotus-seal-worker -i ./build
rm -f bench
go build -o bench ./cmd/lotus-bench
go run github.com/GeertJohan/go.rice/rice append --exec bench -i ./build
make install
# make install
install -C ./lotus /usr/local/bin/lotus
install -C ./lotus-storage-miner /usr/local/bin/lotus-storage-miner
install -C ./lotus-seal-worker /usr/local/bin/lotus-seal-worker

2,运行lotus守护进程

nohup lotus daemon >> /storage/lotus.log 2>&1 &

2.1 从别的节点拷贝区块高度数据

tar -zcvf chain-1264.tar.gz chain/
# rm -rf chain/
# tar -zxvf chain-1264.tar.gz

3,创建钱包

  1. 查看钱包地址
lotus wallet list
  1. 创建钱包
# lotus wallet new bls
t3222

4,创建矿工

4.1 水龙头创建

4.2 获取测试币

lotus send t3222 10
lotus wallet balance
lotus-storage-miner init create-worker-key-t3222 --sector-size 32GiB

5,运行矿工

nohup lotus-storage-miner run >> /storage/miner.log 2>&1 &
lotus-storage-miner info
lotus-storage-miner sectors pledge

标签:lotus,miner,storage,go,testnet,export,v0.4,com
来源: https://blog.csdn.net/u010953692/article/details/106857629