lotus-seal-worker

lotus-seal-worker

  • 1,lotus-seal-worker
  • 2,存储过程
  • 3,远程矿工
    • 3.1,`lotus-storage-miner`节点运行环境
    • 3.2,`lotus-seal-worker`运行节点,远程节点
  • 4,报错日志

1,lotus-seal-worker

  • GPU服务器,POST时空证明
    lotus daemon
    lotus-storage-miner

  • 远程存储矿工Remote storage miner worker,复制证明
    lotus-seal-worker

2,存储过程

AddPiece 添加扇区
PreCommit 预提交
Commit 提交
Unseal 解封

3,远程矿工

3.1,lotus-storage-miner节点运行环境

  • 运行lotus daemonlotus-storage-miner run
# ps aux | grep lotus | grep -v grep
lotus daemon
lotus-storage-miner run
  • 区块高度同步完成
# lotus sync wait
Worker 0: Target: [bafy2bzaceb6uqvftvtnid4ornqxibjcapv4z5z65z2e7xu76w5u42fcmk662u]	State: complete	Height: 10533
Done!
  • 修改config.toml
  • 默认路径~/.lotusstorage/config.toml
  • 自定义的路径$LOTUS_STORAGE_PATH/config.toml
# vim  $LOTUS_STORAGE_PATH/config.toml
#[API]
[API]
#  ListenAddress = "/ip4/127.0.0.1/tcp/2345/http"
  ListenAddress = "/ip4/192.168.0.201/tcp/2345/http"
#  Timeout = "30s"
  Timeout = "30s"
  • 重启lotus-storage-miner,使配置文件生效。

  • cat /storage/lotuswork/lotusstorage/api 配置文件127.0.0.1为变为IP地址

  • 生产token

  • lotus-storage-miner auth create-token --perm admin

# lotus-storage-miner auth create-token --perm admin
eyJhbG...
  • 查看api
# cat $LOTUS_STORAGE_PATH/api
/ip4/192.168.0.201/tcp/2345/http

3.2,lotus-seal-worker运行节点,远程节点

  • 可能有更简单的方便,我的环境是这样的。
  • 下载lotus源代码编译安装
# which lotus
/usr/local/bin/lotus
# which lotus-storage-miner
/usr/local/bin/lotus-storage-miner
# which lotus-seal-worker
/usr/local/bin/lotus-seal-worker
  • make lotus-seal-worker检查是否有安装
# make lotus-seal-worker
make: *** 没有规则可制作目标“lotus-seal-worker”。 停止。
  • /var/tmp/filecoin-proof-parameters 有所需要的复制证明参数

  • 设置环境变量
    STORAGE_API_INFO=token:api

# tail .bashrc
export STORAGE_API_INFO="eyJ...:/ip4/192.168.0.201/tcp/2345/http"
  • 运行lotus-seal-worker
nohup lotus-seal-worker run >> /storage/worker.log 2>&1 &
  • 查看日志
# tail -f worker.log
  • Remote: 0 / 1 有一个远程矿工
# lotus-storage-miner info
Miner: 
Sector Size: 1 GiB
Power: 0 B / 134 TiB (0.0000%)
        Committed: 0 B
        Proving: 0 B
Worker use:
        Local: 0 / 4 (+1 reserved)
        Remote: 0 / 1
Queues:
        AddPiece: 0
        PreCommit: 0
        Commit: 0
        Unseal: 0
Proving Period: Not Proving
  • 节点只运行lotus-seal-worker
# ps aux | grep lotus | grep -v grep
lotus-seal-worker run
  • 如果有设置环境变量$WORKER_PATH
# echo $WORKER_PATH
/storage/lotuswork/lotusworker
# ls
cache  sealed  staged  unsealed

4,报错日志

lotus-seal-worker: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory
apt install ocl-icd-opencl-dev -y

参考:

  1. 教你做 Filecoin Lotus 测试网的大矿工
  2. API Scripting Support
  3. how to use mining worker
  4. error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory

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