lotus v0.4.0 testnet 测试
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
- 下载源码编译
# 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 从别的节点拷贝区块高度数据
-
/storage/lotuswork/lotus/datastore/chain
目录路径
tar -zcvf chain-1264.tar.gz chain/
- 替换
chain
目录,删除chain
目录,解压chain-1264.tar.gz chain
# rm -rf chain/
# tar -zxvf chain-1264.tar.gz
3,创建钱包
- 查看钱包地址
lotus wallet list
- 创建钱包
# 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