├── LICENSE ├── README.md ├── scripts └── build-lotus.sh ├── miner-configuration-cn.md ├── lotus-cheat-sheet-v2.md ├── space-race-2-slingshot.md └── lotus_cheat_sheet-v1.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Bob Jiang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Filecoin 挖矿资源合集 2 | 3 | 这里汇集了Filecoin挖矿相关的一些资源和官方文档,如果你有其他资源推荐,欢迎[提交PR](https://github.com/bobjiang/awesome-filecoin-mining/pulls) 4 | 5 | 加入 `Telegram` [Filecoin中文讨论组](https://t.me/filecointop) 6 | 7 | # 目录 8 | 9 | - [新手入门](./lotus-cheat-sheet-v2.md) 10 | - [常见问题] 11 | - 太空竞赛 12 | - [官方文档] 13 | - [代码] 14 | - [浏览器] 15 | 16 | ## 新手入门 17 | 18 | - 新手入门请参考[新手入门必读第二版(中文)](./lotus-cheat-sheet-v2.md) 19 | - [Lotus参数大全](./miner-configuration-cn.md) 20 | 21 | 致谢: [j04nnada](https://filecoinproject.slack.com/archives/D01AV0THK7U) 提供的第一版[新手入门手册cheat sheet](./lotus_cheat_sheet-v1.md) 22 | 23 | ## 太空竞赛 24 | 25 | - [太空竞赛2 - 开发者参与 - Slingshot](./space-race-2-slingshot.md) 26 | - [太空竞赛Slack讨论组 - 活跃 **强烈推荐加入**](https://filecoinproject.slack.com/archives/C0179RNEMU4) 27 | - [太空竞赛水龙头 - 申请测试币FIL](https://spacerace.faucet.glif.io/) 28 | - [官方声明](https://filecoinproject.slack.com/archives/C019UFEACBT) 29 | - [浏览器](https://spacerace.filecoin.io/) 30 | 31 | ## 常见问题 32 | 33 | 常见问题,[请移步](https://github.com/bobjiang/awesome-filecoin-mining/issues) 34 | 35 | ## Lotus 官方文档 36 | 37 | - [Lotus文档](https://docs.lotu.sh/) 38 | - [Filecoin文档](https://docs.filecoin.io/) 39 | - [Filecoin【中文版】](https://filecoin.io/zh-cn/) 40 | - [SpaceRace 官方说明](https://spacerace.filecoin.io/) 41 | - [Filecoin开发者奖励计划](https://github.com/filecoin-project/devgrants) 42 | 43 | ## 代码下载地址 44 | 45 | - [Lotus](https://github.com/filecoin-project/lotus) 46 | - [Go-filecoin](https://github.com/filecoin-project/go-filecoin) 47 | - [Rust-fil-proof](https://github.com/filecoin-project/rust-fil-proofs) 48 | - [Rust-fil-nse-gpu](https://github.com/filecoin-project/rust-fil-nse-gpu) - NSE 新算法 49 | 50 | ## 浏览器 51 | 52 | - [官方浏览器 filscan](https://filscan.io/) 53 | - [Filscout](https://filscout.io/en/) 54 | - [1475ipfs](https://1475ipfs.com/#/blockBrowser) 55 | - [FilFox](https://calibration.filfox.io/) 56 | -------------------------------------------------------------------------------- /scripts/build-lotus.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 注意 filecoin-proof-parameters 文件大概有200多G,可以提前下载准备好,否则编译过程非常痛苦。 4 | LOTUS_HOME= 5 | 6 | export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" 7 | export FIL_PROOFS_PARAMETER_CACHE=//filecoin-proof-parameters 8 | 9 | date 10 | echo "Begin to build lotus." 11 | # prepare dependency 12 | sudo apt update -y 13 | sudo apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl 14 | sudo apt upgrade -y 15 | 16 | # install go > 1.14 17 | [ -z "$GOROOT" ] && GOROOT="$HOME/.go" 18 | 19 | if [ ! -d "$GOROOT" ]; then 20 | 21 | echo "Downloading go package" 22 | wget --quiet https://golang.google.cn/dl/go1.14.7.linux-amd64.tar.gz 23 | 24 | mkdir -p "$GOROOT" 25 | echo "extracting package" 26 | sudo tar -C /usr/local -xzf go1.14.7.linux-amd64.tar.gz 27 | export PATH=$PATH:/usr/local/go/bin 28 | 29 | # setup go proxy in China 30 | # https://github.com/goproxy/goproxy.cn/blob/master/README.zh-CN.md 31 | 32 | go env -w GO111MODULE=on 33 | go env -w GOPROXY=https://goproxy.cn,direct 34 | 35 | rm -f go1.14.7.linux-amd64.tar.gz 36 | 37 | fi 38 | 39 | # install Rust from https://www.rust-lang.org/tools/install 40 | [ -z "$RUSTROOT" ] && RUSTROOT="$HOME/.cargo" 41 | if [ ! -d "$RUSTROOT" ]; then 42 | 43 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y 44 | # setup rust source in China 45 | # 1. 进入当前用户的 .cargo 目录 cd ~/.cargo 46 | # 2. 新建名字叫 config 的文件 47 | # 3. 编辑 config 文件写入 48 | # [source.crates-io] 49 | # replace-with = 'tuna' 50 | # [source.tuna] 51 | # registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git" 52 | 53 | echo "[source.crates-io] 54 | replace-with = 'tuna' 55 | [source.tuna] 56 | registry = \"https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git\" 57 | " > ~/.cargo/config 58 | fi 59 | 60 | source ~/.profile 61 | 62 | cd $LOTUS_HOME 63 | # clone github repo 64 | git clone https://github.com/filecoin-project/lotus.git 65 | # current tag == v0.7.0 66 | # 注意:需要检查最新的版本,请检查github代码仓库 67 | # https://github.com/filecoin-project/lotus 68 | 69 | git checkout v0.7.0 70 | 71 | cd lotus 72 | # if use AMD cpu, build the Filecoin proofs natively 73 | 74 | env env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps all 75 | # if command 'go' is not found, try adding /usr/local/go/bin to secure_path in /etc/sudoers 76 | sudo make install 77 | 78 | date 79 | echo "End to build lotus." 80 | 81 | -------------------------------------------------------------------------------- /miner-configuration-cn.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Lotus Miner配置文件详解' 3 | description: '本文详细描述了lotus中的配置文件中的选项,以及每个选项的含义。' 4 | --- 5 | 6 | # Lotus Miner配置文件详解 7 | 8 | [英文原文](https://docs.filecoin.io/mine/lotus/miner-configuration/) 9 | 10 | 本文描述了 Lotus 配置文件,以及其中每个参数的具体含义。 11 | 12 | Lotus Miner 配置文件在矿工初始化后创建的,存储于 `~/.lotusminer/config.toml` or `$LOTUS_MINER_PATH/config.toml` 。 13 | 14 | 默认所有的选项都被注释掉了,因此需要自定义的话可以去掉每行前面的 `# ` 。 15 | 16 | ::: tip 17 | 配置文件的修改要生效的话,需要重启 miner 18 | ::: 19 | 20 | ## API section 21 | 22 | API部分描述了矿工的API设置: 23 | 24 | ```toml 25 | [API] 26 | # miner API 绑定地址 27 | ListenAddress = "/ip4/127.0.0.1/tcp/2345/http" 28 | # 这里是API地址的外部IP地址。 29 | RemoteListenAddress = "127.0.0.1:2345" 30 | # 网络超时的时间 31 | Timeout = "30s" 32 | ``` 33 | 34 | 默认API地址是绑定本地的 loopback 地址 (即127.0.0.1)。如果想要其他机器访问API,需要设置对外网络的IP地址,或者 `0.0.0.0` (代表所有网络接口). 注意API的访问被 JWT tokens保护,所以需要设置 token。 35 | 36 | 将 `RemoteListenAddress` 配置为另一个节点连接miner时要使用的此值。通常是miner的IP地址和API端口,但是具体取决于你的环境(比如代理,公共IP等)。 37 | 38 | ## Libp2p section 39 | 40 | 这部分配置miner内嵌的 libp2p 节点。这部分最重要的是配置miner的公共IP以及固定端口: 41 | 42 | ```toml 43 | # 绑定 libp2p主机的IP地址。0代表随机端口。 44 | [Libp2p] 45 | ListenAddresses = ["/ip4/0.0.0.0/tcp/0", "/ip6/::/tcp/0"] 46 | # 填写你想要其他节点连接的地址(你的节点IP地址) 47 | AnnounceAddresses = [] 48 | # 填写不想公开的节点地址。 49 | NoAnnounceAddresses = [] 50 | # 连接管理的设置,如果机器连接数太多,适当降低数字。 51 | ConnMgrLow = 150 52 | ConnMgrHigh = 180 53 | ConnMgrGrace = "20s" 54 | ``` 55 | 56 | 如果连接的数字超过 `ConnMgrHigh` 的定义,将减少当前的连接数直到达到设定的 `ConnMgrLow`。 最新的连接将被保持。 57 | 58 | ## Pubsub section 59 | 60 | 这部分设置Pubsub配置. Pubsub 用来分发网络中的消息: 61 | 62 | ```toml 63 | [Pubsub] 64 | # 通常不需要运行 bootstrapping 节点,因此设定为 false 65 | Bootstrapper = false 66 | # FIXME,待启用。 67 | RemoteTracer = "" 68 | ``` 69 | 70 | ## Dealmaking section 71 | 72 | 这部分设置 存储订单和检索订单的参数: 73 | 74 | ```toml 75 | [Dealmaking] 76 | # 启用时,miner可能接受在线(online)的订单 77 | ConsiderOnlineStorageDeals = true 78 | # 启用时,miner可能接受线下(offline)的订单 79 | ConsiderOfflineStorageDeals = true 80 | # 启用时,miner可能接受检索订单 81 | ConsiderOnlineRetrievalDeals = true 82 | # 启用时,miner可能接受线下的检索订单 83 | ConsiderOfflineRetrievalDeals = true 84 | # 创建订单时,拒绝的数据 CID 清单 85 | PieceCidBlocklist = [] 86 | # 一个扇区封装的时长 87 | ExpectedSealDuration = "12h0m0s" 88 | # 只接受特定条件的订单(订单过滤器,jq语法) 89 | Filter = "" 90 | ``` 91 | 92 | `ExpectedSealDuration` 是封装花费时间的估算值,开始时间早于期望封装完成时间时,用来拒绝订单。 93 | 94 | :::warning 95 | `ExpectedSealDuration` 最终值应该等于 `(TIME_TO_SEAL_A_SECTOR + WaitDealsDelay) * 1.5`. 该等式确保miner不会太早提交扇区。 96 | ::: 97 | 98 | 订单过滤器基于特定的参数,修改 `Filter` 参数. 该参数在处理订单时作为脚本命令执行。如果过滤器返回0则接受交易,否则将拒绝交易。设定 `Filter` 为 `false` 拒绝所有订单,设定为`true` 接受所有订单。例如下面的过滤只接受特定地址的客户端的交易: 99 | 100 | ```sh 101 | Filter = "jq -e '.Proposal.Client == \"t1nslxql4pck5pq7hddlzym3orxlx35wkepzjkm3i\" or .Proposal.Client == \"t1stghxhdp2w53dym2nz2jtbpk6ccd4l2lxgmezlq\" or .Proposal.Client == \"t1mcr5xkgv4jdl3rnz77outn6xbmygb55vdejgbfi\" or .Proposal.Client == \"t1qiqdbbmrdalbntnuapriirduvxu5ltsc5mhy7si\" '" 102 | ``` 103 | 104 | ## Sealing section 105 | 106 | 这部分设定扇区封装行为的参数: 107 | 108 | ```toml 109 | [Sealing] 110 | # 在任何给定时间开始封装之前,有多少扇区可以等待打包更多交易的上限。 111 | MaxWaitDealsSectors = 2 112 | # 同时封装扇区的上限值 (包含 pledges) 113 | MaxSealingSectors = 0 114 | # 同时封装扇区的上限值,但仅包含订单的扇区 (不包含pledge sectors) 115 | MaxSealingSectorsForDeals = 0 116 | # 开始封装前新创建的扇区等待订单的时间 117 | WaitDealsDelay = "1h0m0s" 118 | ``` 119 | 120 | ## Storage section 121 | 122 | 存储扇区设置miner执行特定的封装动作。取决于配置和封装worker的用途,需要修改某些选项。 123 | 124 | ```toml 125 | [Storage] 126 | # 同时获取扇区数据的扇区上限 127 | ParallelFetchLimit = 10 128 | # miner可以执行的封装步骤。通常会设置不同的worker进行指定的封装操作。 129 | AllowPreCommit1 = true 130 | AllowPreCommit2 = true 131 | AllowCommit = true 132 | AllowUnseal = true 133 | ``` 134 | 135 | ## Fees section 136 | 137 | 费用部分允许设定提交到链上不同消息的gas上限: 138 | 139 | ```toml 140 | [Fees] 141 | # 支付的最大费用 142 | MaxPreCommitGasFee = "0.05 FIL" 143 | MaxCommitGasFee = "0.05 FIL" 144 | # PoSt是一个高价值的操作,因此默认值较高。 145 | MaxWindowPoStGasFee = "50 FIL" 146 | ``` 147 | 148 | 取决于网络拥堵情况,交易的基本费用可能上涨或下跌。gas limits 必须大于包含消息的基本费用。基本费用很高时,会导致较大的费用,也会很快烧光你的钱。因此miner通常会自动提交消息,小心这个部分的设置。 149 | -------------------------------------------------------------------------------- /lotus-cheat-sheet-v2.md: -------------------------------------------------------------------------------- 1 | 本文主要包含以下内容: 2 | 3 | - 编译Lotus 4 | - 启动节点(lotus daemon) 5 | - 创建矿工钱包 6 | - 初始化矿工 7 | - 启动矿工 8 | 9 | # 编译过程,可以参考或直接下载 `build-lotus.sh` 10 | 11 | [build-lotus.sh](./scripts/build-lotus.sh) 12 | 13 | **install dependencies** 14 | ``` 15 | sudo apt update 16 | sudo apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl 17 | sudo apt upgrade -y 18 | ``` 19 | 如果你在中国,go 和 rust的安装需要设置代码,请参考如下配置 20 | 21 | **install Go from https://golang.org/doc/install** 22 | **download go-lang package** 23 | 24 | `sudo tar -C /usr/local -xzf go1.14.7.linux-amd64.tar.gz` 25 | 26 | https://github.com/goproxy/goproxy.cn/blob/master/README.zh-CN.md 27 | 28 | **install Rust from https://www.rust-lang.org/tools/install** 29 | `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -y | sh` 30 | 31 | **setup rust source in China** 32 | 33 | 1. 进入当前用户的 .cargo 目录 cd ~/.cargo 34 | 2. 新建名字叫 config 的文件 35 | 3. 编辑 config 文件写入 36 | ``` 37 | [source.crates-io] 38 | replace-with = 'tuna' 39 | [source.tuna] 40 | registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git" 41 | ``` 42 | 43 | **set environment variables** 44 | ``` 45 | export BELLMAN_CPU_UTILIZATION=0.9 46 | export FIL_PROOFS_MAXIMIZE_CACHING=1 47 | export FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1 48 | export FIL_PROOFS_USE_GPU_TREE_BUILDER=1 49 | ``` 50 | **append these export commands to ~/.bashrc to set them when starting a new shell session** 51 | 52 | **setup a 256GB swap file to avoid out-of-memory issues while mining if you only have 128GB RAM** 53 | ``` 54 | sudo fallocate -l 256G /swapfile 55 | sudo chmod 600 /swapfile 56 | sudo mkswap /swapfile 57 | sudo swapon /swapfile 58 | ``` 59 | **show current swap spaces and take note of the current highest priority** 60 | 61 | `swapon --show` 62 | 63 | **append the following line to /etc/fstab (ensure pri is set larger than the current highest level priority) and then reboot** 64 | 65 | `/swapfile swap swap pri=50 0 0` 66 | 67 | `sudo reboot` 68 | 69 | **check a 256GB swap file exists and it has the highest priority** 70 | 71 | `swapon --show` 72 | 73 | ## install or reinstall lotus 74 | 75 | **clone lotus from GitHub and checkout ntwk-calibration** 76 | ``` 77 | cd ~ && git clone https://github.com/filecoin-project/lotus.git && cd lotus 78 | git reset --hard && git fetch --all && git checkout ntwk-calibration 79 | ``` 80 | **set environment variables to build from source (without these lotus will still run but sealing will take considerably longer)** 81 | ``` 82 | export RUSTFLAGS="-C target-cpu=native -g" 83 | export RUST_LOG=info 84 | export FFI_BUILD_FROM_SOURCE=1 85 | ``` 86 | **make and install it** 87 | ``` 88 | make clean && make all 89 | sudo make install 90 | ``` 91 | # 启动节点(lotus daemon) 92 | 93 | 启动节点的命令如下: 94 | 95 | `lotus daemon` 96 | 97 | 该命令启动后,会自动开始同步区块链节点。根据当前区块链的高度,可能需要几个小时甚至几天时间来同步。一般上述命令会后台运行并捕获日志。可以用如下命令进行节点同步情况的检查: 98 | 99 | `lotus sync status` 100 | 101 | 还可以通过检查节点的链接情况来进一步诊断,如 102 | 103 | `lotus net peers | wc -l` 104 | 105 | 得到的结果为当前节点已经连接到的节点总数。 106 | 107 | # 创建矿工钱包 108 | 109 | Filecoin矿工钱包是用如下命令创建: 110 | 111 | `lotus wallet new bls` 112 | 113 | 你会得到一个t3开头的钱包地址: `t3wywhxlpg7itgym3zhchlxtcypec3p4rq7jejak5v3oayizsa7n7kvocmppwnrcca5c2z55tuclhqq3ugq7da` 114 | 115 | **注意:**请备份钱包私钥 - `lotus export t3wywhxlpg7itgym3zhchlxtcypec3p4rq7jejak5v3oayizsa7n7kvocmppwnrcca5c2z55tuclhqq3ugq7da` 116 | 117 | 得到钱包地址后,可以去水龙头(当前是测试网络,主网时需要自行购买FIL)申请测试FIL。[Space Race水龙头](https://spacerace.faucet.glif.io/) 118 | 119 | # 初始化矿工 120 | 121 | **注意:**之前编译过程已经下载的 proof 参数文件,记得存放在一个可靠的路径,在初始化和启动矿工都会用到该文件。 122 | 123 | 设置如下的参数 124 | 125 | ``` 126 | # 如果你在中国,需要设置下面第一个 gateway 参数 127 | export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" 128 | export FIL_PROOFS_PARAMETER_CACHE=/home/test/storage/filecoin-proof-parameters 129 | ``` 130 | 131 | 设置好变量后,可以初始化矿工,大概需要5分钟左右。owner就是上面刚刚生成的钱包地址。 132 | 133 | `lotus-miner init --no-local-storage --owner=$T3_ADDRESS --sector-size=32GiB` 134 | 135 | # 启动矿工 136 | 137 | 矿工初始化完成后,可以通过浏览器来查看对应的矿工ID。如在浏览器中输入钱包地址就可以查看到。 138 | 139 | 接下来就可以启动矿工啦 140 | 141 | `nohup lotus-miner run > ~/lotus-miner.log 2>&1 &` 142 | 143 | 启动完成后,有一些常用命令来进行检查。 144 | 如: 145 | `lotus-miner info` 146 | 147 | ``` 148 | Miner: t015685 149 | Sector Size: 32 GiB 150 | Byte Power: 0 B / 8.5 PiB (0.0000%) 151 | Actual Power: 0 / 8.92 Pi (0.0000%) 152 | Committed: 0 B 153 | Proving: 0 B 154 | Below minimum power threshold, no blocks will be won 155 | Deals: 0, 0 B 156 | Active: 0, 0 B (Verified: 0, 0 B) 157 | 158 | Miner Balance: 0 FIL 159 | PreCommit: 0 FIL 160 | Pledge: 0 FIL 161 | Locked: 0 FIL 162 | Available: 0 FIL 163 | Worker Balance: 99.99999896838888492 FIL 164 | Market (Escrow): 0 FIL 165 | Market (Locked): 0 FIL 166 | 167 | Expected Seal Duration: 12h0m0s 168 | 169 | Sectors: 170 | Total: 0 171 | ``` 172 | 173 | # 下一步 174 | 175 | 接下来还有很长的路要走,比如配置文件、集群搭建和配置、错误诊断和排查。 176 | 欢迎大家来一起贡献。 177 | -------------------------------------------------------------------------------- /space-race-2-slingshot.md: -------------------------------------------------------------------------------- 1 | 太空竞赛2:弹弓(Slingshot) - 针对开发者的 Filecoin 竞赛 2 | ---------- 3 | 4 | [英文原文链接](https://filecoin.io/blog/announcing-sr2-slingshot/) 5 | 6 | ![宣布太空竞赛2:弹弓](https://filecoin.io/vintage/images/blog/slingshot-header.jpg) 7 | 8 | 祝贺所有参加太空竞赛1(简称SR1)的人!这真是一个令人震惊的事件,并且是Filecoin挖矿社区的广度、深度和承诺的真实证明。您可以在[此博客文章中阅读有关SR1](https://filecoin.io/blog/space-race-2/)和[Space Race 2(SR2)轨道燃烧的更多信息](https://filecoin.io/blog/space-race-2/)。 9 | 10 | SR2是具有两个赛道的比赛: 11 | 12 | 1. **track 1:SR2-轨道燃烧。** 让存储矿工继续测试并扩大网络规模的轨道。这将在太空竞赛1停止的地方继续进行。 13 | 2. **track 2:SR2-弹弓。** Filecoin客户端,应用程序开发人员和工具开发人员将其产品部署到测试网的跟踪。这条路线将鼓励客户和矿工进行存储和检索交易,并帮助Filecoin存储用户准备主网。 14 | 15 | 此博客文章重点介绍SR2弹弓!如果您是矿工,并且想参加SR2 Orbital Burn,请阅读[此博客文章](https://filecoin.io/blog/space-race-2/)。SR2 Slingshot仅适用于存储客户端和开发人员。 16 | 17 | 什么是SR2弹弓 Slingshot? 18 | ========= 19 | 20 | 我们非常高兴地宣布太空竞赛2:弹弓(Slingshot)!SR1专注于矿工,而Filecoin网络是一个多维网络,具有许多关键的利益相关者和受众。我们准备并激动地邀请存储客户端,应用程序开发人员,工具提供商以及为网络做出贡献的许多其他社区成员! 21 | 22 | SR2 Slingshot是面向**存储客户和开发人员**的社区竞赛,它奖励将真实、有价值和可用数据存储到Filecoin Space Race网络(testnet)上。奖励很高:在活动过程中,符合条件的参赛者将争夺高达500,000 FIL的奖金。您在Filecoin网络上拥有的真实、有价值和有用的数据越多,您赚到的FIL就越多! 23 | 24 | 借助SR2弹弓,我们希望实现以下目标: 25 | 26 | - **最大化在Filecoin网络上存储真实数据的有价值的应用程序的数量。**我们希望在Filecoin网络上实时看到您的产品或应用程序。如果您要在Filecoin,IPFS或Textile堆栈上构建应用程序,或者想要构建新的东西,我们鼓励您参加比赛! 27 | - **将真实数据传输到Filecoin网络,并确保可发现,可检索和可用。**我们希望看到您将真实数据带入Filecoin网络。但是挑战不只是将大数据量加载到Filecoin上。还要确保您的应用程序和其他应用程序可以发现,检索和使用数据。请注意,由于许多SR2存储扇区将保留在主网上,因此Slingshot也是一个很好的机会,可确保在主网启动时将数据存储在Filecoin网络中。 28 | - **加强Filecoin存储客户端和开发人员社区。**我们希望为存储客户和开发人员社区创建一个活动,以联系并实现雄心勃勃的目标。我们将竭尽所能,确保您的团队成功地将真实数据和有用的应用程序带入Filecoin网络。 29 | 30 | 该比赛的**第1阶段**于2020年9月23日开始,于2020年10月14日结束。请继续阅读以了解有关如何参与的更多详细信息! 31 | 32 | 如何参加比赛 33 | ======= 34 | 35 | 要参加Slingshot竞赛,您必须将真实,有价值和可用的数据存储到Filecoin网络。您还必须构建以有意义的方式使用该数据的应用程序或UI(无论是直接从Filecoin读取数据还是从其他位置存储的数据缓存(例如IPFS)读取数据)。有很多方法可以将数据存储到Filecoin并构建这些应用程序和UI。您可以在下面的开发人员指南部分中了解有关这些路径的更多信息。 36 | 37 | 所谓"真实,有价值和可用的数据",是指: 38 | 39 | 1. **应用程序数据。**您可以构建面向最终用户的应用程序,以将应用程序和用户数据存储到Filecoin。应用程序UI能够根据需要检索相关数据。 40 | 2. **数据收集。**您可以从Slingshot管理员团队维护的精选数据收集列表中存储数据,并创建一个附带的UI以使用或访问此数据。 41 | 42 | 弹弓比赛的主要渠道是: 43 | 44 | - **Slingshot网站和页首横幅:** [https://slingshot.filecoin.io](https://slingshot.filecoin.io/) 该网站是整个弹弓比赛的真实来源。它包括有关一般比赛目的,规则,事件和程序,注册表和排行榜的信息。排行榜根据弹弓参与者的共同努力来维持奖励池的总规模。它还提供了参与者列表,他们的资格状态和潜在的奖励。 45 | - **代码仓库:** [https://github.com/filecoin-project/slingshot](https://github.com/filecoin-project/slingshot)。您可以在此仓库中提交PR,以在Slingshot排行榜中包含您的项目详细信息。社区审核者将直接在提交的PR中留下反馈。Slingshot管理团队还在此仓库中维护了[精选的数据集列表](https://github.com/filecoin-project/slingshot/blob/master/datasets.md)。 46 | - **Slack:**我们在[Filecoin Project Slack工作空间](https://filecoin.io/slack)中使用以下Slack通道来提供Slingshot公告并帮助调试任何问题。如果您参加比赛,请确保您已加入以下渠道: 47 | - **#fil-testnet-announce** --有关testnet和主要软件版本的重要公告 48 | - **#slingshot-announcements** --有关Slingshot计划的主要公告 49 | - **#slingshot** --在整个比赛过程中用于调试帮助和社区对话 50 | 51 | 要报名参加比赛并有资格获得奖励,请完成以下步骤: 52 | 53 | 1. **Slack:**加入[Filecoin Project Slack工作空间](https://filecoin.io/slack)和以下渠道: 54 | - #fil-testnet-announce 55 | - #slingshot-announce 56 | - #slingshot 57 | 2. **开始您的项目:**确定要存储到Filecoin的数据,要与该数据交互的应用程序或UI以及要使用的技术堆栈(有关更多信息,请参见"开发人员指南"部分) 。成功完成对Filecoin网络的第一个存储交易后,用于进行存储交易的Filecoin地址将自动显示在页首横幅上。但是,您的项目尚无法获得奖励。 58 | 3. **注册:** 完成两个注册步骤: 59 | - 在[https://slingshot.filecoin.io/register上](https://slingshot.filecoin.io/register)提交包含您的团队信息的注册表。 60 | - 将PR提交到[filecoin-project/slingshot](https://github.com/filecoin-project/slingshot) GitHub存储库,其中包含有关您的项目,应用程序/ UI URL等的信息。回购包含模板和提交说明。 61 | 4. **通过社区审核:** Slingshot社区审核人员团队将在[filecoin-project / slingshot](https://github.com/filecoin-project/slingshot) GitHub存储库中审核您的项目详细信息,以确保您有资格参加比赛。他们将在您的PR中为您的团队提供反馈。如果您的申请被接受,审核团队将合并PR,仅使用您的项目信息更新排行榜(不提供个人信息),并将您的项目在页首横幅上标记为"已审核"。如果您的申请没有被立即接受,审核团队将要求您提供更多信息,您可以通过更新PR来提供这些信息。 62 | 5. **遵守比赛规则:**如果您已经完成了前面的步骤,并且在整个比赛中都遵循比赛规则,您将有资格获得奖励。这些规则由Slingshot排行榜软件自动检查,或者在某些情况下由Slingshot社区审阅者手动检查。如果您有资格获得奖励,则排行榜会将您的项目标记为"合格"。请注意,如果合格的项目长期不遵守比赛规则,则有资格在整个比赛中获得奖励。 63 | 64 | 参赛者应期望在整个比赛过程中改进其应用程序/用户界面并增加Filecoin上的数据存储。在整个比赛中,弹弓排行榜将成为真理的源泉,因此请密切注意此排行榜,以确保您的项目在该处得到正确的表示。 65 | 66 | 比赛规则 67 | ==== 68 | 69 | 1. **排行榜列表:** 70 | - 要显示在Slingshot排行榜上,您必须向Filecoin网络至少提交1笔成功交易。 71 | - 要在排行榜上列为"已审核",您必须在Slingshot网站上提交注册表格,将PR提交到[filecoin-project / slingshot](https://github.com/filecoin-project/slingshot) GitHub存储库,并通过社区审核。 72 | - 注意:出现在排行榜上并不会自动使您有资格获得奖励。 73 | 2. **奖励资格:**为了有资格获得任何弹弓奖励,并在排行榜上列为"合格",您必须满足以下要求。这些要求由Slingshot排行榜自动检查,或者由社区审核团队在整个比赛过程中手动检查。 74 | - 您必须将真实,有价值和可用的数据存储到Filecoin网络。这可以是应用程序数据或数据集合(来自Slingshot团队[在此处](https://github.com/filecoin-project/slingshot/blob/master/datasets.md)维护的列表)。 75 | - 您必须构建以有意义的方式使用数据的应用程序或UI。您必须在比赛中提交此应用程序或用户界面,并且该应用程序或用户界面需要正常工作。 76 | - 您的项目必须通过社区审查,以确认您的项目合法。如果曾经审查过的团队未能持续遵守比赛规则,则可能在整个比赛过程中丧失参赛资格。 77 | - 您必须与SR2网络上的至少3个矿工进行存储交易。 78 | - 您必须存储每个CID,以便可以从Filecoin网络中检索到它。在整个比赛过程中,我们将定期测试CID检索。 79 | - 您必须参加弹弓展示。 80 | 3. **展示:**我们正在组织一个Slingshot展示,以强调所有Slingshot参与者在比赛过程中所做的工作。 81 | - 排行榜上前100名合格参与者中的每位参与者都将为Slingshot Showcase录制其项目的演示文稿。 82 | - 此外,还将邀请排行榜上的前10名合格参与者在现场Showcase活动中对他们的项目进行现场演示。 83 | - 我们将在比赛的第2周结束时发布这些Showcase演示和演示的特定标准。 84 | 4. **取消资格:**如果您不具备获得奖励的资格,违反比赛规则或被发现以任何方式参与比赛,则您的团队有可能在比赛的任何时候被取消资格。您不得窃其他项目。排行榜的结果要到比赛结束后不久才能真正得出最终结果。Slingshot管理团队将汇总排行榜和社区审核者的所有数据,以确定比赛结束时的最终资格以及最终比赛的获胜者。 85 | 5. 我们保留根据需要更改比赛规则的权利,以确保健康的比赛动态。 86 | 87 | 社区评论 88 | ==== 89 | 90 | Slingshot社区审稿人是Filecoin社区的成员,他们已经证明自己对Filecoin网络的长期健康状况进行了深入投资。社区审阅者来自不同的利益相关者社区-一些存储矿工,一些开发人员工具构建人员,一些应用程序开发人员等等。我们完成了社区审查团队的定稿后,将在Slingshot网站上发布! 91 | 92 | 弹弓社区审核者将在多个方面审核提交的PR。他们将审查的一些标准包括: 93 | 94 | - 该项目是否遵循[Filecoin项目行为准则](https://github.com/filecoin-project/community/blob/master/CODE_OF_CONDUCT.md)? 95 | - 该项目是否存储真实且可用的数据? 96 | - 项目如何计划数据的结构和存储?数据大小和数据集详细信息是什么? 97 | - 该项目看起来可以实现吗? 98 | - 应用程序/ UI计划有意义吗? 99 | 100 | 如果您的项目被接受,审阅者将合并您的PR,使用您的项目信息更新排行榜,并将您的项目标记为"已审阅"。如果您的项目没有被立即接受,审阅者将在PR中提供他们希望重新考虑的修订反馈。 101 | 102 | 奖赏 103 | == 104 | 105 | SR2 Slingshot建立在SR1的协作和竞争动态基础上。弹弓在所有参与者之间分配奖池。奖池的大小由网络上存储的数据总量决定。奖池根据参与者的项目或应用程序在网络上存储的数据量按比例分配给参与者。 106 | 107 | 弹弓将分为两个阶段: 108 | 109 | - **阶段1:**。竞赛的初始阶段将于2020年9月23日开始。该阶段的目标是将第一个真实数据的PiB加载到Filecoin网络上! 110 | - **阶段2:**第二阶段将在阶段1完成后开始。该阶段的目标是将FilePiin网络上的数据从1PiB扩展到10PiB。在阶段1完成后,我们将确定阶段2的确切时间。 111 | - 我们可能会根据比赛的节奏增加奖池或根据需要调整阶段! 112 | 113 | 当前奖励奖池: 114 | 115 | | **总数据大小** | **奖励池(FIL)的大小** | 116 | | 阶段1: | -- | 117 | | 10TiB | 10,000 | 118 | | 100TiB | 20,000 | 119 | | 500TiB | 50,000 | 120 | | 1PiB | 100,000 | 121 | | 阶段2: | -- | 122 | | 5PiB | 250,000 | 123 | | 10PiB | 500,000 | 124 | 125 | 举个例子,演示在比赛结束时如何分配奖励。 126 | 127 | - 比赛共有四名参与者: 128 | - A存储5TiB数据,通过了社区审查阶段,并在排行榜上列为"合格"。 129 | - B存储5.5TiB的应用程序数据,通过了社区审查阶段,并在排行榜上列为"合格"。 130 | - C存储5TiB的应用程序数据,但未通过社区审查阶段,并且在排行榜上没有被审查或不合格。 131 | - D存储了0.5TiB的数据并通过了社区审查。但是,D将所有数据存储在网络中长达6个月,因此未满足所有奖励资格要求。D在排行榜上被列为已审核,但不合格。 132 | - 在这种情况下,C和D不符合在弹弓比赛中获得奖励的资格。这是因为C没有通过社区审核阶段,而D仅将其数据存储了6个月,而不是1年。因此,只有A和B的存储才计入竞争奖励。 133 | - 在A和B之间,集合存储为合格存储的5 + 5.5 = 10.5TiB。这将解锁最低级别的10,000 FIL奖励池。 134 | - 由于A和B是唯一合格的获胜者,因此他们将奖励池按比例分配给他们: 135 | - 总数据大小= 5 + 5.5 TiB = 10.5 TiB 136 | - 奖励池中A的部分=(5 / 10.5)* 10,000 FIL =〜4,762 FIL 137 | - B的奖励池部分=(5.5 / 10.5)* 10,000 FIL =〜5,238 FIL 138 | - C和D都没有资格获得奖励,并且获得0 FIL。 139 | 140 | 注意:从主网启动以来,所获得的任何奖励将在六个月内线性分配。此外,虽然我们并不期望如此,但在协议实验室或Filecoin基金会全权酌情决定法律或法规问题阻止任何部分奖励交付的情况下,奖励可能会被重组,推迟或取消。 141 | 142 | 开发人员指南 143 | ====== 144 | 145 | 有很多方法可以将数据存储到Filecoin网络并在此数据之上构建应用程序/ UI。开发人员最受欢迎的技术栈有: 146 | 147 | - **Powergate。**Powergate是基于Filecoin和IPFS构建的多层文件存储API,并且是Filecoin数据的索引生成器。它被设计为模块化和可扩展的。您可以使用Powergate将数据存储到IPFS和Filecoin,Powergate将从可用数据的最热存储层(可能是本地缓存,IPFS或最后是Filecoin)检索CID。运行Powergate需要管理您自己的IPFS和Filecoin Lotus节点。 148 | - **纺织中心。**纺织中心是开始构建和试验纺织技术的最快方法。它为托管的存储桶和线程提供了持久的IFPS端点。它包括个人和组织的开发人员帐户以及将API密钥集成到应用程序中。如果您选择对应用程序使用带有托管存储桶的Textile Hub,则只需一个命令即可将整个存储桶存档到Filecoin网络。 149 | - **托管Powergate。**托管Powergate提供与Powergate相同的功能,但是基础结构由Textile团队管理。无需管理您自己的IPFS和Filecoin Lotus节点,Textile可以为您管理这些节点,而您的团队保留对托管实例的完全控制权和完全访问权。 150 | - **莲花。**Lotus是Filecoin协议实现的参考。直接在Lotus上构建应用程序是开发人员可以使用的最裸机选择。它需要管理您自己的节点以及Filecoin上存储交易建议和管理的复杂性。 151 | 152 | 在Filecoin网络上没有唯一正确的方法来存储数据或构建应用程序/ UI。但是,我们为开发人员推荐以下内容: 153 | 154 | - 我们不建议主要对Filecoin的数据存储和检索功能感兴趣的开发人员直接在Lotus之上构建。这是因为Lotus功能是相当低级的,并且开发人员可以使用更容易的产品。此外,仅Lotus节点无法直接从IPFS网络检索数据。由于Filecoin的检索性能明显比IPFS慢,因此通常用作备份存储解决方案。如果开发人员直接将Lotus节点用于存储和检索,则将大大限制应用程序/ UI的用例。 155 | - 希望存储数据并快速检索数据的开发人员应使用Powergate,托管Powergate或Textile Hub。如果要存储到Filecoin的数据已经在IPFS上,则尤其如此。这些解决方案使您可以将数据备份到Filecoin提供的较冷存储,并从IPFS等较热的存储层检索数据。 156 | - 与直接使用Lotus相比,想要存储数据的开发人员(不依赖于检索速度)仍应使用Powergate,Hosted Powergate或Textile Hub以获得更好的开发人员体验。但是,您可以选择不将数据固定到IPFS,从而节省了存储和带宽成本。 157 | - 正在开发开发人员工具和产品(例如链浏览器)的开发人员应直接在Lotus之上构建。 158 | 159 | 如果您对应用于应用程序的技术堆栈或如何设置有任何疑问,请随时通过Slack或通过电子邮件询问! 160 | 161 | 谢谢 162 | == 163 | 164 | 我们真的很高兴能够启动SR2 Slingshot,并扩展构建的应用程序以及在人类最大的分散式存储网络上存储的真实数据量。感谢存储客户端,开发人员和采矿社区使这个网络变得很棒!在此特别感谢我们的社区审核员,使我们能够为Filecoin网络和生态系统运行像Slingshot这样的程序。 -------------------------------------------------------------------------------- /lotus_cheat_sheet-v1.md: -------------------------------------------------------------------------------- 1 | # install dependencies 2 | sudo apt update 3 | sudo apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl 4 | sudo apt upgrade -y 5 | # install Go from https://golang.org/doc/install 6 | # install Rust from https://www.rust-lang.org/tools/install 7 | 8 | # set environment variables 9 | export BELLMAN_CPU_UTILIZATION=0.875 10 | export FIL_PROOFS_MAXIMIZE_CACHING=1 11 | export FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1 12 | export FIL_PROOFS_USE_GPU_TREE_BUILDER=1 13 | # append these export commands to ~/.bashrc to set them when starting a new shell session 14 | 15 | # setup a 256GB swap file to avoid out-of-memory issues while mining if you only have 128GB RAM 16 | sudo fallocate -l 256G /swapfile 17 | sudo chmod 600 /swapfile 18 | sudo mkswap /swapfile 19 | sudo swapon /swapfile 20 | # show current swap spaces and take note of the current highest priority 21 | swapon --show 22 | # append the following line to /etc/fstab (ensure pri is set larger than the current highest level priority) and then reboot 23 | # /swapfile swap swap pri=50 0 0 24 | sudo reboot 25 | # check a 256GB swap file exists and it has the highest priority 26 | swapon --show 27 | 28 | # install or reinstall lotus 29 | sudo rm -rf ~/lotus ~/.lotus ~/.lotusminer /usr/local/bin/lotus* 30 | # (optional) remove proof parameters (these files are very large and will take a long time to redownload) 31 | sudo rm -rf /var/tmp/filecoin-proof-parameters 32 | # clone lotus from GitHub and checkout ntwk-calibration 33 | cd ~ && git clone https://github.com/filecoin-project/lotus.git && cd lotus 34 | git reset --hard && git fetch --all && git checkout ntwk-calibration 35 | # set environment variables to build from source (without these lotus will still run but sealing will take considerably longer) 36 | export RUSTFLAGS="-C target-cpu=native -g" 37 | export RUST_LOG=info 38 | export FFI_BUILD_FROM_SOURCE=1 39 | # make and install it 40 | make all && sudo make install 41 | # if command 'go' is not found, try adding /usr/local/go/bin to secure_path in /etc/sudoers 42 | # you should see lots of rust related downloads, if not you're probably not building it from source 43 | 44 | # start lotus daemon and connect to the lotus network 45 | # see https://filscan.io/ for graphs, maps, and the current status of the network and miners 46 | # check the open file limit and ensure it is set to at least 10000000 47 | # consider adding ulimit -n 10000000 to ~/.bashrc to set it at the start of each bash session 48 | ulimit -n 49 | ulimit -n 10000000 50 | # start lotus daemon in the background 51 | lotus daemon > ~/lotus.log 2>&1 & 52 | # wait for the chain to sync (this can take minutes, hours or even days depending on the height of the chain) 53 | lotus sync wait 54 | # check that the number of connected peers is at least 1 55 | lotus net peers | wc -l 56 | # update Libp2p ListenAddresses and Libp2p AnnounceAddresses in ~/.lotus/config.toml to the following: 57 | # ListenAddresses = ["/ip4/0.0.0.0/tcp/24001"] 58 | # AnnounceAddresses = ["/ip4//tcp/24001"] 59 | # assign a static IP address to your machine on your local network 60 | # log in to your home router and forward port 24001 to the previously assigned static IP address 61 | # restart the daemon in the background so it continues running after closing the terminal 62 | lotus daemon stop 63 | nohup lotus daemon > ~/lotus.log 2>&1 & 64 | 65 | # create a new bls wallet and miner 66 | T3_ADDRESS=$(lotus wallet new bls) && echo $T3_ADDRESS 67 | # assign funds to the t3 address using https://faucet.calibration.fildev.network 68 | # see https://filecoin.io/blog/welcome-to-space-race/#participating-in-space-race for conditions on using the faucet 69 | # initialize the miner (this will download and verify the ~108GB v28 proof parameters to /var/tmp/filecoin-proof-parameters) 70 | lotus-miner init --no-local-storage --owner=$T3_ADDRESS --sector-size=32GiB 71 | # update Libp2p ListenAddresses and Libp2p AnnounceAddresses in ~/.lotusminer/config.toml to the following: 72 | # ListenAddresses = ["/ip4/0.0.0.0/tcp/24002"] 73 | # AnnounceAddresses = ["/ip4//tcp/24002"] 74 | # log in to your home router and forward port 24002 in the same way as was done for the lotus daemon 75 | # start lotus-miner in the background, wait until it is ready (this can take a few minutes), and print the wallet balance 76 | nohup lotus-miner run > ~/lotus-miner.log 2>&1 & 77 | watch -n 5 lotus-miner info 78 | lotus wallet balance $T3_ADDRESS 79 | 80 | # check you are publically dialable 81 | PUBLIC_IP=$(curl ifconfig.me) && echo $PUBLIC_IP 82 | ping $PUBLIC_IP 83 | telnet $PUBLIC_IP 24001 84 | telnet $PUBLIC_IP 24002 85 | lotus net reachability 86 | # use https://www.yougetsignal.com/tools/open-ports/ to check ports 24001 and 24002 are open 87 | 88 | # configure your miner 89 | # check the listening address of your miner and set the on-chain record of it 90 | LISTEN_ADDRESS=$(lotus-miner net listen) && echo $LISTEN_ADDRESS 91 | lotus-miner actor set-addrs $LISTEN_ADDRESS 92 | # set MaxSealingSectors in ~/.lotusminer/config.toml to the number of concurrent seal workers you want to run 93 | # set storage locations for sealing storage (e.g., a fast SSD) and long term storage (e.g., a slow HDD) 94 | # for seal I use ~/.lotusminer and store I use /media///filecoin 95 | lotus-miner storage attach --init --seal 96 | lotus-miner storage attach --init --store 97 | lotus-miner storage list 98 | # check that the funds for sending the set-addrs message have been deducted from your wallet (this may take about 30 seconds) 99 | watch -n 5 lotus wallet balance $T3_ADDRESS 100 | 101 | # start sealing a sector 102 | # pledge storage by packing random data to demonstrate capability of storing data without having to wait for deals 103 | lotus-miner sectors pledge 104 | # check the sealing job has started 105 | lotus-miner sealing jobs 106 | # check that a 32GiB (34.4GB) file has been created in /unsealed 107 | # check sealing workers show 1 core in use 108 | lotus-miner sealing workers 109 | # wait for the sector to be created and show "0: PreCommit1 sSet: NO active: NO tktH: 0 seedH: 0 deals: [0]" (this will take a few minutes) 110 | watch -n 5 lotus-miner sectors list 111 | # check the sector file has been copied to /sealed 112 | # wait for the sector to be sealed and show "0: Proving sSet: YES active: YES tktH: xxxx seedH: yyyy deals: [0]" (this will take several hours) 113 | # view to log to determine how long the sealing process took on your machine 114 | lotus-miner sectors status --log 0 115 | # set ExpectedSealDuration accordingly (see configuring deal criteria below) 116 | # after sealing is complete, mark the pledged sector for upgrade so it can start accepting deals (including those from the bot) 117 | lotus-miner sectors mark-for-upgrade 0 118 | # within 24 hours, active should change from YES to NO and will be visible on the dashboard 119 | # there is a known bug where mark-for-upgrade sometimes gets ignored 120 | # if more than 24 hours has passed consider calling mark-for-upgrade again, doing so will have no adverse effects 121 | # check the sector file has been copied to /sealed 122 | 123 | # monitor sectors as they progress through each stage 124 | # install and run htop to monitor CPU and memory usage 125 | sudo apt install htop 126 | htop 127 | # in a separate terminal watch the lotusminer log for entries of the form "INFO storage_proofs_porep::stacked::vanilla::proof > generating layer" 128 | watch tail -n 24 ~/lotus-miner.log 129 | # TODO how many layers to expect? 130 | # in a third terminal watch the status of the sector 131 | watch -n 5 lotus-miner sectors status --log --on-chain-info 0 132 | # the following log entries are what I observed my machine (Ryzen 9 3900X @ 3.8GHz, RTX 2080 Super, 128GB DDR4 RAM @ 3000MHz) 133 | # ignore log entries 2 and 3, I restarted my machine due to an error unrelated to lotus 134 | # PreCommit1 started at 01:49:28 so took 4h50 and used 1 CPU @ 100% 135 | # TODO: perance when running 2 PC1 in parallel ? set MaxSealingSectors = 2 136 | # the total sealing duration was 8h20 137 | # -------- 138 | # Event Log: 139 | # 0. 2020-08-20 22:40:47 +0000 UTC: [event;sealing.SectorStartCC] {"User":{"ID":0,"SectorType":3,"Pieces":[{"Piece":{"Size":34359738368,"PieceCID":{"/":"ba..."}},"DealInfo":null}]}} 140 | # 1. 2020-08-20 22:40:47 +0000 UTC: [event;sealing.SectorPacked] {"User":{"FillerPieces":null}} 141 | # 2. 2020-08-21 01:32:25 +0000 UTC: [event;sealing.SectorRestart] {"User":{}} 142 | # 3. 2020-08-21 01:49:28 +0000 UTC: [event;sealing.SectorRestart] {"User":{}} 143 | # 4. 2020-08-21 06:31:48 +0000 UTC: [event;sealing.SectorPreCommit1] {"User":{"PreCommit1Out":"ey...","TicketValue":"H3...","TicketEpoch":2234}} 144 | # 5. 2020-08-21 07:04:18 +0000 UTC: [event;sealing.SectorPreCommit2] {"User":{"Sealed":{"/":"ba..."},"Unsealed":{"/":"ba..."}}} 145 | # 6. 2020-08-21 07:04:18 +0000 UTC: [event;sealing.SectorPreCommitted] {"User":{"Message":{"/":"ba..."},"PreCommitDeposit":"1761729940027002722","PreCommitInfo":{"SealProof":3,"SectorNumber":0,"SealedCID":{"/":"ba..."},"SealRandEpoch":2234,"DealIDs":[],"Expiration":1557523,"ReplaceCapacity":false,"ReplaceSectorDeadline":0,"ReplaceSectorPartition":0,"ReplaceSectorNumber":0}}} 146 | # 7. 2020-08-21 07:07:30 +0000 UTC: [event;sealing.SectorPreCommitLanded] {"User":{"TipSet":"AX..."}} 147 | # 8. 2020-08-21 08:22:30 +0000 UTC: [event;sealing.SectorSeedReady] {"User":{"SeedValue":"di...","SeedEpoch":3915}} 148 | # 9. 2020-08-21 10:06:56 +0000 UTC: [event;sealing.SectorCommitted] {"User":{"Message":{"/":"ba..."},"Proof":"md..."}} 149 | # 10. 2020-08-21 10:10:30 +0000 UTC: [event;sealing.SectorProving] {"User":{}} 150 | # 11. 2020-08-21 10:11:48 +0000 UTC: [event;sealing.SectorFinalized] {"User":{}} 151 | 152 | # check proving 153 | # a snark proof needs to be computed every 30 minutes and requires a high-end GPU or CPU 154 | # use the following to monitor proof status and faults 155 | lotus-miner proving info 156 | lotus-miner proving deadlines 157 | lotus-miner proving faults 158 | 159 | # test your miner by making a storage and retrieval deal 160 | # there are effectively two modes of retrieval (although at first only mode #1 will be used) 161 | # 1. hot storage: store two copies of the data with one sealed copy being used for generating storage proofs and the other original copy for fast retrieval 162 | # 2. cold storage: only store the sealed copy and require it to be unsealed first (a computational and time intensive task) 163 | T0_ADDRESS=$(lotus-miner info | head -n 1 | cut -c 8-) && echo $T0_ADDRESS 164 | lotus state miner-info $T0_ADDRESS 165 | # create a new t1 address, add funds to it from the t3 address, and wait for the transaction to complete (this will take about a minute) 166 | T1_ADDRESS=$(lotus wallet new) && echo $T1_ADDRESS 167 | lotus send $T1_ADDRESS 20 168 | watch -n 5 lotus wallet balance $T1_ADDRESS 169 | # add a local file and copy the data CID 170 | echo -e "Filecoin is a decentralized storage market - think of it like Airbnb for cloud storage - where anybody with extra hard drive space can sell it on the network.\n- Juan Benet" > ~/test_file_original.txt 171 | lotus client import ~/test_file_original.txt 172 | DATA_CID= 173 | # attempt to find the file it on the network (this should say LOCAL) 174 | lotus client find $DATA_CID 175 | # query your miner and make a deal at the default price and minimum duration 176 | lotus client query-ask $T0_ADDRESS 177 | DEAL_CID=$(lotus client deal $DATA_CID $T0_ADDRESS 0.0000000005 518400) && echo $DEAL_CID 178 | lotus client list-deals 179 | lotus client get-deal $DEAL_CID 180 | # wait for the sector to be created 181 | watch -n 5 lotus-miner sectors list 182 | # check that a 32GiB (34.4GB) file has been created in /unsealed 183 | # (optional) manually start sealing the sector to avoid waiting for the default seal delay 184 | lotus-miner sectors seal 185 | # start retrieving data from the storage miner 186 | lotus client retrieve $DATA_CID ~/test_file_retrieved.txt 187 | # view the status of the retrieval deal and wait for it to complete 188 | watch -n 5 lotus-miner retrieval-deals list 189 | # 190 | cat ~/test_file_retrieved.txt 191 | # check miner info and move storage payments made to into 192 | lotus-miner info 193 | lotus-miner actor withdraw 194 | 195 | # configuring deal criteria 196 | # deals are automatically managed by the lotus-miner 197 | # to configure the criteria for accepting deals edit the file ~/.lotusminer/config.toml 198 | # ExpectedSealDuration (defaults to 12h0m0s) should be set according to how quickly you can seal a sector 199 | # only deals starting after this delay will be accepted, at which point you must start providing proofs 200 | # MaxPreCommitGasFee, MaxCommitGasFee, and MaxWindowPoStGasFee are set under [Fees] 201 | # WaitDealsDelay (defaults to 1h0m0s) is the delay between accepting the first deal and starting the sealing process 202 | # this allows multiple deals to be sealed in the same sector 203 | # Filter is a shell command that decides which deals to accept (on returning exit code 0) or reject (any other exit code) 204 | # here are some example Filter commands 205 | # reject all deals: 206 | # Filter = false 207 | # accept all deals (the default): 208 | # Filter = true 209 | # accept/reject deals randomly: 210 | # Filter = (($RANDOM < 10000)) 211 | # only accept deals from specific addresses (during Space Race, consider setting these to the addresses of the bots to avoid malicious actors sending spam deals): 212 | # Filter = "jq -e '.Proposal.Client == \"t1...\" or .Proposal.Client == \"t1...\" '" 213 | 214 | # check logs 215 | tail -f ~/lotus.log 216 | watch tail -n 24 ~/lotus-miner.log 217 | grep -n error ~/lotus-miner.log 218 | 219 | # import/export keys 220 | lotus wallet import ~/.keyinfo 221 | lotus wallet export > ~/.keyinfo 222 | 223 | # import/export chain 224 | lotus daemon --import-chain --halt-after-import ~/filecoin_chain.car 225 | lotus chain export ~/filecoin_chain.car 226 | --------------------------------------------------------------------------------