努力赚钱
将来的你一定会感谢现在努力的自己!

如何参与Filecash挖矿,FIC币挖矿教程和方法

目前不清退的交易所推荐:

1、全球第二大交易所OKEx欧意,邀请链接: https://www.ouyi.space/join/1837888  能交易XCH,BZZ,BTC,ETH等等安全交易,新用户能开合约。

2、老牌交易所比特儿现改名叫芝麻开门 :https://www.gate.tv/signup/649183能交易XCH,BZZ,BTC,ETH等等安全交易,新用户能开合约。

1. 系统要求

Filecash 可以在 Linux 上运行,不支持 Windows 系统。本篇教程将在 Ubuntu 18.04 系统上进行操作。2973e9d1846c184b7ae006aea5253fda

1.1 硬件配置

Filecash 目前支持 4GiB、16GiB 的扇区。

  • 4GiB矿工:单任务缓存空间为 60GiB, C2最大内存占用115GiB, 显存不小于8300MB
  • 16GiB矿工:单任务缓存空间为 160GiB, C2最大内存占用85GiB, 显存不小于5120MB
1.2 系统依赖

运行需要系统安装如下依赖库:

  • go (1.15)
  • gcc (7.4.0 or higher)
  • git (version 2 or higher)
  • bzr (some go dependency needs this)
  • jq
  • pkg-config
  • opencl-icd-loader
  • opencl driver (like nvidia-opencl on arch) (for GPU acceleration)
  • opencl-headers (build)
  • rustup (proofs build)
  • llvm (proofs build)
  • clang (proofs build)
  • hwloc libhwloc-dev

Ubuntu 安装依赖库命令为:

  sudo apt update
  sudo apt install mesa-opencl-icd ocl-icd-opencl-dev hwloc libhwloc-dev gcc git bzr jq pkg-config curl hwloc libhwloc-dev -y
  sudo apt upgrade -y

Go 环境安装命令为:

sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt-get install golang-1.15-go -y
export PATH=$PATH:/usr/lib/go-1.15/bin

2 安装

2.1 直接安装 (目前只适配Ubuntu18.04系统)

从 https://github.com/filecash/lotus/releases 下载编译好的二进制文件,解压导入目录 /usr/local/bin 即可。

2.2 编译安装
2.2.1 克隆代码
git clone https://github.com/filecash/lotus_builder
2.2.2 编译安装 lotus / lotus-miner / lotus-worker
cd lotus_builder/
bash build.sh -a -y
cd lotus/
make install
2.2.3 编译 lotus-checker / lotus-shed
cd lotus_builder/
bash build.sh -a -y
cd lotus/
make lotus-checker lotus-shed

3 加入Filecash主网

3.1 启动lotus节点

首先启动 Filecash 守护进程,让lotus进程在后台保持运行,同步节点数据:

  nohup lotus daemon > daemon.log 2>&1 &
3.1.1 快照恢复节点数据
# 1. 备份私钥:
  lotus wallet export fxxxxxxxx > fxxxxxxxx.key
# 2. 关闭lotus程序
  lotus daemon stop
# 3. 清理lotus链数据目录:
  rm -rf ~/.lotus/datastore/chain/*
# 4. 下载快照文件:
  wget https://snapshot.file.cash/fic-snapshot-latest.car
# 5. 导入快照文件:
  lotus daemon --import-snapshot fic-snapshot-latest.car
3.1.2 修改lotus机器 “~/.lotus/config.toml” 里面ListenAddress的IP
[API]
  ListenAddress = "/ip4/<lotus IP>/tcp/1234/http"
3.1.2 重启lotus节点
  nohup lotus daemon > daemon.log 2>&1 &
3.2 创建钱包

创建钱包

  lotus wallet new bls

从交易所购买FIC(Filecash),提现到申请的钱包地址。

  owner=`lotus wallet list`
3.3 下载证明文件
# 自动下载证明文件
  export FIL_PROOFS_PARAMETER_CACHE=/mnt/proofs
  nohup lotus fetch-params 4GiB > fetch-params-4gb.log 2>&1 &
  nohup lotus fetch-params 16GiB > fetch-params-16gb.log 2>&1 &

  export FIL_PROOFS_PARAMETER_CACHE=/mnt/proofs
  cd $FIL_PROOFS_PARAMETER_CACHE

# 手动下载2KB证明文件
  wget -c https://proofs.file.cash/ipfs/QmTkitxLQPwXhSFg8Y4i2n4USSrETjsRMWMZ6THpmaKEq6 -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0170db1f394b35d995252228ee359194b13199d259380541dc529fb0099096b0.params
  wget -c https://proofs.file.cash/ipfs/QmZtwfkZgTLPahC72YRzMjaeN1xej9yv86dY4gEoi51cTj -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0170db1f394b35d995252228ee359194b13199d259380541dc529fb0099096b0.vk
  wget -c https://proofs.file.cash/ipfs/QmPXg9Nfhkmne9Ts6HSnpfZTim1N7sryNooUwprpqnGDgv -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-3ea05428c9d11689f23529cde32fd30aabd50f7d2c93657c1d3650bca3e8ea9e.params
  wget -c https://proofs.file.cash/ipfs/QmYfnVVgfrUDyvxFfhSsithucRUneUAE7CisjkWQcHWE2i -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-3ea05428c9d11689f23529cde32fd30aabd50f7d2c93657c1d3650bca3e8ea9e.vk
  wget -c https://proofs.file.cash/ipfs/QmaJVdcP5hMc92TYERy2zcxbKcttSf3YmGmw28NFiWNiiR -O v28-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-032d3138d22506ec0082ed72b2dcba18df18477904e35bafee82b3793b06832f.params
  wget -c https://proofs.file.cash/ipfs/QmV8H8yJD1B9dTvYs2PYBJ3xs6QwsJ1a3g5qBKDVUe9wmj -O v28-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-032d3138d22506ec0082ed72b2dcba18df18477904e35bafee82b3793b06832f.vk

# 手动下载4GB证明文件
  wget -c https://proofs.file.cash/ipfs/QmYRGdsr7L3hXWcAQKrkNMMhUXfsfhfxsrBhoez7zbSf2g -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-23807ff142251ff42f38810834724169c8f81ca563d360f1502363f6f8ad580c.params
  wget -c https://proofs.file.cash/ipfs/QmeaxZu6ESeiTHH7EWiuqZZ58dLi55FYQYZNVxvrXf51vi -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-23807ff142251ff42f38810834724169c8f81ca563d360f1502363f6f8ad580c.vk
  wget -c https://proofs.file.cash/ipfs/QmbBxv2BG3Y3eSYddTNmTFJX77R14KVSrE3vByfE2wZQG1 -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-3be65b9045f13d2c857d62c18a5dcc9a7a83b0ff84e61a91979ba1ba6d1812c7.params
  wget -c https://proofs.file.cash/ipfs/QmUJ8WrPWz6ZJAWT5BJkEJeQBii3A4Lj9pMMsGrx8ZGwqx -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-3be65b9045f13d2c857d62c18a5dcc9a7a83b0ff84e61a91979ba1ba6d1812c7.vk
  wget -c https://proofs.file.cash/ipfs/QmQqi3Ha3LbKPf1KgTArC3NUTBLWVBwt56f4fFcX1QRduZ -O v28-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-fcc4520bb35a7a20aa871fbad43e6aa887de9fbe1131c5cb365c47c83601a5b2.params
  wget -c https://proofs.file.cash/ipfs/QmVZnh11qqaeGaZ1YVaHgeEjGfCtBTCGRfapb42r5sjHac -O v28-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-fcc4520bb35a7a20aa871fbad43e6aa887de9fbe1131c5cb365c47c83601a5b2.vk

# 手动下载16GB证明文件
  wget -c https://proofs.file.cash/ipfs/QmeQoWydjK7YBABNaLsQieVetcXBPP86GQCboHbnNrVC7N -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-4-0-14020a794b2c2191f4e7462ed8cb9b86f2a2d719b1d13e6581d80ad981e6b098.params
  wget -c https://proofs.file.cash/ipfs/QmeMEntrC1pHHzD9KwXT7z433Nt2EixuhvnpdUF38WULgT -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-4-0-14020a794b2c2191f4e7462ed8cb9b86f2a2d719b1d13e6581d80ad981e6b098.vk
  wget -c https://proofs.file.cash/ipfs/QmZSfBBrDhKyo8gjPN83vgzNvTNsnFkW82EDTq957eT2TW -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-4-0-a01cdbef817cac42c9566e38490f0b4d299e2752af52a78b2a9d38b24286d5b4.params
  wget -c https://proofs.file.cash/ipfs/QmYuAfcN4VSAJ9ocuqRYkq2wWsGWoZQczeJBejzQEkU1Vi -O v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-4-0-a01cdbef817cac42c9566e38490f0b4d299e2752af52a78b2a9d38b24286d5b4.vk
  wget -c https://proofs.file.cash/ipfs/QmaWpJxJ7YcEN3VqG94YwBna3PLAgknbRS9eAoLGTwpHZM -O v28-stacked-proof-of-replication-merkletree-poseidon_hasher-8-4-0-sha256_hasher-07c0adb3191b18918d631375516125e2900a1c437745539389cf154ec430c1c2.params
  wget -c https://proofs.file.cash/ipfs/QmUjqsiQaZziKxgR86JA7Q1imuHpqbuRjMmq6k5vbv5WDu -O v28-stacked-proof-of-replication-merkletree-poseidon_hasher-8-4-0-sha256_hasher-07c0adb3191b18918d631375516125e2900a1c437745539389cf154ec430c1c2.vk
3.4 创建矿工
3.4.1 如lotus和miner不在同一台机器需要复制两个文件,配置了FULLNODE_API_INFO不用复制。

将lotus机器里的 ~/.lotus/api ~/.lotus/token 复制到lotus-miner机器的 ~/.lotus/ 目录

3.4.2 创建矿工miner
# 4G-miner:
  lotus-miner --miner-repo=~/.lotusminer-4gb  init --owner=$owner --sector-size=4GiB
  
# 16G-miner:
  lotus-miner --miner-repo=~/.lotusminer-16gb  init --owner=$owner --sector-size=16GiB

耐心等待链上确认,创建完成会输出日志 “Miner successfully created, you can now start it with ‘lotus-miner run'”

4 启动矿工miner

4.1 修改lotus-miner机器 “~/.lotusminer/config.toml” 里面ListenAddress的IP
# 4G-miner: 修改 "~/.lotusminer-4gb/config.toml" 里面ListenAddress的IP
[API]
  ListenAddress = "/ip4/<4G-miner IP>/tcp/2345/http"

# 16G-miner: 修改 "~/.lotusminer-16gb/config.toml" 里面ListenAddress的IP
[API]
  ListenAddress = "/ip4/<16G-miner IP>/tcp/2355/http"
4.2 启动矿工miner:
# 4G-miner: 
  nohup lotus-miner --miner-repo=~/.lotusminer-4gb run > miner-4gb.log 2>&1 &
  
# 16G-miner:
  nohup lotus-miner --miner-repo=~/.lotusminer-16gb run > miner-16gb.log 2>&1 &

5 新增最终落盘路径

5.1 最终落盘路径 “/opt/miner_store”
# 4G-miner:
lotus-miner --miner-repo=~/.lotusminer-4gb storage attach --store --weight=10 --init /opt/miner_store4

# 16G-miner:
lotus-miner --miner-repo=~/.lotusminer-16gb storage attach --store --weight=10 --init /opt/miner_store16
5.2 修改 “~/.lotusminer/sectorstore.json”
# 修改"~/.lotusminer-*/sectorstore.json"
  num=`grep -i "\"CanStore\": false" ~/.lotusminer/sectorstore.json |awk '{print length($0)}'`
  if [ -z $num ]; then
    sed -i "s/\"CanStore\": true/\"CanStore\": false/g"  ~/.lotusminer/sectorstore.json
  fi

6 搭建挖矿集群

6.1 修改 “~/.lotus/config.toml” 里面ListenAddress的IP
[API]
  ListenAddress = "/ip4/<lotus IP>/tcp/1234/http"
6.2 修改 “~/.lotusminer/config.toml” 里面ListenAddress的IP
# 4G-miner: 修改 "~/.lotusminer-4gb/config.toml" 里面ListenAddress的IP
[API]
  ListenAddress = "/ip4/<4G-miner IP>/tcp/2345/http"

# 16G-miner: 修改 "~/.lotusminer-16gb/config.toml" 里面ListenAddress的IP
[API]
  ListenAddress = "/ip4/<16G-miner IP>/tcp/2355/http"
6.3 lotus和miner不在同一台机器需要复制两个文件,配置了FULLNODE_API_INFO不用复制。

将lotus机器的 ~/.lotus/api ~/.lotus/token 复制到lotus-miner机器 ~/.lotus/ 目录

6.3.1 4G-worker和4G-miner不在同一台机器需要复制两个文件,配置了MINER_API_INFO可以不用复制文件。

将4G-miner机器的 ~/.lotusminer-4gb/api ~/.lotusminer-4gb/token 复制到4G-worker机器 ~/.lotusminer-4gb/ 目录

6.3.2 16G-worker和16G-miner不在同一台机器需要复制两个文件,配置了MINER_API_INFO可以不用复制文件。

将16G-miner机器的 ~/.lotusminer-16gb/api ~/.lotusminer-16gb/token 复制到16G-worker机器 ~/.lotusminer-16gb/ 目录

6.4 根据实际需求启动lotus-worker
# 4G-worker: 参考以下命令,根据实际需求追加不同参数,启用4G-worker
  nohup lotus-worker --miner-repo=~/.lotusminer-4gb --worker-repo=~/.lotusworker-4gb run --listen=3456 [...] > miner-4gb.log 2>&1 &
  
# 16G-worker: 参考以下命令,根据实际需求追加不同参数,启用16G-worker
  nohup lotus-worker --miner-repo=~/.lotusminer-16gb --worker-repo=~/.lotusworker-16gb run --listen=3466 [...] > miner-16gb.log 2>&1 &
#: lotus-worker run -h
   --listen value                host address and port the worker api will listen on (default: "0.0.0.0:3456")
   --no-local-storage            don't use storageminer repo for sector storage (default: false)
   --no-swap                     don't use swap (default: false)
   --addpiece                    enable addpiece (default: true)
   --precommit1                  enable precommit1 (32G sectors: 1 core, 128GiB Memory) (default: true)
   --precommit2                  enable precommit2 (32G sectors: all cores, 96GiB Memory) (default: true)
   --commit                      enable commit (32G sectors: all cores or GPUs, 128GiB Memory + 64GiB swap) (default: true)
   --unseal                      enable unsealing (32G sectors: 1 core, 128GiB Memory) (default: true)
   --parallel-fetch-limit value  maximum fetch operations to run in parallel (default: 5)
   --precommit1max value         Allow the maximum number of simultaneous tasks for precommit1, default value: 0 (default: 0)
   --precommit2max value         Allow the maximum number of simultaneous tasks for precommit2, default value: 0 (default: 0)
   --commitmax value             Allow the maximum number of simultaneous tasks for commit2, default value: 0 (default: 0)
   --group value                 Worker grouping function, default value: all (default: "all")

目前不清退的交易所推荐:

1、全球第二大交易所OKEx欧意,邀请链接: https://www.ouyi.space/join/1837888  能交易XCH,BZZ,BTC,ETH等等安全交易,新用户能开合约。

2、老牌交易所比特儿现改名叫芝麻开门 :https://www.gate.tv/signup/649183能交易XCH,BZZ,BTC,ETH等等安全交易,新用户能开合约。

赞(0) 打赏
未经允许不得转载:我爱收益 » 如何参与Filecash挖矿,FIC币挖矿教程和方法

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏